Minor consistency fixes wrt. piyacc.git commit 6558f0b
[bootstrap_bison.git] / ChangeLog
1 2018-05-27  Akim Demaille  <akim.demaille@gmail.com>
2
3         version 3.0.5
4         * NEWS: Record release date.
5
6 2018-05-27  Akim Demaille  <akim.demaille@gmail.com>
7
8         bison: style: indentation fixes
9         * src/parse-gram.y: here.
10
11 2018-05-27  Akim Demaille  <akim.demaille@gmail.com>
12
13         regen
14
15 2018-05-27  Akim Demaille  <akim.demaille@gmail.com>
16
17         bison: please address sanitizer
18         * src/parse-gram.y (add_param): Asan does not like that the second
19         argument of strspn is not 0-terminated.
20
21 2018-05-27  Akim Demaille  <akim.demaille@gmail.com>
22
23         C++: style: fix indentation
24         * data/variant.hh (b4_symbol_variant): De-indent, as the callers are
25         indented.
26
27 2018-05-27  Akim Demaille  <akim.demaille@gmail.com>
28
29         NEWS: update
30
31 2018-05-27  Akim Demaille  <akim.demaille@gmail.com>
32
33         C++: style: prefer `unsigned` to `unsigned int`
34         * data/c++.m4: here.
35
36 2018-05-27  Akim Demaille  <akim.demaille@gmail.com>
37
38         C++: style: space before paren
39         * data/c++.m4, data/lalr1.cc: here.
40
41 2018-05-27  Akim Demaille  <akim.demaille@gmail.com>
42
43         C++: fix -Wdeprecated warnings
44         For instance on test 99:
45
46             In file included from @@.cc:56:
47             @@.hh:409:26: error: definition of implicit copy constructor for
48                                  'stack_symbol_type' is deprecated because it
49                                  has a user-declared copy assignment operator
50                                  [-Werror,-Wdeprecated]
51                   stack_symbol_type& operator= (const stack_symbol_type& that);
52                                  ^
53
54         Reported by Derek Clegg.
55         https://lists.gnu.org/archive/html/bison-patches/2018-05/msg00036.html
56
57         * configure.ac (warn_tests): Add -Wdeprecated.
58         * data/lalr1.cc (stack_symbol_type): Add an explicit copy ctor.
59         We cannot rely on the explicit default implementation (`= default`)
60         as we support C++ 98.
61
62 2018-05-27  Akim Demaille  <akim.demaille@gmail.com>
63
64         tests: fix -Wdeprecated warning
65         With recent compilers:
66
67             input.yy:49:5: error: definition of implicit copy assignment
68                                   operator for 'Object' is deprecated because
69                                   it has a user-declared destructor
70                                   [-Werror,-Wdeprecated]
71                 ~Object ()
72                 ^
73             input.yy:130:35: note: in implicit copy assignment operator for
74                                    'Object' first required here
75                 { yylhs.value.as< Object > () = yystack_[0].value.as< Object > (); }
76
77         * tests/c++.at (Object): Add missing assignment operator.
78
79 2018-05-19  Akim Demaille  <akim.demaille@gmail.com>
80
81         maint: update syntax-check exclusions
82         sc_two_space_separator_in_usage complains about bootstrap:
83
84             two_space_separator_in_usage
85             /Users/akim/src/gnu/bison/bootstrap:905:   --aux-dir $build_aux\
86             /Users/akim/src/gnu/bison/bootstrap:906:   --doc-base $doc_base\
87             /Users/akim/src/gnu/bison/bootstrap:907:   --lib $gnulib_name\
88             /Users/akim/src/gnu/bison/bootstrap:908:   --m4-base $m4_base/\
89             /Users/akim/src/gnu/bison/bootstrap:909:   --source-base $source_base/\
90             /Users/akim/src/gnu/bison/bootstrap:910:   --tests-base $tests_base\
91             /Users/akim/src/gnu/bison/bootstrap:911:   --local-dir $local_gl_dir\
92             maint.mk: help2man requires at least two spaces between an option and its description
93
94         * cfg.mk: Exclude bootstrap from this check.
95
96 2018-05-19  Akim Demaille  <akim.demaille@gmail.com>
97
98         autoconf: update
99         * submodules/autoconf: Update to latest master.
100         No difference on the M4 files we use.
101
102 2018-05-19  Akim Demaille  <akim.demaille@gmail.com>
103
104         regen
105
106 2018-05-12  Akim Demaille  <akim.demaille@gmail.com>
107
108         Update copyright years
109         Run `make update-copyright`.
110
111 2018-05-12  Nate Guerin  <nathan.guerin@riseup.net>
112
113         Add a missing word in the documentation
114         Small patch adds the word 'to' to the documentation.
115
116 2018-05-12  Akim Demaille  <akim.demaille@gmail.com>
117
118         Examples: improve C++ style
119         * examples/variant.yy: Prefer vector to list.
120         Remove useless inline.
121
122 2018-05-12  Akim Demaille  <akim.demaille@gmail.com>
123
124         Avoid compiler warnings
125         At least GCC 7.3, with -O1 or -O2 (but not -O0 or -O3) generates
126         warnings with -Wnull-dereference when using yyformat: it fails to see
127         yyformat cannot be null.
128
129         Reported by Frank Heckenbach, https://savannah.gnu.org/patch/?9620.
130
131         * configure.ac: Use -Wnull-dereference if supported.
132         * data/glr.c, data/lalr1.cc, data/yacc.c: Define yyformat in such
133         a way that GCC cannot not see that yyformat is defined.
134         Using `default: abort();` also addresses the issue, but forces
135         the inclusion of `stdlib.h`, which we avoid.
136
137 2018-05-10  Akim Demaille  <akim.demaille@gmail.com>
138
139         C++: fix uses of `inline`
140         Sometimes `inline` would be used in *.cc files on symbols that are not
141         exported (useless but harmless), and sometimes on exported symbols
142         such as the constructor of syntax_error (harmful: linking fails).
143
144         Reported several times, including:
145
146         - by Dennis T
147           http://lists.gnu.org/archive/html/bug-bison/2016-03/msg00002.html
148         - by Frank Heckenbach
149           https://savannah.gnu.org/patch/?9616
150
151         * data/c++.m4 (b4_inline): New: expands to `inline` or nothing.
152         Use it where appropriate.
153         * data/lalr1.cc: Use it where appropriate.
154
155         * tests/c++.at (Syntax error as exception): Put the scanner in another
156         compilation unit to exercise the constructor of syntax_error.
157
158 2018-05-10  Akim Demaille  <akim.demaille@gmail.com>
159
160         C++: remove useless `inline` in CC files
161         * data/glr.cc, data/lalr1.cc: Remove `inline` from implementations
162         that are not in headers.
163
164 2018-05-10  Akim Demaille  <akim.demaille@gmail.com>
165
166         C++: remove useless `inline` on templates
167         Templates are implicitly `inline`.
168
169         * data/c++.m4, data/lalr1.cc: Remove `inline` from templates.
170
171 2018-05-08  Akim Demaille  <akim.demaille@gmail.com>
172
173         style: don't use std::endl
174         * data/lalr1.cc, doc/bison.texi, etc/bench.pl.in, examples/variant.yy,
175         * tests/actions.at, tests/atlocal.in, tests/c++.at, tests/headers.at,
176         * tests/local.at, tests/types.at:
177         Don't use std::endl, it flushes uselessly, and is considered bad
178         style.
179
180 2018-05-08  Akim Demaille  <akim.demaille@gmail.com>
181
182         doc: wrap
183         * README-hacking: Refill paragraphs.
184
185 2018-05-08  Akim Demaille  <akim.demaille@gmail.com>
186
187         gnulib: update
188         * README-hacking: Commit before bootstrapping.
189         * bootstrap.conf: gnulib_mk is no longer defined by bootstrap.
190         * bootstrap, gnulib, lib/.gitignore, m4/.gitignore: Update/regen.
191
192 2018-05-08  Akim Demaille  <akim.demaille@gmail.com>
193
194         tests: we might need to find gnulib headers
195             315. calc.at:596: testing Calculator  ...
196             ++ cat
197             ++ test x = x1
198             ++ set +x
199             bison/tests/calc.at:596: bison -fno-caret -o calc.c calc.y
200             ++ bison -fno-caret -o calc.c calc.y
201             ++ set +x
202             bison/tests/calc.at:596: $BISON_C_WORKS
203             stderr:
204             stdout:
205             ++ set +x
206             bison/tests/calc.at:596: $CC $CFLAGS $CPPFLAGS $LDFLAGS -o calc calc.c $LIBS
207             ++ 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
208             stderr:
209             In file included from calc.y:198:
210             bison/_build/6s/lib/unistd.h:592:11: fatal error: 'getopt-pfx-core.h' file not found
211             # include <getopt-pfx-core.h>
212                       ^~~~~~~~~~~~~~~~~~~
213             1 error generated.
214             stdout:
215             bison/tests/calc.at:596: exit code was 1, expected 0
216             315. calc.at:596: 315. Calculator  (calc.at:596): FAILED (calc.at:596)
217
218         * tests/atlocal.in (CPPFLAGS): Find gnulib's headers.
219
220 2018-05-08  Akim Demaille  <akim.demaille@gmail.com>
221
222         getargs: rename argument to avoid gnulib's renaming
223         With Clang 6.0:
224
225               CC       src/bison-getargs.o
226             bison/src/getargs.c:67:12: error: parameter 'option' not found in the
227                                        function declaration [-Werror,-Wdocumentation]
228              *  \param option   option being decoded.
229                        ^~~~~~
230             bison/src/getargs.c:67:12: note: did you mean 'rpl_option'?
231
232         * src/getargs.c: Don't use `option` as a documentation argument.
233
234 2017-09-22  Paul Eggert  <eggert@cs.ucla.edu>
235
236         Capitalize "Polish" when it's a proper adjective
237
238 2017-09-17  Paul Eggert  <eggert@cs.ucla.edu>
239
240         Adjust to recent Gnulib changes
241
242 2017-09-17  Paul Eggert  <eggert@cs.ucla.edu>
243
244         autoconf: update
245
246 2017-09-17  Paul Eggert  <eggert@cs.ucla.edu>
247
248         gnulib: update
249
250 2015-08-12  Akim Demaille  <akim@lrde.epita.fr>
251
252         gnulib: update
253
254 2015-08-12  Akim Demaille  <akim@lrde.epita.fr>
255
256         lalr1, yacc: use the default location as initial error location
257         Currently lalr1.cc makes an out-of-bound access when trying to read @1
258         in rules with an empty rhs (i.e., when there is no @1) that raises an
259         error (YYERROR).
260
261         glr.c already gracefully handles this by using @$ as initial location
262         for the errors.  Let's do that in yacc.c and lalr1.cc.
263
264         * data/lalr1.cc, data/yacc.c: Use @$ to initialize the error location.
265         * tests/actions.at: Check that case.
266
267 2015-08-12  Akim Demaille  <akim@lrde.epita.fr>
268
269         style: formatting and comment changes
270         * data/glr.c: Avoid empty lines.
271         * data/lalr1.cc: Use the same comments as in glr.c and yacc.c.
272
273 2015-08-12  Akim Demaille  <akim@lrde.epita.fr>
274
275         c++: style: use "unsigned", not "unsigned int"
276         This style appears to be more traditional, at least in C++.
277         For instance in the standard, [facets.examples].
278         There are occurrences using "unsigned int" too though.
279
280         * data/lalr1.cc, data/location.cc, data/stack.hh: here.
281
282 2015-08-12  Akim Demaille  <akim@lrde.epita.fr>
283
284         c++: style: remove useless "inline" and fix space issues
285         * data/lalr1.cc, data/c++.m4: Formatting changes.
286         * data/stack.hh: Remove useless "inline".
287         Add documentation.
288         * data/location.cc: Prefer {} for empty bodies.
289
290 2015-08-12  Akim Demaille  <akim@lrde.epita.fr>
291
292         tests: beware of additional warnings from GCC 5
293         * tests/synclines.at (AT_SYNCLINES_COMPILE): Avoid warnings about
294         unused functions.
295
296 2015-08-12  Akim Demaille  <akim@lrde.epita.fr>
297
298         tests: beware that clang warns about "#define private public"
299         We use this trick to write some test about internal details.  But
300         since we use -Werror, clang++ 3.6 dies issueing a warning about it.
301
302         * configure.ac (warn_tests): Disable this warning.
303
304 2015-08-12  Akim Demaille  <akim@lrde.epita.fr>
305
306         tests: update our Valgrind suppression files
307         * build-aux/linux-gnu.valgrind, build-aux/darwin11.4.0.valgrind: Rename as...
308         * build-aux/Linux.valgrind, build-aux/Darwin.valgrind: these.
309         * build-aux/Linux.valgrind: Add suppression clause.
310         * configure.ac: Update.
311         * tests/local.mk: Use it.
312
313 2015-03-03  Akim Demaille  <akim@lrde.epita.fr>
314
315         doc: improve html and pdf rendering
316         * doc/bison.texi: Help html conversion to understand where the
317         function names end.
318         Beware of PDF width.
319
320 2015-03-03  Akim Demaille  <akim@lrde.epita.fr>
321
322         doc: fixes in the C++ part
323         Reported by Askar Safin.
324
325         http://lists.gnu.org/archive/html/bug-bison/2015-02/msg00018.html
326         http://lists.gnu.org/archive/html/bug-bison/2015-02/msg00019.html
327
328         * doc/bison.texi (Split Symbols): Fix access to token types.
329         yylval is a pointer, so use ->.
330         Fix coding style issues: space before paren.
331
332 2015-02-10  Akim Demaille  <akim@lrde.epita.fr>
333
334         tests: be robust to platforms that support UTF-8 even with LC_ALL=C
335         Because musl supports UTF-8 with LC_ALL=C, gcc produces:
336
337           input.y: In function â€˜yyparse’:
338
339         instead of:
340
341           input.y: In function 'yyparse':
342
343         Reported by Ferdinand Thiessen.
344         http://lists.gnu.org/archive/html/bug-bison/2015-02/msg00001.html
345
346         * tests/synclines.at (AT_SYNCLINES_COMPILE): Skip syncline tests when
347         we can't trust error messages issued about a function body.
348
349 2015-02-10  Akim Demaille  <akim@lrde.epita.fr>
350
351         tests: java: avoid recent Java features
352         Tests 463 and 464 fail with Java 1.4 compilers.
353
354         Reported by Michael Felt.
355         <http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00091.html>
356
357         * tests/javapush.at: Use StringBuffer instead of StringBuilder.
358
359 2015-01-26  Akim Demaille  <akim@lrde.epita.fr>
360
361         tests: c++: fix symbol lookup issue
362         Sun C 5.13 SunOS_sparc 2014/10/20 reports errors on tests 430-432.
363
364         Reported by Dennis Clarke.
365         <http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00087.html>
366
367         * tests/c++.at (Variants): Be sure to emit operator<< before using it:
368         use "%code top" rather than "%code".
369         Prefer std::vector to std::list.
370         Do not define anything in std::, to avoid undefined behavior.
371
372 2015-01-23  Akim Demaille  <akim@lrde.epita.fr>
373
374         maint: post-release administrivia
375         * NEWS: Add header line for next release.
376         * .prev-version: Record previous version.
377         * cfg.mk (old_NEWS_hash): Auto-update.
378
379 2015-01-23  Akim Demaille  <akim@lrde.epita.fr>
380
381         version 3.0.4
382         * NEWS: Record release date.
383
384 2015-01-23  Akim Demaille  <akim@lrde.epita.fr>
385
386         gnulib: update
387
388 2015-01-23  Akim Demaille  <akim@lrde.epita.fr>
389
390         build: re-enable compiler warnings, and fix them
391         There are warnings (-Wextra) in generated C++ code:
392
393           ltlparse.cc: In member function 'ltlyy::parser::symbol_number_type
394           ltlyy::parser::by_state::type_get() const':
395           ltlparse.cc:452:33: warning: enumeral and non-enumeral type in
396           conditional expression
397               return state == empty_state ? empty_symbol : yystos_[state];
398
399         Reported by Alexandre Duret-Lutz.
400
401         It turns out that -Wall and -Wextra were disabled because of a stupid
402         typo.
403
404         * configure.ac: Fix the stupid typo.
405         * data/lalr1.cc, src/AnnotationList.c, src/InadequacyList.c,
406         * src/ielr.c, src/print.c, src/scan-code.l, src/symlist.c,
407         * src/symlist.h, src/symtab.c, src/tables.c, tests/actions.at,
408         * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at,
409         * tests/named-refs.at, tests/torture.at:
410         Fix warnings, mostly issues about variables used only with assertions,
411         which are disabled with -DNDEBUG.
412
413 2015-01-22  Akim Demaille  <akim@lrde.epita.fr>
414
415         tests: c++: fix a C++03 conformance issue
416         This fixes test 241 on xLC:
417
418         "input.y", line 42.11: 1540-0274 (S) The name lookup for "report" did not find a declaration.
419         "input.y", line 42.11: 1540-1292 (I) Static declarations are not considered for a function call if the function is not qualified.
420
421         where report is:
422
423           static void
424           report (std::ostream& yyo, int ival, float fval)
425           {
426             yyo << "ival: " << ival << ", fval: " <<  fval;
427           }
428
429         and line 42 is:
430
431           %printer { report (yyo, $$,       $<fval>$); } <ival>;
432
433         It turns out that indeed this function must not be declared static,
434         <http://stackoverflow.com/a/17662745/1353549>.  Let's put it into an
435         anonymous namespace.
436
437         Reported by Thomas Jahns.
438         http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00059.html
439
440         * tests/actions.at (Qualified $$ in actions): Don't use "static",
441         prefer anonymous namespace.
442
443 2015-01-20  Akim Demaille  <akim@lrde.epita.fr>
444
445         tests: fix a title
446         * tests/conflicts.at: De-overquote.
447
448 2015-01-20  Akim Demaille  <akim@lrde.epita.fr>
449
450         c++: reserve 200 slots in the parser's stack
451         This is consistent with what is done with yacc.c and glr.c.  Because
452         it also avoids that the stack needs to be resized very soon, it should
453         help keeping tests about destructors more reliable.
454
455         Indeed, if the stack is created too small, very soon the C++ library
456         needs to enlarge it, which means creating a new one, copying the
457         elements from the initial one onto it, and then destroy the elements
458         of the initial stack: that would be a spurious call to a destructor.
459
460         Reported by Thomas Jahns.
461         http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00059.html
462
463         * data/stack.hh (stack::stack): Reserve 200 slots.
464         * tests/c++.at: Remove traces of stack expansions.
465
466 2015-01-20  Akim Demaille  <akim@lrde.epita.fr>
467
468         tests: be more robust to unrecognized synclines, and try to recognize xlc
469         Reported by Thomas Jahns.
470         http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00059.html
471
472         * tests/synclines.at (AT_SYNCLINES_COMPILE): Rename as...
473         (_AT_SYNCLINES_COMPILE): this.
474         Try to recognize xlc locations.
475         (AT_SYNCLINES_COMPILE): New.  Skips the test if we can't read the
476         synclines.
477
478 2015-01-20  Akim Demaille  <akim@lrde.epita.fr>
479
480         tests: fix C++ conformance
481         Reported by Thomas Jahns.
482         http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00059.html
483
484         * tests/c++.at (Exception safety): Add missing include.
485         Don't use const_iterator for erase.
486
487 2015-01-18  Akim Demaille  <akim@lrde.epita.fr>
488
489         build: fix some warnings
490         Reported by John Horigan.
491         http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00034.html
492
493         * src/graphviz.c, src/symtab.h: Address compiler warnings.
494
495 2015-01-16  Akim Demaille  <akim@lrde.epita.fr>
496
497         build: avoid infinite recursions on include_next
498         On MacOS X 10.5 PPC with Apple's GCC 4.0.1:
499
500           % uname -a
501           Darwin aria.cielonegro.org 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:57:0
502           1 PDT 2009; root:xnu-1228.15.4~1/RELEASE_PPC Power Macintosh
503           % gcc --version
504           powerpc-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)
505           Copyright (C) 2005 Free Software Foundation, Inc.
506           This is free software; see the source for copying conditions.  There is NO
507           warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
508
509         building in place enters into an infinite recursion on "#include_next":
510
511           % gmake V=1
512           [snip]
513           depbase=`echo lib/math.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
514           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 &&\
515           mv -f $depbase.Tpo $depbase.Po
516           In file included from lib/math.h:27,
517                            from lib/math.h:27,
518                            from lib/math.h:27,
519                            from lib/math.h:27,
520           [snip]
521                            from lib/math.h:27,
522                            from lib/math.h:27,
523                            from lib/math.c:3:
524           lib/math.h:27:23: error: #include nested too deeply
525           Makefile:3414: recipe for target 'lib/math.o' failed
526           gmake[2]: *** [lib/math.o] Error 1
527
528         Using -I./lib instead of -Ilib fixes the problem.
529
530         Reported by Pho.
531         <https://lists.gnu.org/archive/html/bison-patches/2014-01/msg00000.html>
532
533         * Makefile.am (AM_CPPFLAGS): Use -I./lib instead of -Ilib.
534
535 2015-01-16  Akim Demaille  <akim@lrde.epita.fr>
536
537         doc: minor fixes
538         * doc/bison.texi: Fix warnings about colon in reference names.
539         * data/bison.m4, src/files.h: Fix comments.
540         * doc/Doxyfile.in: update.
541
542 2015-01-15  Akim Demaille  <akim@lrde.epita.fr>
543
544         gnulib: strtoul is considered obsolete and now useless
545         * bootstrap.conf: here.
546
547 2015-01-15  Akim Demaille  <akim@lrde.epita.fr>
548
549         c++: avoid warnings when destructors don't use $$
550         * data/c++.m4: here.
551
552 2015-01-15  Akim Demaille  <akim@lrde.epita.fr>
553
554         maint: post-release administrivia
555         * NEWS: Add header line for next release.
556         * .prev-version: Record previous version.
557         * cfg.mk (old_NEWS_hash): Auto-update.
558
559 2015-01-15  Akim Demaille  <akim@lrde.epita.fr>
560
561         version 3.0.3
562         * NEWS: Record release date.
563
564 2015-01-15  Akim Demaille  <akim@lrde.epita.fr>
565
566         gnulib: update
567
568 2015-01-13  Akim Demaille  <akim@lrde.epita.fr>
569
570         tests: split a large test case into several smaller ones
571         * tests/conflicts.at (AT_CONSISTENT_ERRORS_CHECK): Move AT_SETUP/AT_CLEANUP
572         into it, so that we don't skip non Java tests following a test case in Java.
573
574 2015-01-12  Akim Demaille  <akim@lrde.epita.fr>
575
576         package: a bit of trouble shooting indications
577         * README-hacking: here.
578
579 2015-01-12  Akim Demaille  <akim@lrde.epita.fr>
580
581         doc: liby's main arms the internationalization
582         Reported by Nicolas Bedon.
583         <https://lists.gnu.org/archive/html/bug-bison/2014-11/msg00005.html>
584
585         * doc/bison.texi (Yacc Library): Document the call the setlocale.
586
587 2015-01-09  Akim Demaille  <akim@lrde.epita.fr>
588
589         bison: avoid warnings from static code analysis
590         A static analysis tool reports that some callers of symbol_list_n_get
591         might get NULL and not handle it properly.  This is not the case, yet
592         we can suppress this pattern.
593
594         Reported by Mike Sullivan.
595         <https://lists.gnu.org/archive/html/bug-bison/2013-12/msg00027.html>
596
597         * src/symlist.c (symbol_list_n_get): Actually it is never called
598         to return 0.  Enforce this postcondition via aver.
599         (symbol_list_n_type_name_get): Simplify accordingly.  In particular,
600         discards a (translated) useless error message.
601         * src/symlist.h: Adjust documentation.
602         * src/scan-code.l: Style change.
603
604 2015-01-09  Akim Demaille  <akim@lrde.epita.fr>
605
606         c++: fix the use of destructors when variants are enabled
607         When using variants, destructors generate invalid code.
608         <http://lists.gnu.org/archive/html/bug-bison/2014-09/msg00005.html>
609         Reported by Michael Catanzaro.
610
611         * data/c++.m4 (~basic_symbol): b4_symbol_foreach works on yysym:
612         define it.
613         * tests/c++.at (Variants): Check it.
614
615 2015-01-08  Akim Demaille  <akim@lrde.epita.fr>
616
617         style: tests: simplify the handling of some C++ tests
618         * tests/c++.at: here.
619         (Doxygen): Pass %define, so that files such as position.hh etc.
620         are generated, instead of putting everything into input.hh.
621
622 2015-01-08  Akim Demaille  <akim@lrde.epita.fr>
623
624         c++: symbols can be empty, so use it
625         The previous patches ensure that symbols (symbol_type and
626         stack_symbol_type) can be empty, cleared, and their emptiness can be
627         checked.  Therefore, yyempty, which codes whether yyla is empty or
628         not, is now useless.
629
630         In C skeletons (e.g., yacc.c), the fact that the lookahead is empty is
631         coded by "yychar = YYEMPTY", which is exactly what this patch
632         restores, since yychar/yytoken corresponds to yyla.type.
633
634         * data/lalr1.cc (yyempty): Remove.
635         Rather, depend on yyla.empty ().
636
637 2015-01-08  Akim Demaille  <akim@lrde.epita.fr>
638
639         c++: variants: don't leak the lookahead in error recovery
640         During error recovery, when discarding the lookeahead, we don't
641         destroy it, which is caught by parse.assert assertions.
642
643         Reported by Antonio Silva Correia.
644         With an analysis and suggested patch from Michel d'Hooge.
645         <http://savannah.gnu.org/support/?108481>
646
647         * tests/c++.at (Variants): Strengthen the test to try syntax errors
648         with discarded lookahead.
649
650 2015-01-08  Akim Demaille  <akim@lrde.epita.fr>
651
652         c++: provide a means to clear symbols
653         The symbol destructor is currently the only means to clear a symbol.
654         Unfortunately during error recovery we might have to clear the
655         lookahead, which is a local variable (yyla) that has not yet reached
656         its end of scope.
657
658         Rather that duplicating the code to destroy a symbol, or rather than
659         destroying and recreating yyla, let's provide a means to clear a
660         symbol.
661
662         Reported by Antonio Silva Correia, with an analysis from Michel d'Hooge.
663         <http://savannah.gnu.org/support/?108481>
664
665         * data/c++.m4, data/lalr1.cc (basis_symbol::clear, by_state::clear)
666         (by_type::clear): New.
667         (basic_symbol::~basic_symbol): Use clear.
668
669 2015-01-08  Akim Demaille  <akim@lrde.epita.fr>
670
671         c++: clean up the handling of empty symbols
672         * data/c++.m4, data/lalr1.cc (yyempty_): Remove, replaced by...
673         (empty_symbol, by_state::empty_state): these.
674         (basic_symbol::empty): New.
675
676 2015-01-08  Akim Demaille  <akim@lrde.epita.fr>
677
678         c++: comment and style changes
679         * data/c++.m4, data/lalr1.cc: More documentation.
680         Tidy.
681         * tests/c++.at (string_cast): Rename as...
682         (to_string): this C++11 name.
683
684 2015-01-07  Akim Demaille  <akim@lrde.epita.fr>
685
686         c++: variants: comparing addresses of typeid.name() is undefined
687         Instead of storing and comparing pointers to names of types, store
688         pointers to the typeids, and compares the typeids.
689         Reported by Thomas Jahns.
690         <http://lists.gnu.org/archive/html/bug-bison/2014-03/msg00001.html>
691
692         * data/variant.hh (yytname_): Replace with...
693         (yytypeid_): this.
694
695 2015-01-05  Akim Demaille  <akim@lrde.epita.fr>
696
697         c++: locations: complete the API and fix comments
698         There are no support for += between locations, and some comments are wrong.
699         Reported by Alexandre Duret-Lutz.
700
701         * data/location.cc: Fix.
702         * doc/bison.texi: Document.
703         * tests/c++.at: Check.
704
705 2015-01-05  Akim Demaille  <akim@lrde.epita.fr>
706
707         build: do not clean figure sources in make clean
708         "make clean && make" fails in in-tree builds.
709
710         * doc/local.mk (CLEANDIRS): Replace with...
711         (CLEANFILES): this safer list of files to clean.
712
713 2015-01-05  Akim Demaille  <akim@lrde.epita.fr>
714
715         build: don't try to generate docs when cross-compiling
716         When cross-compiling don't run the generated bison to update the docs.
717         Reported by Aaro Koskinen.
718         <http://lists.gnu.org/archive/html/bison-patches/2014-03/msg00000.html>
719
720         * configure.ac (CROSS_COMPILING): New.
721         * doc/local.mk: Use it.
722
723 2015-01-04  Akim Demaille  <akim@lrde.epita.fr>
724
725         package: fix a reporter's name
726         * THANKS, build-aux/git-log-fix: s/Bernd Edligner/Bernd Edlinger/.
727
728 2015-01-04  Akim Demaille  <akim@lrde.epita.fr>
729
730         %union: fix the support for named %union
731         Bison supports a union tag, for obscure reasons.  But it does a poor
732         job at it, especially since Bison 3.0.
733         Reported by Stephen Cameron and Tobias Frost.
734
735         It did not ensure that the name was not given several times.  An easy
736         way to do this is to make the %union tag be handled as a %define
737         variable, as they cannot be defined several times.
738
739         Since Bison 3.0, the synclines were wrongly placed, resulting in
740         invalid code.  Addressing this issue, because of the way the union tag
741         was stored (as a code muscle), would have been tedious.  Unless we
742         rather define the %union tag as a %percent variable, whose synclines
743         are easier to manipulate.
744
745         So replace the b4_union_name muscle by the api.value.union.name
746         %define variable, document, and check.
747
748         * data/bison.m4: Make sure that api.value.union.name has a keyword value.
749         * data/c++.m4: Make sure that api.value.union.name is not defined.
750         * data/c.m4 (b4_union_name): No longer use it, use api.value.union.name.
751         * doc/bison.texi (%define Summary): Document it.
752         * src/parse-gram.y (union_name): No longer define b4_uion_name, but
753         api.value.union.name.
754         * tests/input.at (Redefined %union name): New.
755         * tests/synclines.at (%union name syncline): New.
756         * tests/types.at: Check named %unions.
757
758 2015-01-04  Akim Demaille  <akim@lrde.epita.fr>
759
760         package: bump to 2015
761         Which also requires:
762
763         * gnulib: Update.
764
765 2014-12-31  Akim Demaille  <akim@lrde.epita.fr>
766
767         flex: don't trust YY_USER_INIT
768         Reported by Bernd Edlinger and others.
769
770         * src/scan-gram.l: here.
771
772 2014-12-31  Akim Demaille  <akim@lrde.epita.fr>
773
774         yacc.c: fix broken union when api.value.type=union and %defines are used
775         Reported by Rich Wilson.
776
777         * data/c.m4 (b4_symbol_type_register): Append to b4_union_members,
778         not b4_user_union_members.
779         The latter invokes the former, but it is the former which is reinitialized
780         to empty by b4_value_type_setup_union.
781         * tests/types.at: Check it.
782
783         This reveals another bug, this time in the case of glr.c parsers.
784
785         * data/glr.c: Generate the header file before the implementation file,
786         to be sure that the setup is run before what depends on it.
787
788 2014-12-31  Akim Demaille  <akim@lrde.epita.fr>
789
790         doc: fix missing xref
791         Reported by xolodho.
792
793         * doc/bison.texi (Printer Decl): here.
794
795 2014-12-29  Akim Demaille  <akim@lrde.epita.fr>
796
797         gnulib: update
798
799 2014-02-03  Akim Demaille  <akim@lrde.epita.fr>
800
801         location: remove some ugly debugging code traces
802         * data/location.cc: here.
803
804 2014-02-03  Akim Demaille  <akim@lrde.epita.fr>
805
806         build: use abort to pacify compiler errors
807         clang, with -DNDEBUG and -Werror fails on some functions that might
808         lack a return.  This is because aver is just another assert, discarded
809         with -DNDEBUG.  So use abort.
810
811         * src/muscle-tab.c, src/scan-skel.l: here.
812
813 2014-02-03  Akim Demaille  <akim@lrde.epita.fr>
814
815         package: bump to 2014
816         * AUTHORS, ChangeLog-2012, Makefile.am, NEWS, PACKAGING, README,
817         * README-alpha, README-hacking, THANKS, TODO, bootstrap.conf,
818         * build-aux/darwin11.4.0.valgrind, build-aux/local.mk,
819         * build-aux/update-b4-copyright,
820         * build-aux/update-package-copyright-year, cfg.mk, configure.ac,
821         * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4,
822         * data/c-like.m4, data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc,
823         * data/java-skel.m4, data/java.m4, data/lalr1.cc, data/lalr1.java,
824         * data/local.mk, data/location.cc, data/stack.hh, data/variant.hh,
825         * data/xslt/bison.xsl, data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl,
826         * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint,
827         * djgpp/README.in, djgpp/config.bat, djgpp/config.sed,
828         * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat,
829         * djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h,
830         * djgpp/testsuite.sed, doc/bison.texi, doc/local.mk, doc/refcard.tex,
831         * etc/README, etc/bench.pl.in, etc/local.mk,
832         * examples/calc++/calc++.test, examples/calc++/local.mk,
833         * examples/extexi, examples/local.mk, examples/mfcalc/local.mk,
834         * examples/mfcalc/mfcalc.test, examples/rpcalc/local.mk,
835         * examples/rpcalc/rpcalc.test, examples/test, examples/variant.yy,
836         * lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
837         * lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
838         * lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
839         * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
840         * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
841         * lib/local.mk, lib/main.c, lib/timevar.c, lib/timevar.def,
842         * lib/timevar.h, lib/vbitset.c, lib/vbitset.h, lib/yyerror.c,
843         * m4/bison-i18n.m4, m4/c-working.m4, m4/cxx.m4, m4/flex.m4,
844         * m4/timevar.m4, src/AnnotationList.c, src/AnnotationList.h,
845         * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c, src/LR0.h,
846         * src/Sbitset.c, src/Sbitset.h, src/assoc.c, src/assoc.h,
847         * src/closure.c, src/closure.h, src/complain.c, src/complain.h,
848         * src/conflicts.c, src/conflicts.h, src/derives.c, src/derives.h,
849         * src/files.c, src/files.h, src/flex-scanner.h, src/getargs.c,
850         * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c,
851         * src/graphviz.h, src/ielr.c, src/ielr.h, src/lalr.c, src/lalr.h,
852         * src/local.mk, src/location.c, src/location.h, src/main.c,
853         * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c,
854         * src/named-ref.h, src/nullable.c, src/nullable.h, src/output.c,
855         * src/output.h, src/parse-gram.c, src/parse-gram.y, src/print-xml.c,
856         * src/print-xml.h, src/print.c, src/print.h, src/print_graph.c,
857         * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
858         * src/reduce.h, src/relation.c, src/relation.h, src/scan-code.h,
859         * src/scan-code.l, src/scan-gram.h, src/scan-gram.l, src/scan-skel.h,
860         * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
861         * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
862         * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
863         * tests/actions.at, tests/atlocal.in, tests/bison.in, tests/c++.at,
864         * tests/calc.at, tests/conflicts.at, tests/cxx-type.at,
865         * tests/existing.at, tests/glr-regression.at, tests/headers.at,
866         * tests/input.at, tests/java.at, tests/javapush.at, tests/local.at,
867         * tests/local.mk, tests/named-refs.at, tests/output.at, tests/push.at,
868         * tests/reduce.at, tests/regression.at, tests/sets.at,
869         * tests/skeletons.at, tests/synclines.at, tests/testsuite.at,
870         * tests/torture.at, tests/types.at:
871         here.
872
873 2014-01-03  Paul Eggert  <eggert@cs.ucla.edu>
874
875         doc: specify documentation encoding
876         * doc/bison.texi: Add '@documentencoding UTF-8'; needed since the
877         manual contains UTF-8 characters.  This will cause the .info files
878         to contain UTF-8 quotes and the like, which should be OK nowadays.
879         Add @documentlanguage while we're at it.
880
881 2013-12-09  Akim Demaille  <akim@lrde.epita.fr>
882
883         package: install the examples
884         Currently, we do not install the various examples extracted from the
885         documentation.  Let's do it, as they are useful starting points.
886
887         * configure.ac: When --enable-gcc-warnings is set, enable ENABLE_GCC_WARNINGS.
888         * examples/extexi: No longer issue synclines by default.
889         * examples/local.mk: Except if ENABLE_GCC_WARNINGS.
890         * examples/calc++/local.mk, examples/mfcalc/local.mk,
891         * examples/rpcalc/local.mk: Install the example files.
892
893 2013-12-09  Akim Demaille  <akim@lrde.epita.fr>
894
895         package: install README and the like in docdir
896         * Makefile.am: here.
897
898 2013-12-09  Akim Demaille  <akim@lrde.epita.fr>
899
900         diagnostics: fix the order of multiple declarations reports
901         On
902
903           %token FOO "foo"
904           %printer {} "foo"
905           %printer {} FOO
906
907         we report
908
909           /tmp/foo.yy:2.10-11: error: %printer redeclaration for FOO
910            %printer {} "foo"
911                     ^^
912           /tmp/foo.yy:3.10-11:     previous declaration
913            %printer {} FOO
914                     ^^
915
916         * src/symtab.c (locations_sort): New.
917         Use it.
918         * tests/input.at (Invalid Aliases): Stress the order of diagnostics.
919
920 2013-12-09  Akim Demaille  <akim@lrde.epita.fr>
921
922         symbol: provide an easy means to compare them in source order
923         * src/symtab.c (symbols_sort): New.
924         (user_token_number_redeclaration): Taken from here.
925
926 2013-12-05  Akim Demaille  <akim@lrde.epita.fr>
927
928         maint: post-release administrivia
929         * NEWS: Add header line for next release.
930         * .prev-version: Record previous version.
931         * cfg.mk (old_NEWS_hash): Auto-update.
932
933 2013-12-05  Akim Demaille  <akim@lrde.epita.fr>
934
935         version 3.0.2
936         * NEWS: Record release date.
937
938 2013-12-05  Akim Demaille  <akim@lrde.epita.fr>
939
940         gnulib: update
941         * gnulib: here.
942
943 2013-12-04  Akim Demaille  <akim@lrde.epita.fr>
944
945         output: do not generate source files when late errors are caught
946         Reported by Alexandre Duret-Lutz as "second problem" in:
947         http://lists.gnu.org/archive/html/bug-bison/2013-09/msg00015.html
948
949         * bootstrap.conf: We need the "unlink" module.
950         * src/files.h, src/files.c (unlink_generated_sources): New.
951         * src/output.c: Use it.
952         * tests/output.at: Check the case of late errors.
953
954 2013-12-04  Akim Demaille  <akim@lrde.epita.fr>
955
956         output: record what generated files are source or report files
957         * src/files.h, src/files.c (output_file_name_check): Take an additional
958         argument to record whether a file is a source or report file.
959         * src/files.c (generated_file): New.
960         (file_names, file_names_count): Replace with...
961         (generated_files, generated_files_size): these.
962         * src/scan-skel.l: Adjust.
963
964 2013-12-04  Akim Demaille  <akim@lrde.epita.fr>
965
966         output: do not generate source files when early errors are caught
967         Reported by Alexandre Duret-Lutz as "second problem" in:
968         http://lists.gnu.org/archive/html/bug-bison/2013-09/msg00015.html
969
970         One problem is that some errors are caught early, before the
971         generation of output files, while others can only be detected
972         afterwards (since, for instance, skeletons can raise errors
973         themselves).
974
975         This will be addressed in two steps: early errors do not generate
976         source files at all, while later errors will remove the files that
977         have already been generated.
978
979         * src/scan-skel.l (yyout): Open to /dev/null when there are errors.
980         * tests/output.at (AT_CHECK_FILES): Factored out of...
981         (AT_CHECK_OUTPUT): this.
982         Fuse the "SHELLIO" argument in the "FLAGS" one.
983         Use $5 to denote the expected exit status.
984         Add a test case for early errors.
985
986 2013-11-26  Akim Demaille  <akim@lrde.epita.fr>
987
988         xml: also use "%empty" with html output
989         * data/xslt/xml2xhtml.xsl: No longer issue an Epsilon, display as in
990         dot and text formats.
991
992 2013-11-26  Akim Demaille  <akim@lrde.epita.fr>
993
994         style: formatting changes
995         * src/print-xml.c: here.
996
997 2013-11-26  Akim Demaille  <akim@lrde.epita.fr>
998
999         xml: also display %empty for empty right-hand sides
1000         * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl: Display %empty where needed.
1001
1002 2013-11-26  Akim Demaille  <akim@lrde.epita.fr>
1003
1004         reports: display %empty in the generated pointed-rules
1005         * src/print.c (print_core): Use %empty for empty rules.
1006         * src/print_graph.c (print_core): Ditto.
1007         * tests/conflicts.at, tests/output.at, tests/reduce.at: Adjust
1008         expectations.
1009
1010 2013-11-26  Akim Demaille  <akim@lrde.epita.fr>
1011
1012         news: YYERROR vs variants
1013
1014 2013-11-18  Akim Demaille  <akim@lrde.epita.fr>
1015
1016         style: scope reduction in lalr.cc
1017         * src/lalr.c: Shorten variable scopes.
1018         (lookahead_tokens_print): Use the same variable name in two loops
1019         iterating over the same structure.
1020
1021 2013-11-15  Akim Demaille  <akim@lrde.epita.fr>
1022
1023         lalr1.cc: formatting changes
1024         * data/lalr1.cc: Fix indentation.
1025
1026 2013-11-15  Akim Demaille  <akim@lrde.epita.fr>
1027
1028         lalr1.cc: fix the support of YYERROR with variants
1029         When variant are enabled, the yylhs variable (the left-hand side of
1030         the rule being reduced, i.e. $$ and @$) is explicitly destroyed when
1031         YYERROR is called.  This is because before running the user code, $$
1032         is initialized, so that the user can properly use it.
1033
1034         However, when quitting yyparse, yylhs is also reclaimed by the C++
1035         compiler: the variable goes out of scope.
1036
1037         Instead of trying to be too smart, let the compiler do its job: reduce
1038         the scope of yylhs to exactly the reduction.  This way, whatever the
1039         type of scope exit (regular, exception, return, goto...) this variable
1040         will be properly reclaimed.
1041
1042         Reported by Paolo Simone Gasparello.
1043         <http://lists.gnu.org/archive/html/bug-bison/2013-10/msg00003.html>
1044
1045         * data/lalr1.cc (yyparse): Reduce the scope of yylhs.
1046         * tests/c++.at: We now pass this test.
1047
1048 2013-11-15  Akim Demaille  <akim@lrde.epita.fr>
1049
1050         tests: check $$'s destruction with variant, YYERROR, and no error recovery
1051         When variant are enabled, the yylhs variable (the left-hand side of
1052         the rule being reduced, i.e. $$ and @$) is explicitly destroyed when
1053         YYERROR is called.  This is because before running the user code, $$
1054         is initialized, so that the user can properly use it.
1055
1056         However, when quitting yyparse, yylhs is also reclaimed by the C++
1057         compiler: the variable goes out of scope.
1058
1059         This was not detected by the test suite because (i) the Object tracker
1060         was too weak, and (ii) the problem does not show when there is error
1061         recovery.
1062
1063         Reported by Paolo Simone Gasparello.
1064         <http://lists.gnu.org/archive/html/bug-bison/2013-10/msg00003.html>
1065
1066         * tests/c++.at (Exception safety): Improve the objects logger to make
1067         sure that we never destroy twice an object.
1068         Also track copy-constructors.
1069         Use a set instead of a list.
1070         Display the logs before running the function body, this is more
1071         useful in case of failure.
1072         Generalize to track with and without error recovery.
1073
1074 2013-11-15  Akim Demaille  <akim@lrde.epita.fr>
1075
1076         tests: simplify useless obfuscation
1077         * tests/c++.at: $$ is not special for M4, there is no need to "escape"
1078         it.
1079
1080 2013-11-14  Akim Demaille  <akim@lrde.epita.fr>
1081
1082         skeletons: use better names when computing a "goto"
1083         * data/glr.c (yyLRgotoState): Name the symbol argument yysym, instead
1084         of yylhs.
1085         * data/lalr1.cc (yy_lr_goto_state_): Likewise.
1086         * data/lalr1.java (yy_lr_goto_state_): New, modeled after the previous
1087         two routines.
1088         Use it.
1089
1090 2013-11-12  Akim Demaille  <akim@lrde.epita.fr>
1091
1092         maint: post-release administrivia
1093         * NEWS: Add header line for next release.
1094         * .prev-version: Record previous version.
1095         * cfg.mk (old_NEWS_hash): Auto-update.
1096
1097 2013-11-12  Akim Demaille  <akim@lrde.epita.fr>
1098
1099         version 3.0.1
1100         * NEWS: Record release date.
1101
1102 2013-11-12  Akim Demaille  <akim@lrde.epita.fr>
1103
1104         aver: it is no longer "protected against NDEBUG"
1105         Apply the same rules for aver as for assert: no side effects,
1106         especially not important ones.
1107
1108         * src/AnnotationList.c, src/muscle-tab.c: Adjust aver uses to resist
1109         to -DNDEBUG.
1110
1111 2013-11-08  Akim Demaille  <akim@lrde.epita.fr>
1112
1113         parsers: rename YY_NULL as YY_NULLPTR to avoid conflicts with Flex
1114         Flex also defines YY_NULL (to 0).  Avoid gratuitous conflicts.
1115
1116         * data/c.m4 (b4_null_define): Rename YY_NULL as YY_NULLPTR.
1117
1118         * data/glr.c, data/lalr1.cc, data/location.cc, data/variant.hh,
1119         * data/yacc.c, src/parse-gram.c, tests/actions.at, tests/c++.at,
1120         * tests/cxx-type.at, tests/glr-regression.at, tests/headers.at,
1121         * tests/push.at, tests/regression.at:
1122         Adjust.
1123
1124 2013-11-05  Akim Demaille  <akim@lrde.epita.fr>
1125
1126         build: use Automake 1.14's non-recursive Makefile features
1127         * configure.ac: Require Automake 1.14.
1128         * examples/calc++/local.mk, examples/local.mk, examples/mfcalc/local.mk,
1129         * examples/rpcalc/local.mk, tests/local.mk: Use %D% and %C%.
1130
1131 2013-11-05  Akim Demaille  <akim@lrde.epita.fr>
1132
1133         build: restore maintainer-push-check
1134         * tests/local.mk: here.
1135
1136 2013-11-05  Akim Demaille  <akim@lrde.epita.fr>
1137
1138         c++: use __attribute__((__pure__)) to avoid warnings
1139         Building C++ parsers with -Wsuggest-attribute=const and
1140         -Wsuggest-attribute=noreturn triggers warning in generated code.
1141
1142         * data/lalr1.cc: Call b4_attribute_define.
1143         (debug_stream, debug_level): Flag as pure.
1144         * tests/headers.at (Several parsers): There are now more YY macros
1145         that "leak".
1146
1147 2013-11-05  Akim Demaille  <akim@lrde.epita.fr>
1148
1149         skeletons: update the handling of compiler attributes
1150         * data/c.m4 (b4_attribute_define): Instead of defining __attribute__,
1151         define YY_ATTRIBUTE conditionally.
1152         (YY_ATTRIBUTE_PURE, YY_ATTRIBUTE_UNUSED, _Noreturn): New.
1153         Use them.
1154         * data/glr.c: Use them.
1155
1156 2013-11-05  Akim Demaille  <akim@lrde.epita.fr>
1157
1158         gnulib: update
1159
1160 2013-10-24  Akim Demaille  <akim@lrde.epita.fr>
1161
1162         style: use /* ... */ comments
1163         * src/complain.c: Here.
1164
1165 2013-10-24  Akim Demaille  <akim@lrde.epita.fr>
1166
1167         tests: skip C++ tests that are too demanding for some compilers
1168         Some tests now fail when compiled with G++ 4.3 or 4.4 on MacPorts.
1169
1170         * tests/local.at (AT_SKIP_IF_EXCEPTION_SUPPORT_IS_POOR): New.
1171         * tests/c++.at (Exception safety): Use it.
1172
1173 2013-10-22  Akim Demaille  <akim@lrde.epita.fr>
1174
1175         install: do not install yacc.1 when --disable-yacc
1176         * configure.ac (ENABLE_YACC): New conditional.
1177         (YACC_SCRIPT, YACC_LIBRARY): Remove.
1178         * lib/local.mk, src/local.mk: Use the former instead of the latter.
1179         * doc/local.mk: Use ENABLE_YACC to avoid installing yacc.1.
1180
1181 2013-10-22  Akim Demaille  <akim@lrde.epita.fr>
1182
1183         style: avoid tabs
1184         * src/scan-code.l: here.
1185
1186 2013-10-22  Akim Demaille  <akim@lrde.epita.fr>
1187
1188         c++: fix generated doxygen comments
1189         * configure.ac: Enable -Wdocumentation if supported.
1190         * data/lalr1.cc: Fix comments.
1191
1192 2013-10-22  Akim Demaille  <akim@lrde.epita.fr>
1193
1194         fix: uniqstr are already pointers
1195         * src/uniqstr.c (uniqstr_assert): Remove incorrect double indirection,
1196         and now useless cast.
1197
1198 2013-10-22  Paul Eggert  <eggert@cs.ucla.edu>
1199
1200         bison: pacify Sun C 5.12
1201         * src/scan-code.l (show_sub_message):
1202         Redo initializations to work around a bogus Sun C 5.12 warning.
1203         (parse_ref): Remove unreachable code that Sun C 5.12 complains about.
1204         * src/uniqstr.h (uniqstr_vsprintf): Use
1205         _GL_ATTRIBUTE_FORMAT_PRINTF (...)  instead of __attribute__
1206         ((__format__ (__printf__, ...))).  Otherwise, Sun C 5.12
1207         complains about an unknown attribute.
1208
1209 2013-10-22  Paul Eggert  <eggert@cs.ucla.edu>
1210
1211         maint: git now ignores rpcalc
1212         * examples/rpcalc/.gitignore: Ignore rpcalc.
1213
1214 2013-10-22  Paul Eggert  <eggert@cs.ucla.edu>
1215
1216         build: examples/calc++/calc++ requires flex
1217         * configure.ac (FLEX_CXX_WORKS): New AM_CONDITIONAL.
1218         * examples/calc++/local.mk (examples/calc++/calc++):
1219         Build if FLEX_CXX_WORKS, not BISON_CXX_WORKS.
1220
1221 2013-10-22  Paul Eggert  <eggert@cs.ucla.edu>
1222
1223         maint: mention help2man, texinfo, apt-get
1224         * README-hacking: Add help2man, texinfo.
1225         Describe how to add packages if you're using Debian.
1226
1227 2013-10-22  Paul Eggert  <eggert@cs.ucla.edu>
1228
1229         maint: git now ignores .log and .trs files
1230         * .gitignore: Add *.log, *.trs.
1231
1232 2013-10-21  Akim Demaille  <akim@lrde.epita.fr>
1233
1234         tests: fix incorrect object construction
1235         Reported by Ken Moffat.
1236         http://lists.gnu.org/archive/html/bug-bison/2013-10/msg00009.html
1237
1238         * tests/c++.at (Exception safety): Here.
1239
1240 2013-10-16  Akim Demaille  <akim@lrde.epita.fr>
1241
1242         glr: allow spaces between "%?" and "{" in predicates
1243         Reported by Rici Lake.
1244         http://lists.gnu.org/archive/html/bug-bison/2013-10/msg00004.html
1245         http://stackoverflow.com/questions/19330171/
1246
1247         * src/scan-gram.l: Do not try to be too smart when diagnosing invalid
1248         directives.
1249         * tests/glr-regression.at (Predicates): New test.
1250
1251 2013-10-16  Akim Demaille  <akim@lrde.epita.fr>
1252
1253         diagnostics: "-Werror -Wno-error=foo" must not emit errors
1254         Currently "-Werror -Wno-error=foo" still turns "foo" warnings into errors.
1255         Reported by Alexandre Duret-Lutz.
1256         See http://lists.gnu.org/archive/html/bug-bison/2013-09/msg00015.html.
1257
1258         * src/complain.c (errority, errority_flag): New.
1259         (complain_init): Initialize the latter.
1260         (warning_argmatch): Extract the loop iterating on the flag's bits.
1261         Set and unset errority_flag here.
1262         (warnings_argmatch): -Wno-error is not the same as -Wno-error=everything:
1263         we must remember if category foo was explicitly turned in an error/warning
1264         via -W(no-)error=foo.
1265         (warning_severity): Use errority_flag.
1266
1267         * tests/input.at (Symbols): Just check --yacc, not -Wyacc, that's the
1268         job of tests on -W.
1269         (-Werror is not affected by -Wnone and -Wall): Rename as...
1270         (-Werror combinations): this.
1271         Tests more combinations of -W, -W(no-)error, and -W(no-)error=foo.
1272         * tests/local.at (AT_BISON_CHECK_WARNINGS): Don't expect -Werror
1273         to turn runs that issue warnings into runs with errors, as the
1274         warnings might be enforced as warnings by -Wno-error=foo, in which
1275         case -Werror does not change anything.
1276
1277         * doc/bison.texi (Bison Options): Try to be clearer about how
1278         -W(no-)error and -W(no-)error=foo interact.
1279
1280 2013-10-16  Akim Demaille  <akim@lrde.epita.fr>
1281
1282         comment changes
1283         * src/complain.h, src/complain.c: More documentation, more comments.
1284
1285 2013-10-04  Andreas Schwab  <schwab@linux-m68k.org>
1286
1287         location: fix EOF check
1288         * location.c (location_caret): Use int, not char, for values from
1289         getc.
1290
1291 2013-09-19  Akim Demaille  <akim@lrde.epita.fr>
1292
1293         style: variant: remove empty line
1294         * data/variant.hh (b4_symbol_constructor_define_): Remove
1295         stray eol.
1296
1297 2013-09-19  Akim Demaille  <akim@lrde.epita.fr>
1298
1299         glr: more assertions
1300         * data/glr.c (yyaddDeferredAction, yyglrShiftDefer, yypdumpstack):
1301         More assertions.
1302
1303 2013-09-19  Akim Demaille  <akim@lrde.epita.fr>
1304
1305         glr: shorten scopes
1306         * data/glr.c (yyglrReduce): Define yyflag with its value.
1307
1308 2013-09-19  Akim Demaille  <akim@lrde.epita.fr>
1309
1310         glr: formatting changes
1311         * data/glr.c: here.
1312
1313 2013-09-19  Akim Demaille  <akim@lrde.epita.fr>
1314
1315         glr: better use of tracing macros
1316         * data/glr.c (yydestroyGLRState): Use YY_SYMBOL_PRINT instead of
1317         yy_symbol_print.
1318
1319 2013-09-19  Akim Demaille  <akim@lrde.epita.fr>
1320
1321         examples: improve the output of the "variant" example
1322         * examples/variant.yy: Improve the printing of lists.
1323
1324 2013-09-19  Akim Demaille  <akim@lrde.epita.fr>
1325
1326         variant: remove useless assertion
1327         * data/variant.hh (move): Remove precondition assertion which is
1328         ensured by the first call of the body (this precondition is also one
1329         of "build").
1330
1331 2013-09-19  Akim Demaille  <akim@lrde.epita.fr>
1332
1333         tests: remove stray debugging traces
1334         * tests/atlocal.in: Remove traces.
1335         Be ready to remove conftest.dSYM generated on OS X.
1336
1337 2013-09-04  Akim Demaille  <akim@lrde.epita.fr>
1338
1339         tests: do not use grep -q
1340         Reported by Daniel Galloway.
1341         http://lists.gnu.org/archive/html/bug-bison/2013-08/msg00020.html
1342
1343         * tests/java.at: Ignore grep's output instead.
1344
1345 2013-08-25  Paul Eggert  <eggert@cs.ucla.edu>
1346
1347         build: don't require flex for ordinary builds
1348         * configure.ac (LEX): Don't fail if this is lex, as flex is not
1349         required for ordinary builds.  Instead, issue a warning and
1350         substitute a no-op LEX.  Reported by Michael Felt in
1351         <http://lists.gnu.org/archive/html/bug-bison/2013-08/msg00009.html>.
1352
1353 2013-08-25  Paul Eggert  <eggert@cs.ucla.edu>
1354
1355         maint: update .gitignore
1356         * .gitignore: Add *.eps, *.o, *.pdf, *.png, *.stamp, *~,
1357         .deps, .dirstamp.  Needed to suppress unwanted chatter from
1358         'git status' after a bootstrap build.
1359
1360 2013-08-24  Paul Eggert  <eggert@cs.ucla.edu>
1361
1362         build: port to pre-5.8.7 perl
1363         * examples/local.mk (extract): Omit -f from perl options.
1364         This doesn't work with perl versions before 5.8.7
1365         that are configured without USE_SITECUSTOMIZE.
1366         Reported by Michael Felt in
1367         <http://lists.gnu.org/archive/html/bug-bison/2013-08/msg00006.html>.
1368
1369 2013-08-01  Akim Demaille  <akim@lrde.epita.fr>
1370
1371         tests: minor change to make it easier to test other skeletons
1372         * tests/c++.at (Variants): Pass the skeleton as argument.
1373
1374 2013-08-01  Valentin Tolmer  <valentin.tolmer@gmail.com>
1375
1376         uniqstr: fix assertion
1377         * src/uniqstr.c (uniqstr_assert): Really make sure str is a uniqstr,
1378         not just whether some uniqstr with the same content was registered.
1379
1380 2013-08-01  Akim Demaille  <akim@lrde.epita.fr>
1381
1382         build: ship the ASCII art figures
1383         We don't ship the *.txt files that are used to build the info
1384         file.
1385         Reported by Colin Daley.
1386
1387         * doc/figs/example.txt: New.
1388         * doc/local.mk (bison.info): Depend on the txt files.
1389         And ship them.
1390
1391 2013-08-01  Akim Demaille  <akim@lrde.epita.fr>
1392
1393         doc: prefer the ".gv" extension to ".dot"
1394         See http://marc.info/?l=graphviz-devel&m=129418103126092 for the
1395         motivation (basically, some word processor now uses *.dot).
1396
1397         * doc/figs/example-reduce.dot: Rename as...
1398         * doc/figs/example-reduce.gv: this.
1399         * doc/figs/example-shift.dot: Rename as...
1400         * doc/figs/example-shift.gv: this.
1401         * doc/figs/example.dot: Rename as...
1402         * doc/figs/example.gv: this.
1403         * doc/local.mk: Adjust.
1404
1405 2013-07-25  Akim Demaille  <akim@lrde.epita.fr>
1406
1407         maint: post-release administrivia
1408         * NEWS: Add header line for next release.
1409         * .prev-version: Record previous version.
1410         * cfg.mk (old_NEWS_hash): Auto-update.
1411
1412 2013-07-25  Akim Demaille  <akim@lrde.epita.fr>
1413
1414         version 3.0
1415         * NEWS: Record release date.
1416
1417 2013-07-25  Akim Demaille  <akim@lrde.epita.fr>
1418
1419         regen
1420
1421 2013-07-25  Akim Demaille  <akim@lrde.epita.fr>
1422
1423         news: prepare 3.0
1424         * NEWS (3.0): Reorder.
1425
1426 2013-07-25  Akim Demaille  <akim@lrde.epita.fr>
1427
1428         tests: fix invalid assignment when using variants in C++11
1429         * tests/c++.at (Exception safety): In variant mode $$ is an instance
1430         of Object.  Assigning YY_NULL in C++98 is incorrect, but behaves ok,
1431         as it assigns YY_NULL=0 using Object::operator= (char v).  It is wrong
1432         in C++11 as there is operator for "$$ = nullptr".
1433
1434 2013-07-25  Akim Demaille  <akim@lrde.epita.fr>
1435
1436         yacc: beware of "uninitialized uses" warnings
1437         Again some issues with the fact that yylval is reported by GCC as
1438         possibly not initialized in some cases.  Here, the case at hand is the
1439         %destructor.
1440
1441         I am still not convinced that it is worth going all the trouble of
1442         using pragmas to disable temporarily some warnings, instead of just
1443         initializing the looking symbol once for all, but that's what Paul
1444         voted for, see
1445         <http://lists.gnu.org/archive/html/bison-patches/2012-10/msg00050.html>.
1446
1447         * data/c.m4 (b4_attribute_define): Define
1448         YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END,
1449         YY_INITIAL_VALUE here, as we will need them in the generation of the
1450         destructor function, which is defined in yacc.c before yyparse, which
1451         was in charge of defining these macros.
1452         * data/yacc.c (b4_declare_scanner_communication_variables): Simplify:
1453         trying to factor the definitions of the case pure and impure is
1454         too complex.
1455         Actually, it is not even clear that this macro should really exist,
1456         as even the calls are complex.
1457         Be careful not to issue a lone ";", as this is a statement, and C90
1458         forbids declarations after statements ; so write
1459         "YY_INITIAL_VALUE(Decl;)", not "YY_INITIAL_VALUE(Decl);".
1460
1461 2013-07-25  Akim Demaille  <akim@lrde.epita.fr>
1462
1463         gnulib: update
1464
1465 2013-07-03  Akim Demaille  <akim@lrde.epita.fr>
1466
1467         tests: skip C++ tests if we can't compile a simple program
1468         There are possible conflicts between gnulib replacement functions (in
1469         <stdio.h>) and their C++ wrappers (in <stream>).  Trying to address
1470         these in configure seems too hard, and I don't know how to fix the issue
1471         in gnulib.  Cowardly avoid the problem by skipping C++ tests when this
1472         happens.
1473         Reported by Stefano Lattarini.
1474         http://lists.gnu.org/archive/html/bug-bison/2013-06/msg00001.html
1475
1476         * tests/atlocal.in (BISON_CXX_WORKS): Also set it to "skip" if we can't
1477         compile a simple program using <stream>.
1478         * tests/local.at: Comment changes.
1479
1480 2013-07-03  Akim Demaille  <akim@lrde.epita.fr>
1481
1482         tests: fix 'find' portability issues
1483         Reported by Stefano Lattarini.
1484         http://lists.gnu.org/archive/html/bug-bison/2013-06/msg00000.html
1485
1486         * tests/output.at (AT_CHECK_OUTPUT): Use Perl instead.
1487
1488 2013-06-24  Akim Demaille  <akim@lrde.epita.fr>
1489
1490         maint: post-release administrivia
1491         * NEWS: Add header line for next release.
1492         * .prev-version: Record previous version.
1493         * cfg.mk (old_NEWS_hash): Auto-update.
1494
1495 2013-06-24  Akim Demaille  <akim@lrde.epita.fr>
1496
1497         version 2.7.91
1498         * NEWS: Record release date.
1499
1500 2013-06-24  Akim Demaille  <akim@lrde.epita.fr>
1501
1502         NEWS: prepare for 2.7.91
1503         * NEWS (2.7.91): Java push parsers.
1504
1505 2013-06-24  Akim Demaille  <akim@lrde.epita.fr>
1506
1507         java: rename YYMORE as YYPUSH_MORE for consistency with C
1508         http://lists.gnu.org/archive/html/bison-patches/2013-06/msg00008.html
1509
1510         * data/lalr1.java, doc/bison.texi, tests/javapush.at:
1511         s/YYMORE/YYPUSH_MORE.
1512
1513 2013-06-21  Akim Demaille  <akim@lrde.epita.fr>
1514
1515         tests: fix Java push failure when running with BISON_USE_PUSH_FOR_PULL
1516         * tests/javapush.at (Trivial Push Parser with api.push-pull verification):
1517         When push for pull is enabled, there is one such function generated.
1518
1519 2013-06-21  Akim Demaille  <akim@lrde.epita.fr>
1520
1521         style: minor changes in the Java tests
1522         * tests/java.at (AT_CHECK_JAVA_GREP): Ignore the exit status.
1523         * tests/javapush.at (AT_CHECK_JAVA_GREP): Be more alike the previous
1524         one.
1525         Formating changes.
1526         Remove stray debugging "jj" file.
1527
1528 2013-06-21  Akim Demaille  <akim@lrde.epita.fr>
1529
1530         java: push: do not reset the error counter
1531         * data/lalr1.java (parse): here, when in push-pull is in "both" mode.
1532         This breaks the test suite, for instance
1533         make check TESTSUITEFLAGS='-d 388 BISON_USE_PUSH_FOR_PULL=1'.
1534         More generally make maintainer-push-check.
1535
1536 2013-06-14  Akim Demaille  <akim@lrde.epita.fr>
1537
1538         build: add Valgrind suppression file for GNU/Linux
1539         * build-aux/linux-gnu.valgrind: New.
1540         * build-aux/local.mk: Ship it.
1541         * configure.ac: Use it.
1542
1543 2013-06-13  Dennis Heimbigner  <dmh@unidata.ucar.edu>
1544
1545         java: add push-parser support
1546         * data/lalr1.java: Capture the declarations as m4 macros to avoid
1547         duplication.  When push parsing, the declarations occur at the class
1548         instance level rather than within the parse() function.
1549
1550         Change the way that the parser state is initialized.  For
1551         push-parsing, the parse state declarations are moved to
1552         "push_parse_initialize()", which is called on the first invocation of
1553         "push_parse()". The %initial-action code is also inserted after the
1554         invocation of "push_parse_initialize()".
1555
1556         The body of the parse loop is modified to return values at appropriate
1557         points when doing push parsing.  In order to make push parsing work,
1558         it is necessary to divide YYNEWSTATE into two states: YYNEWSTATE and
1559         YYGETTOKEN. On the first call to push_parse(), the state is
1560         YYNEWSTATE. On all later entries, the state is set to YYGETTOKEN. The
1561         YYNEWSTATE switch arm falls through into YYGETTOKEN. YYGETTOKEN
1562         indicates that a new token is potentially needed.  Normally, with a
1563         pull parser, this new token would be obtained by calling "yylex()". In
1564         the push parser, the value YYMORE is returned to the caller. On the
1565         next call to push_parse(), the parser will return to the YYGETTOKEN
1566         state and continue operation.
1567
1568         * tests/javapush.at: New test file for java push parsing.
1569         * tests/testsuite.at: Use it.
1570         * tests/local.mk: Adjust.
1571         * doc/bison.texi (Java Push Parser Interface): New.
1572
1573 2013-06-11  Akim Demaille  <akim@lrde.epita.fr>
1574
1575         build: ship all the files, even if the C++ compiler is broken
1576         * examples/calc++/local.mk: Be sure to ship calc++.test even if
1577         the current C++ compiler is not sufficient to run the tests.
1578
1579 2013-06-05  Dennis Heimbigner  <dmh@unidata.ucar.edu>
1580
1581         style: comment changes in Java skeleton
1582         * data/lalr1.java: Here.
1583
1584 2013-06-03  Akim Demaille  <akim@lrde.epita.fr>
1585
1586         tests: fix a G++ warning
1587         * tests/c++.at: Use YY_NULL instead of 0 for the null pointer.
1588         And formatting changes.
1589
1590 2013-06-03  Akim Demaille  <akim@lrde.epita.fr>
1591
1592         build: fix a warning from clang
1593         * src/muscle-tab.c: Declare local functions static.
1594
1595 2013-05-30  Akim Demaille  <akim@lrde.epita.fr>
1596
1597         maint: post-release administrivia
1598         * NEWS: Add header line for next release.
1599         * .prev-version: Record previous version.
1600         * cfg.mk (old_NEWS_hash): Auto-update.
1601
1602 2013-05-30  Akim Demaille  <akim@lrde.epita.fr>
1603
1604         version 2.7.90
1605         * NEWS: Record release date.
1606
1607 2013-05-30  Akim Demaille  <akim@lrde.epita.fr>
1608
1609         style: syntax-check fixes
1610         * data/yacc.c, src/Sbitset.c, src/Sbitset.h, src/muscle-tab.h,
1611         * src/output.c, src/parse-gram.y, src/reader.c, src/symtab.c,
1612         * src/uniqstr.c, src/uniqstr.h: Fix space before parens.
1613         * cfg.mk (_space_before_paren_exempt): Add needed exceptions.
1614
1615 2013-05-30  Akim Demaille  <akim@lrde.epita.fr>
1616
1617         xml: use %empty in the text output
1618         * data/xslt/xml2text.xsl: here.
1619
1620 2013-05-30  Akim Demaille  <akim@lrde.epita.fr>
1621
1622         build: locally disable new GCC warnings that fail on Flex generated code
1623         * configure.ac: here.
1624
1625 2013-05-30  Akim Demaille  <akim@lrde.epita.fr>
1626
1627         fix a memory leak
1628         * src/print-xml.c (num_escape_bufs): New.
1629         (print_xml): Be sure to release all the escape_bufs.
1630
1631 2013-05-30  Akim Demaille  <akim@lrde.epita.fr>
1632
1633         regen
1634
1635 2013-05-30  Akim Demaille  <akim@lrde.epita.fr>
1636
1637         build: be sure to include config.h first in the generated parser
1638         Using %code for config.h is wrong, as some headers will already have
1639         been included by Bison.  In some cases, e.g., glibc's string.h, this
1640         results in some declaration not being made for lack of definition of
1641         _GNU_SOURCE, which is performed by config.h.
1642
1643         * src/parse-gram.y: here.
1644
1645 2013-05-29  Akim Demaille  <akim@lrde.epita.fr>
1646
1647         Merge remote-tracking branch 'origin/maint'
1648         * origin/maint:
1649           maint: post-release administrivia
1650           version 2.7.1
1651           regen
1652
1653 2013-05-29  Petr Machata  <pmachata@redhat.com>
1654
1655         drop unused options --raw, -n, -e, --include and -I
1656         * --raw appears to be ignored.  It was marked as obsolete in the
1657           commit ec3bc39, and documented as no longer supported as of 1.29
1658           (2001-09-07).  Support for %raw appears to have been dropped in
1659           e9955c83 on 2002-06-11, but --raw was kept around.  Maybe it's time
1660           to drop it as well?
1661
1662         * Commit e9955c83 dropped support for %no-parser as well, and
1663           converted it to option.  --no-parser was later dropped in 728c4be2
1664           on 2007-08-12, but -n was kept around, probably as an omission.  All
1665           three are documented as removed since 2.3b (2008-05-27).
1666
1667         * -e existed for a single day in 2001.  It was introduced in eeeb962b
1668           on 2001-11-27.  The handling was removed in c7925b99 on 2001-11-28,
1669           but "e" was kept in the list of short options.  Probably an
1670           omission.
1671
1672         * --include appears to be dead code.  The option sets a variable, but
1673           that variable is not used anywhere.  It was added in f6bd5427 on
1674           2001-11-26 as a %-directive, with comments that it's not yet
1675           implemented.  It was converted to a command-line option later, but
1676           doesn't seem to ever have been actually implemented.
1677
1678 2013-05-28  Akim Demaille  <akim@lrde.epita.fr>
1679
1680         gnulib: update
1681
1682 2013-04-22  Akim Demaille  <akim@lrde.epita.fr>
1683
1684         diagnostics: always point to the first directive
1685         Some directives cannot be used several times (e.g., a given symbol may
1686         only have a single printer).  In case of repeated definitions, an
1687         error is issued for the second definition, yet it is not discarded,
1688         and becomes the definition used for the rest of the file.
1689
1690         This is not consistent with the idea that multiple definitions are not
1691         allowed: discard any repeated directive.
1692
1693         * src/symtab.c (symbol_type_set, symbol_code_props_set)
1694         (semantic_type_code_props_set, symbol_class_set, symbol_translation):
1695         Discard repeated directives.
1696         * tests/input.at (Default %printer and %destructor redeclared)
1697         (Per-type %printer and %destructor redeclared): Update expectations.
1698
1699 2013-04-22  Akim Demaille  <akim@lrde.epita.fr>
1700
1701         tests: factor test for printer/desctructor redefined
1702         * tests/input.at (Default %printer and %destructor redeclared):
1703         Introduce AT_TEST to factor.
1704
1705 2013-04-22  Akim Demaille  <akim@lrde.epita.fr>
1706
1707         diagnostics: use appropriate location for useless precedence/associativity
1708         * src/symtab.c (symbol_precedence_set): Use prec_location, not
1709         location (which is the first occurrence of the symbol, possibly just
1710         %token).
1711         Also, as redefinitions are not allowed, keep the first values, not
1712         the subsequent ones.
1713         * tests/conflicts.at, tests/existing.at, tests/regression.at: Adjust.
1714
1715 2013-04-22  Akim Demaille  <akim@lrde.epita.fr>
1716
1717         tests: factor duplicate expected warnings
1718         * tests/existing.at: Instead of "t ? abc : aBc", write "a(t?b:B)c".
1719
1720 2013-04-19  Akim Demaille  <akim@lrde.epita.fr>
1721
1722         tests: enable -Wsign-compare and fix corresponding warnings
1723         -Wsign-compare was disabled for bison's own code, following gnulib's
1724         approach.  However, the generated parsers should not trigger such
1725         warnings.
1726
1727         Reported by Efi Fogel.
1728         http://lists.gnu.org/archive/html/help-bison/2013-04/msg00018.html
1729
1730         See also http://stackoverflow.com/questions/16101062 for the weird
1731         "-(unsigned)i" piece of code.
1732
1733         * configure.ac (warn_tests): Enable -Wsign-compare.
1734         * data/location.cc (position::add_): New.
1735         (position::lines, position::columns): Use it.
1736         * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): Fix signedness issues.
1737
1738 2013-04-18  Akim Demaille  <akim@lrde.epita.fr>
1739
1740         muscle: check more cases of %define variables with code values
1741         * data/bison.m4 (b4_percent_define_check_kind): Fix overquotation.
1742         (api.location.type, api.position.type): Check they have code values here.
1743         * data/c++.m4 (api.location.type): No longer checked here.
1744         (parser_class_name): Check it here.
1745         * data/java.m4 (api.value.type, init_throws, lex_throws, parser_class_name)
1746         (throws, annotations, extends, implements): Check they have code values.
1747         * doc/bison.texi: Fix every incorrect occurrence of %define.
1748         Document the additional syntax for %define: code values.
1749         Document the additional syntax for -D/-F: string and code values.
1750         * tests/calc.at, tests/headers.at, tests/input.at, tests/java.at,
1751         * tests/local.at: Fix dependencies.
1752
1753 2013-04-18  Akim Demaille  <akim@lrde.epita.fr>
1754
1755         regen
1756
1757 2013-04-18  Akim Demaille  <akim@lrde.epita.fr>
1758
1759         parser: do not convert $ and @ in code values of %define variables
1760         * src/parse-gram.y (value: "{...}"): Just strip the braces, but pass
1761         the value as is.
1762
1763 2013-04-18  Akim Demaille  <akim@lrde.epita.fr>
1764
1765         parser: no longer use the "braceless" non-terminal
1766         The purpose of this symbol was only to factor function calls.  As a
1767         result the actions were indeed simpler, but the grammar was somewhat
1768         uselessly obfuscated.  Get rid of this symbol, but introduce functions
1769         to simplify dependencies.
1770
1771         There is no (intended) changes of behavior here.
1772
1773         * src/parse-gram.y (strip_braces, translate_code(
1774         (translate_code_braceless): New.
1775         (braceless): Remove, use "{...}" instead, and one of the previous
1776         functions depending on the context.
1777         (STRING, "%{...%}", EPILOGUE): Declare as <code>, instead of <chars>,
1778         the difference between both is useless (well, I couldn't make sense of
1779         it, even after having read the initial commit that introduced them).
1780         (%union): Remove the now useless "chars" type.
1781         Adjust the printers.
1782         * src/scan-gram.l: Adjust.
1783
1784 2013-04-18  Akim Demaille  <akim@lrde.epita.fr>
1785
1786         regen
1787
1788 2013-04-18  Akim Demaille  <akim@lrde.epita.fr>
1789
1790         style: avoid %{...%} in our parser
1791         * src/parse-gram.y (%{...%}): Split in %code and %code requires.
1792         * src/location.h: Add missing includes for self containedness.
1793
1794 2013-04-18  Akim Demaille  <akim@lrde.epita.fr>
1795
1796         style: use %code for local function declarations in our parser
1797         * src/parse-gram.y (version_check, gram_error, char_name, lloc_default):
1798         Move their prototypes from %{...%} to %code.
1799         (YYLLOC_DEFAULT, YY_LOCATION_PRINT): Move from %{...%} to %code.
1800         (current_lhs): Move its implementation to the epilogue.
1801
1802 2013-04-16  Akim Demaille  <akim@lrde.epita.fr>
1803
1804         regen
1805
1806 2013-04-16  Akim Demaille  <akim@lrde.epita.fr>
1807
1808         muscle: check the kind of api.prefix, api.location.type
1809         * data/bison.m4: Check api.prefix.
1810         * data/c++.m4: Check api.location.type.
1811         * doc/bison.texi: Fix uses of api.value.type, api.prefix, api.location.type.
1812         Document {...} values for %define.
1813         * src/parse-gram.y: Fix use of api.prefix.
1814         * tests/calc.at: Fix uses of api.location.type.
1815         * tests/input.at: Check api.prefix, and api.location.type.
1816
1817 2013-04-15  Akim Demaille  <akim@lrde.epita.fr>
1818
1819         maint: post-release administrivia
1820         * NEWS: Add header line for next release.
1821         * .prev-version: Record previous version.
1822         * cfg.mk (old_NEWS_hash): Auto-update.
1823
1824 2013-04-15  Akim Demaille  <akim@lrde.epita.fr>
1825
1826         version 2.7.1
1827         * NEWS: Record release date.
1828
1829 2013-04-15  Akim Demaille  <akim@lrde.epita.fr>
1830
1831         regen
1832
1833 2013-04-15  Akim Demaille  <akim@lrde.epita.fr>
1834
1835         muscle: enforce definition syntax for keyword variables
1836         * src/muscle-tab.c (muscle_percent_define_get_kind)
1837         (muscle_percent_define_check_kind): New.
1838         (muscle_percent_define_default): Variables with a default value are
1839         of "keyword" kind.
1840         (muscle_percent_define_flag_if, muscle_percent_define_check_values):
1841         Check that the variable is of keyword kind.
1842         * data/bison.m4: Likewise, but in M4.  That is to say...
1843         (b4_percent_define_default): Define the kind when the variable is undefined.
1844         (b4_percent_define_check_kind): Use a better error message.
1845         (_b4_percent_define_check_values, _b4_percent_define_check_values):
1846         Former "enum" variables should be defined using the keyword syntax.
1847         * doc/bison.texi: Update.
1848         A couple of fixes.
1849         * tests/input.at (%define keyword variables): New.
1850
1851 2013-04-15  Akim Demaille  <akim@lrde.epita.fr>
1852
1853         muscle: let -D/-F support the three kinds of %define variable values
1854         See http://lists.gnu.org/archive/html/bison-patches/2013-04/msg00012.html
1855
1856         * src/getargs.c (getargs): Recognize {value} and "value" for -D and -F.
1857
1858 2013-04-15  Akim Demaille  <akim@lrde.epita.fr>
1859
1860         muscle: minor refactoring
1861         * src/muscle-tab.c (muscle_percent_define_default): Reduce the scopes.
1862
1863 2013-04-15  Akim Demaille  <akim@lrde.epita.fr>
1864
1865         muscle: minor simplification which uncovers a missing warning
1866         * src/muscle-tab.c (muscle_percent_define_ensure): Discover the virtues
1867         of || to factor conditionals.
1868         * NEWS: As api.pure is no longer flagged as "used" by accident,
1869         we now have warnings for useless definitions.
1870         * tests/calc.at: So remove api.pure settings when running C++ tests,
1871         since C++ skeletons use a pure interface.
1872
1873 2013-04-15  Akim Demaille  <akim@lrde.epita.fr>
1874
1875         muscle: factor the field retrieval
1876         * src/muscle-tab.c (muscle_percent_define_get_raw): New.
1877         Use it where appropriate.
1878         (location_decode): No longer fetch the value from the table,
1879         take the value as argument.
1880
1881 2013-04-15  Akim Demaille  <akim@lrde.epita.fr>
1882
1883         muscle: factor the handling of used variables
1884         * src/muscle-tab.c (muscle_percent_define_use): New, corresponding
1885         to b4_percent_define_use.
1886         Use it where appropriate.
1887
1888 2013-04-15  Akim Demaille  <akim@lrde.epita.fr>
1889
1890         muscle: factor the computation of variable names
1891         * src/muscle-tab.c (muscle_name): New.
1892         Use it.
1893         Propagate "uniqstr" as value type instead of plain "char const *".
1894
1895 2013-04-15  Akim Demaille  <akim@lrde.epita.fr>
1896
1897         muscle: factor the kind check in M4
1898         * data/bison.m4 (b4_percent_define_check_kind): New.
1899         Use it to check api.token.prefix.
1900         * data/c++.m4: Check the kind of api.namespace.
1901         * doc/bison.texi: Update a reference to former 'namespace' variable.
1902         * tests/input.at ("%define" code variables): Check api.namespace.
1903
1904 2013-04-15  Akim Demaille  <akim@lrde.epita.fr>
1905
1906         muscle: factor conditionals on defined %define variables
1907         * data/bison.m4 (b4_percent_define_ifdef_): New.
1908         Use it where appropriate.
1909
1910 2013-04-11  Akim Demaille  <akim@lrde.epita.fr>
1911
1912         api.token.prefix: use code values
1913         * data/bison.m4: Remove useless (and incorrect: m4_* instead of b4_*)
1914         default assignment to api.token.prefix.
1915         Check that api.token.prefix is assigned code.
1916         * tests/input.at (%define code variables): New test.
1917         * NEWS, doc/bison.texi, tests/c++.at, tests/calc.at,
1918         * tests/java.at, tests/local.at: Adjust to use braces.
1919
1920 2013-04-11  Akim Demaille  <akim@lrde.epita.fr>
1921
1922         c++: fix several issues with locations
1923         Reported by Daniel FrużyÅ„ski.
1924         http://lists.gnu.org/archive/html/bug-bison/2013-02/msg00000.html
1925
1926         * data/location.cc (position::columns, position::lines): Check for
1927         underflow.
1928         Fix some weird function signatures.
1929         (location): Accept signed integers as arguments where appropriate.
1930         Add operator- and operator+=.
1931         * doc/bison.texi (C++ position, C++ location): Various fixes
1932         and completion.
1933         * tests/c++.at (C++ Locations): New tests.
1934
1935 2013-04-11  Akim Demaille  <akim@lrde.epita.fr>
1936
1937         muscles: be sure that %code snippets are not glue together on a single line
1938         Recently "braceless" in the parser was changed so that an eol was no
1939         longer added to the value.  This is not correct when a %code is used
1940         multiple times, because the syncline of the next snippet might be
1941         appended to the last (and not ended) line of the previous snippet.
1942
1943         * src/muscle-tab.h (muscle_grow): Make it private.
1944         * src/muscle-tab.c (muscle_grow): Accept a fourth argument: a required
1945         terminator.
1946         Adjust callers.
1947         * tests/input.at (Multiple %code): New.
1948
1949 2013-04-11  Akim Demaille  <akim@lrde.epita.fr>
1950
1951         style: fix comments
1952         * tests/actions.at: Fix incorrect "prototype".
1953
1954 2013-04-10  Akim Demaille  <akim@lrde.epita.fr>
1955
1956         Merge remote-tracking branch 'origin/maint'
1957         * origin/maint:
1958           glr.cc: fix a clang warning
1959           maint: update copyright years
1960           build: fix VPATH issue
1961           build: avoid clang's colored diagnostics in the test suite
1962           tests: please clang and use ".cc", not ".c", for C++ input
1963           gnulib: update
1964           skeletons: avoid empty switch constructs
1965           lalr1.cc: fix compiler warnings
1966           yacc.c: do not use __attribute__ unprotected
1967           tests: style changes
1968
1969 2013-04-09  Akim Demaille  <akim@lrde.epita.fr>
1970
1971         api.value.type: use keyword/brace values
1972         Suggested by Joel E. Denny.
1973         http://lists.gnu.org/archive/html/bison-patches/2013-03/msg00016.html
1974
1975         * data/bison.m4 (b4_percent_define_get_kind): New.
1976         (b4_variant_flag): Check that api.value.type is defined as the 'variant'
1977         keyword value.
1978         * data/c.m4 (_b4_value_type_setup_keyword): New.
1979         (b4_value_type_setup): Use it to simplify reading.
1980         Use b4_define_silent.
1981         Decode api.value.type, including its type.
1982         (b4_value_type_define): Likewise.
1983         * data/c++.m4 (b4_value_type_declare): Adjust the decoding of api.value.type,
1984         taking its kind into account.
1985         * doc/bison.texi: Adjust all the examples to the new syntax.
1986         * NEWS: Ditto.
1987         * tests/types.at: Adjust
1988
1989 2013-04-09  Akim Demaille  <akim@lrde.epita.fr>
1990
1991         api.value.type: diagnose guaranteed failure with --yacc
1992         Instead of generating invalid C code, generate an error when --yacc and
1993         '%define api.value.type union' are used together.
1994
1995         * data/bison.m4: Issue an error in this case.
1996         * tests/types.at (%yacc vs. %define api.value.type union): New, check this
1997         error.
1998         * doc/bison.texi (Type Generation): Document it.
1999         * tests/output.at: Check that '-o y.tab.c' and '-y' behave equally
2000         wrt generated file names.
2001         * NEWS (Use of YACC='bison -y'): New.
2002         Promote the use of 'bison -o y.tab.c'.
2003
2004 2013-04-09  Akim Demaille  <akim@lrde.epita.fr>
2005
2006         doc: style changes
2007         * doc/bison.texi (Destructor Decl, Printer Decl): Group series of %token
2008         and %type together.
2009
2010 2013-04-09  Akim Demaille  <akim@lrde.epita.fr>
2011
2012         doc: display locations in error as recommended by GNU Coding Standards
2013         * doc/bison.texi (Actions and Locations): here.
2014
2015 2013-04-09  Akim Demaille  <akim@lrde.epita.fr>
2016
2017         doc: api.value.type union
2018         * doc/bison.texi (Type Generation): New section.
2019         (Multi-function Calc): Convert to use api.value.type=union.
2020
2021 2013-04-09  Akim Demaille  <akim@lrde.epita.fr>
2022
2023         doc: move the section about "%union" where types are discussed
2024         * doc/bison.texi (Union Decl): Move to...
2025         (Defining Language Semantics): here.
2026
2027 2013-04-09  Akim Demaille  <akim@lrde.epita.fr>
2028
2029         doc: deprecate #define YYSTYPE in favor of %define api.value.type
2030         * doc/bison.texi: Convert examples with YYSTYPE to use api.value.type.
2031         Deprecate YYSTYPE.
2032
2033 2013-04-09  Akim Demaille  <akim@lrde.epita.fr>
2034
2035         value type: accept "->" in type tags
2036         Provide a means to dereference pointers when defining tags.  One
2037         example could be:
2038
2039           %code requires
2040           {
2041             typedef struct ListElementType
2042             {
2043               union value
2044               {
2045                 int intVal;
2046                 float floatVal;
2047                 char* charptrVal;
2048               } value;
2049
2050               struct ListElementType* next;
2051             } ListElementType;
2052           }
2053
2054           %union
2055           {
2056             ListElementType* list;
2057           }
2058
2059           %token <list->value.charptrVal> STRING
2060           %token <list->value.intVal> INTEGER
2061           %token <list->value.floatVal> REAL
2062           %type <list> ElementList LiteralType
2063
2064         * src/scan-code.l, src/scan-gram.l: Accept "->" in tags.
2065         * tests/types.at: Add more test cases to cover this case.
2066
2067 2013-04-09  Akim Demaille  <akim@lrde.epita.fr>
2068
2069         style: simplify the scanning of type tags
2070         * src/scan-gram.l: Remove the rule for simple tags: the "complex" case
2071         subsumes it.  It was more efficient, but duplicated the code for a
2072         negligible benefit.
2073
2074 2013-04-09  Akim Demaille  <akim@lrde.epita.fr>
2075
2076         api.value.type: implement proper support, check, and document
2077         * data/c.m4 (b4_symbol_type_register, b4_type_define_tag)
2078         (b4_symbol_value_union, b4_value_type_setup_union)
2079         (b4_value_type_setup_variant, b4_value_type_setup):
2080         New.
2081         (b4_value_type_define): Use it to set up properly the type.
2082         Handle the various possible values of api.value.type.
2083         * data/c++.m4 (b4_value_type_declare): Likewise.
2084         * data/lalr1.cc (b4_value_type_setup_variant): Redefine.
2085
2086         * tests/types.at: New.
2087         Exercise all the C/C++ skeletons with different types of
2088         api.value.type values.
2089         * tests/local.mk, tests/testsuite.at: Use it.
2090
2091         * doc/bison.texi (%define Summary): Document api.value.type.
2092         * NEWS: Advertise it, together with api.token.constructor.
2093
2094 2013-04-09  Akim Demaille  <akim@lrde.epita.fr>
2095
2096         m4: allow the definition of side-effect only macros
2097         * data/bison.m4 (b4_divert_kill, b4_define_silent): New.
2098         * data/c.m4: Comment change.
2099
2100 2013-04-09  Akim Demaille  <akim@lrde.epita.fr>
2101
2102         variant: fix inconsistent quotation
2103         * data/variant.hh (b4_char_sizeof): De-overquote.
2104         (b4_value_type_declare): De-underquote.
2105
2106 2013-04-09  Akim Demaille  <akim@lrde.epita.fr>
2107
2108         m4: style changes in error messages
2109         * data/bison.m4: Use $0 to denote the current macro's name.
2110
2111 2013-04-08  Akim Demaille  <akim@lrde.epita.fr>
2112
2113         glr.cc: fix a clang warning
2114         * data/glr.cc (b4_epilogue): Be sure to end with an end-of-line,
2115         so that the file does end with one.
2116
2117 2013-04-08  Akim Demaille  <akim@lrde.epita.fr>
2118
2119         maint: update copyright years
2120         Run "make update-copyright".
2121
2122 2013-04-08  Akim Demaille  <akim@lrde.epita.fr>
2123
2124         build: fix VPATH issue
2125         * Makefile.am (update-b4-copyright, update-package-copyright-year): Fix
2126         path to build-aux.
2127
2128 2013-04-08  Akim Demaille  <akim@lrde.epita.fr>
2129
2130         build: avoid clang's colored diagnostics in the test suite
2131         The syncline tests, which try to recognize compiler diagnostics,
2132         are confused by escapes for colors.
2133
2134         * configure.ac (warn_tests): New, to factor the warnings for both
2135         C and C++ tests.
2136         Add -fno-color-diagnostics to it.
2137         * tests/local.at (AT_TEST_TABLES_AND_PARSE): Do not remove glue
2138         together compiler flags.
2139
2140 2013-04-08  Akim Demaille  <akim@lrde.epita.fr>
2141
2142         tests: please clang and use ".cc", not ".c", for C++ input
2143         When fed with foo.c, clang++ 3.2 answers:
2144
2145           clang: error: treating 'c' input as 'c++' when in C++ mode,
2146                         this behavior is deprecated
2147
2148         * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use *.cc and *.hh
2149         for C++.
2150
2151 2013-04-08  Akim Demaille  <akim@lrde.epita.fr>
2152
2153         gnulib: update
2154
2155 2013-04-08  Akim Demaille  <akim@lrde.epita.fr>
2156
2157         skeletons: avoid empty switch constructs
2158         Reported by Rob Conde.
2159         http://lists.gnu.org/archive/html/bug-bison/2013-03/msg00003.html
2160
2161         * data/c.m4 (b4_symbol_actions): Rename as...
2162         (_b4_symbol_actions): this.
2163         (b4_symbol_actions): New wrapper.
2164         Do not emit empty switches.
2165         Adjust all b4_symbol_actions callers.
2166
2167 2013-04-08  Akim Demaille  <akim@lrde.epita.fr>
2168
2169         lalr1.cc: fix compiler warnings
2170         Reported by Rob Conde.
2171         http://lists.gnu.org/archive/html/bug-bison/2013-03/msg00003.html
2172
2173         * data/stack.hh (operator=, stack(const stack&)): Make this class
2174         uncopyable, i.e., "undefine" these operators: make them private and
2175         don't implement them.
2176         (clear): New.
2177         * data/lalr1.cc: Use it instead of an assignment.
2178         (parser): Make this class uncopyable.
2179
2180 2013-04-08  Akim Demaille  <akim@lrde.epita.fr>
2181
2182         yacc.c: do not use __attribute__ unprotected
2183         Reported by Victor Khomenko.
2184         http://lists.gnu.org/archive/html/bug-bison/2013-04/msg00001.html
2185
2186         * data/glr.c (YYUSE, __attribute__): Fuse their definition into...
2187         * data/c.m4 (b4_attribute_define): this new macro.
2188         * data/yacc.c, data/glr.c: Use it.
2189
2190 2013-04-05  Akim Demaille  <akim@lrde.epita.fr>
2191
2192         api.namespace: demonstrate and use {...} values instead of "..." values
2193         * tests/c++.at, tests/input.at: Use "%define api.namespace {foo}" instead
2194         of using quotes.
2195         * tests/local.at (AT_SETUP_STRIP, AT_NAME_PREFIX): Recognize uses of
2196         braces instead of quotes.
2197         * doc/bison.texi: Use braces for api.namespace's values.
2198
2199 2013-04-05  Akim Demaille  <akim@lrde.epita.fr>
2200
2201         grammar: do not add a \n at the end of blocks of code
2202         Now that we use "braceless" (which is {...} blocks of code with
2203         initial and final braces stripped) to denote "short" values (such as
2204         api.namespaces), the added end-of-line is a nuisance.  As a matter of
2205         fact, this extra-safety was useless, as every expansion of "braceless"
2206         (aka, "user code") is followed by an end of line.
2207
2208         * src/parse-gram.y, src/parse-gram.c (braceless): Instead of replacing
2209         the final brace by \n, just delete the brace.
2210
2211 2013-04-04  Akim Demaille  <akim@lrde.epita.fr>
2212
2213         regen
2214
2215 2013-04-04  Akim Demaille  <akim@lrde.epita.fr>
2216
2217         grammar: record the kind of %define variable values
2218         Provide a means to tell the difference between "keyword" values (e.g.,
2219         %define api.pull both), "string" values (e.g., %define file.name
2220         "foo"), and "code" values (e.g., %define api.namespace {calc}).
2221
2222         Suggested by Joel E. Denny.
2223         http://lists.gnu.org/archive/html/bison-patches/2013-03/msg00016.html
2224
2225         * src/muscle-tab.h, src/muscle-tab.c (muscle_kind, muscle_kind_new)
2226         (muscle_kind_string): New.
2227         (muscle_percent_define_insert): Take the kind as new argument.
2228         Insert it in the muscle table.
2229         Adjust callers.
2230         * src/getargs.c: Adjust callers.
2231         * src/parse-gram.y: Ditto.
2232         (content.opt): Remove, replaced by...
2233         (value): this new non-terminal, whose semantics value is stored
2234         in the new "value" union member.
2235         Provide a printer.
2236         Support values in braces in additions to keyword and string values.
2237
2238         fuse me
2239
2240 2013-04-04  Akim Demaille  <akim@lrde.epita.fr>
2241
2242         style: fix comments
2243         * src/muscle-tab.c (muscle_percent_define_ensure): Update obsolete
2244         comments.
2245
2246 2013-04-04  Akim Demaille  <akim@lrde.epita.fr>
2247
2248         regen
2249
2250 2013-04-04  Akim Demaille  <akim@lrde.epita.fr>
2251
2252         grammar: style changes
2253         * src/parse-gram.y (PARAM_TYPE): Remove useless typedef guard.
2254         There's a header guard.
2255         Use 'yyo' with %printer.
2256         Use a consistent style for %union one-liners.
2257
2258 2013-04-04  Akim Demaille  <akim@lrde.epita.fr>
2259
2260         grammar: split %union to group together related aspects
2261         * src/parse-gram.y (INT): Fuse the %type and %token declaration.
2262         Move its %union right before its introduction.
2263         (%union): Split in several %unions, right before their use.
2264
2265 2013-04-04  Akim Demaille  <akim@lrde.epita.fr>
2266
2267         muscle: refactor
2268         * src/muscle-tab.c (muscle_lookup, muscle_entry_new): New.
2269         (muscle_insert, muscle_grow, muscle_find_const, muscle_find): Use them.
2270
2271 2013-04-03  Akim Demaille  <akim@lrde.epita.fr>
2272
2273         style: comment changes
2274         * src/muscle-tab.c: Move the documentation of public functions to...
2275         * src/muscle-tab.h: here.
2276         Fix comment consistency issues.
2277
2278 2013-04-03  Akim Demaille  <akim@lrde.epita.fr>
2279
2280         muscle: minor refactoring
2281         * src/muscle-tab.h (MUSCLE_INSERT_C_STRING): Use MUSCLE_INSERT_STRING.
2282
2283 2013-03-06  Akim Demaille  <akim@lrde.epita.fr>
2284
2285         regen
2286
2287 2013-03-06  Valentin Tolmer  <nitnelave1@gmail.com>
2288
2289         gram: correct token numbering in precedence declarations
2290         In a precedence declaration, when tokens are declared with a litteral
2291         character (e.g., 'a') or with a identifier (e.g., B), Bison behaved
2292         differently: the litteral tokens would be numbered first, and then the
2293         other ones, leading to the following grammar:
2294
2295           %right A B 'c' 'd'
2296
2297         being numbered as such: 'c' 'd' A B.
2298
2299         * src/parse-gram.y (symbol.prec): Set the symbol number when reading the
2300         symbols.
2301         * tests/conflicts.at (Token declaration order: literals vs. identifiers):
2302         New.
2303
2304 2013-03-04  Akim Demaille  <akim@lrde.epita.fr>
2305
2306         maint: update autoconf submodule
2307         * submodules/autoconf: Up to master.
2308         No significant changes in the files we use (m4sugar.m4 and foreach.m4).
2309
2310 2013-03-04  Akim Demaille  <akim@lrde.epita.fr>
2311
2312         diagnostics: no longer include the yacc category in -Wall
2313         It would be a pity to warn the users against Bison features...
2314         http://lists.gnu.org/archive/html/bison-patches/2013-02/msg00107.html
2315
2316         * src/complain.h, src/complain.c (Wall): Disable Wyacc.
2317         (Weverything): New (hidden so far) category which really denotes all
2318         the categories (what used to be Wall).
2319         (warnings_args, warnings_types): Adjust.
2320         (warning_argmatch): Now !none = Weverything and conversely, no longer Wall.
2321         * NEWS, doc/bison.texi, src/getargs.c: Adjust the documentation.
2322         * tests/input.at (-Werror is not affected by -Wnone and -Wall): Adjust
2323         by not using a -Wyacc type of warning.
2324
2325 2013-03-04  Akim Demaille  <akim@lrde.epita.fr>
2326
2327         grammar: no longer detect and cure missing semicolon at end of actions
2328         Bison 3.0 is already breaking backward compatibility with other
2329         features.  It is an appropriate time to drop this feature.  Note that
2330         it was disabled when --yacc is passed.  See
2331         http://lists.gnu.org/archive/html/bison-patches/2013-02/msg00102.html
2332
2333         Basically, revert e8cd1ad655bcc704b06fb2f191dc3ac1df32b796.
2334
2335         * src/scan-code.l (braces_level, need_semicolon, in_cpp): Remove.
2336         Remove every rule needed to detect and add missing semicolon.
2337         * tests/actions.at (Fix user actions without a trailing semicolon):
2338         Remove.
2339         * NEWS: Adjust.
2340
2341 2013-03-04  Akim Demaille  <akim@lrde.epita.fr>
2342
2343         build: stop using bison -y
2344         * Makefile.am (YACC): Pass -o y.tab.c, so that ylwrap is happy, and
2345         yet we don't pass --yacc to bison.
2346         (AM_YFLAGS): Disable Yacc warnings.
2347
2348 2013-02-23  Akim Demaille  <akim@lrde.epita.fr>
2349
2350         c++: rename b4_semantic_type_declare as b4_value_type_declare
2351         This is to match the names used in C and api.value.type, even if the
2352         parser actually defines semantic_type.
2353
2354         * data/c++.m4 (b4_semantic_type_declare): Rename as...
2355         (b4_value_type_declare): this.
2356         * data/variant.hh: Likewise.
2357
2358 2013-02-23  Akim Demaille  <akim@lrde.epita.fr>
2359
2360         news: typo
2361         * NEWS: here.
2362
2363 2013-02-23  Akim Demaille  <akim@lrde.epita.fr>
2364
2365         style: space changes in the tests
2366         * tests/local.at: here.
2367
2368 2013-02-22  Akim Demaille  <akim@lrde.epita.fr>
2369
2370         style: formatting changes in the doc
2371         * doc/bison.texi: Use @file where appropriate.
2372
2373 2013-02-19  Akim Demaille  <akim@lrde.epita.fr>
2374
2375         tests: fix invalid C++11 code
2376         * tests/c++.at (Object): Somehow instances of Object were assigned
2377         YY_NULL, which is 0 most of the time (that case passes), but is
2378         nullptr in C++11, and there is nothing in Object to support such an
2379         assignment (failure).  Use 0 as value, and provide the needed
2380         assignment operator.
2381         Also, use a more natural order within the class definition.
2382
2383 2013-02-19  Akim Demaille  <akim@lrde.epita.fr>
2384
2385         tests: fix failures with G++ 4.8 in Flex scanner
2386         * configure.ac (WARN_NO_NULL_CONVERSION_CXXFLAGS): Rename as...
2387         (FLEX_SCANNER_CXXFLAGS): this.
2388         Pass -Wno-zero-as-null-pointer-constant to G++ if it supports it.
2389         * examples/calc++/local.mk: Adjust.
2390
2391 2013-02-19  Akim Demaille  <akim@lrde.epita.fr>
2392
2393         regen
2394
2395 2013-02-19  Akim Demaille  <akim@lrde.epita.fr>
2396
2397         gnulib: update
2398
2399 2013-02-19  Akim Demaille  <akim@lrde.epita.fr>
2400
2401         style: rename variant private members
2402         * data/variant.hh (buffer, tname, as_, raw, align_me): Rename as...
2403         (yybuffer_, yytname_,yyas_, yyraw, yyalign_me): these.
2404
2405 2013-02-19  Akim Demaille  <akim@lrde.epita.fr>
2406
2407         style: space changes
2408         * data/variant.hh: Be sure to leave a space before arguments in function
2409         calls.
2410
2411 2013-02-19  Akim Demaille  <akim@lrde.epita.fr>
2412
2413         variant: fix G++ 4.4 warnings
2414         The changes by Théophile Ranquet about type punning issues need
2415         to be extend to in-place new to please G++ 4.4.7.
2416
2417         * data/variant.hh (variant::as_): New, factors the casts that avoid
2418         compiler warnings.
2419         (as, build): Use them.
2420
2421 2013-02-18  Akim Demaille  <akim@lrde.epita.fr>
2422
2423         news: spell fixes
2424         * NEWS: here.
2425
2426 2013-02-18  Akim Demaille  <akim@lrde.epita.fr>
2427
2428         diagnostics: factor and enhance messages about duplicate rule directives
2429         When reporting a duplicate directive on a rule, point to its first
2430         occurrence:
2431
2432         one.y:11.10-15: error: only one %empty allowed per rule
2433            %empty {} %empty
2434                      ^^^^^^
2435         one.y:11.3-8: previous declaration
2436            %empty {} %empty
2437            ^^^^^^
2438
2439         And consistently discard the second one.
2440
2441         * src/complain.h, src/complain.c (duplicate_directive): New.
2442         * src/reader.c: Use it where appropriate.
2443         * src/symlist.h, src/symlist.c (symbol_list): Add a dprec_location member.
2444         * tests/actions.at: Adjust expected output.
2445
2446 2013-02-18  Akim Demaille  <akim@lrde.epita.fr>
2447
2448         style: no longer use backquotes
2449         * tests/actions.at, tests/atlocal.in, tests/c++.at, tests/calc.at,
2450         * tests/conflicts.at, tests/existing.at, tests/glr-regression.at,
2451         * tests/input.at, tests/java.at, tests/local.at, tests/sets.at,
2452         * tests/synclines.at, doc/bison.texi, lib/libiberty.h, lib/timevar.h:
2453         Use single quotes.
2454
2455 2013-02-18  Akim Demaille  <akim@lrde.epita.fr>
2456
2457         style: no longer use backquotes
2458         * README, REFERENCES, TODO, configure.ac, data/README, data/bison.m4,
2459         * data/c++.m4, data/c.m4, data/java.m4, data/lalr1.cc,
2460         * data/lalr1.java, data/yacc.c, doc/local.mk, etc/bench.pl.in,
2461         * src/conflicts.c, src/files.c, src/getargs.c, src/gram.h, src/lalr.c,
2462         * src/location.c, src/location.h, src/muscle-tab.c, src/muscle-tab.h,
2463         * src/output.c, src/parse-gram.c, src/parse-gram.y, src/print-xml.c,
2464         * src/print.c, src/reader.c, src/reduce.c, src/scan-skel.l,
2465         * src/symtab.h, src/system.h, src/tables.c:
2466         Use single quotes, as currently recommended by the GNU Coding Standards.
2467
2468 2013-02-18  Akim Demaille  <akim@lrde.epita.fr>
2469
2470         style: no longer use backquotes in messages
2471         * src/getargs.c (usage): Use single quotes.
2472
2473 2013-02-18  Akim Demaille  <akim@lrde.epita.fr>
2474
2475         doc: use %empty instead of /* empty */
2476         * doc/bison.texi: Change the comments into explicit %empty.
2477
2478 2013-02-18  Akim Demaille  <akim@lrde.epita.fr>
2479
2480         doc: introduce %empty and -Wempty-rule
2481         * doc/bison.texi (Grammar Rules): Make it a @section which
2482         contains...
2483         (Rules Syntax): this new subsection (with the previous contents of
2484         "Grammar Rules".
2485         (Empty Rules): New subsection, extracted from the former
2486         "Grammar Rules".
2487         Document %empty.
2488         (Recursion): New a subsection of "Grammar Rules".
2489         Complete a few index entries.
2490         (Bison Options): Document -Wempty-rule.
2491
2492 2013-02-18  Akim Demaille  <akim@lrde.epita.fr>
2493
2494         report: use %empty to denote empty rules
2495         * src/gram.c (rule_rhs_print): Use %empty for empty rules.
2496         * tests/conflicts.at, tests/regression.at, tests/sets.at: Adjust.
2497
2498 2013-02-18  Akim Demaille  <akim@lrde.epita.fr>
2499
2500         diagnostics: %empty enables -Wempty-rule
2501         * src/complain.h, src/complain.c (warning_is_unset): New.
2502         * src/reader.c (grammar_current_rule_empty_set): If enabled -Wempty-rule,
2503         if not disabled.
2504         * tests/actions.at (Implicitly empty rule): Check this feature.
2505         Also check that -Wno-empty-rule does disable this warning.
2506
2507 2013-02-18  Akim Demaille  <akim@lrde.epita.fr>
2508
2509         -Wempty-rule: diagnose empty rules without %empty
2510         * src/complain.h, src/complain.c (warning_empty_rule, Wempty_rule):
2511         New warning category.
2512         (warnings_args, warnings_types): Adjust.
2513         * src/reader.c (grammar_rule_check): Check the empty rules are
2514         flagged by %empty.
2515         * tests/actions.at (Implicitly empty rule): New.
2516         * tests/existing.at: Add expected warnings.
2517
2518 2013-02-18  Akim Demaille  <akim@lrde.epita.fr>
2519
2520         tests: use %empty
2521         * tests/actions.at, tests/input.at, tests/reduce.at,
2522         * tests/regression.at:
2523         here.
2524
2525 2013-02-18  Akim Demaille  <akim@lrde.epita.fr>
2526
2527         regen
2528
2529 2013-02-18  Akim Demaille  <akim@lrde.epita.fr>
2530
2531         parser: use %empty
2532         Avoid that Bison's own use of "bison -Wall" trigger warnings.
2533
2534         * src/parse-gram.y: Use %empty for every empty rule.
2535
2536 2013-02-18  Akim Demaille  <akim@lrde.epita.fr>
2537
2538         grammar: introduce %empty
2539         Provide a means to explicitly denote empty right-hand sides of rules:
2540         instead of
2541
2542           exp:  { ... }
2543
2544         allow
2545
2546           exp: %empty { ... }
2547
2548         Make sure that %empty is properly used.
2549
2550         With help from Joel E. Denny and Gabriel Rassoul.
2551         http://lists.gnu.org/archive/html/bison-patches/2013-01/msg00142.html
2552
2553         * src/reader.h, src/reader.c (grammar_current_rule_empty_set): New.
2554         * src/parse-gram.y (%empty): New token.
2555         Use it.
2556         * src/scan-gram.l (%empty): Scan it.
2557         * src/reader.c (grammar_rule_check): Check that %empty is properly used.
2558         * tests/actions.at (Invalid uses of %empty, Valid uses of %empty): New.
2559
2560 2013-02-16  Akim Demaille  <akim@lrde.epita.fr>
2561
2562         getargs: minor simplification
2563         * src/getargs.c (flag_argmatch): Simplify the handling of "none".
2564
2565 2013-02-16  Akim Demaille  <akim@lrde.epita.fr>
2566
2567         style: move argument handling of -W into the diagnostics module
2568         This allows to reduce the number of public interfaces.
2569
2570         * src/getargs.c (--yacc): Use warning_argmatch instead of tweaking
2571         directly warnings_flag (which will be private).
2572         (warning_argmatch, warnings_argmatch): Move to...
2573         * src/complain.h, src/complain.c: here.
2574
2575         * src/getargs.h, src/getargs.c (warnings_args, warnings_types): Move to...
2576         * src/complain.c: here, now private.
2577
2578         * src/complain.h (severity, warnings_flag): Move to...
2579         * src/complain.c: here, now private.
2580
2581 2013-02-16  Akim Demaille  <akim@lrde.epita.fr>
2582
2583         diagnostics: revamp the handling of -Werror
2584         Recent discussions with Joel E. Denny
2585         (http://lists.gnu.org/archive/html/bison-patches/2013-02/msg00026.html)
2586         show that it is desirable to tell the difference between an option
2587         that was explicitly disabled with -Wno-foo, as opposed to be left
2588         unset.  The current framework does not allow this.
2589
2590         Instead of having a first int to store which options are enabled, and
2591         another to store which are turned into errors, use an array that for
2592         each warning category tells its status: disabled, unset, warning,
2593         error.
2594
2595         * src/complain.h, src/complain.c (warning_bit): New enum.
2596         (warnings): Use it.
2597         (severity): New enum.
2598         (warnings_flag): Now an array of severity.
2599         (errors_flag): Remove, now done by warnings_flag.
2600         (complain_init): New function, to initialie warnings_flag.
2601         (warnings_are_errors): New Boolean, for -Werror.
2602         * src/complain.c (warning_severity): New.
2603         (warnings_print_categories, complains): Use it.
2604         * src/getargs.c (warning_argmatch): Adjust to use warnings_flag.
2605         (warnings_argmatch): Ditto.
2606         Handle -Werror and -Wno-error here.
2607         (getargs): Adjust.
2608         * src/main.c (main): Call complain_init.
2609         * tests/input.at (Invalid options): Add more corner cases.
2610
2611 2013-02-14  Akim Demaille  <akim@lrde.epita.fr>
2612
2613         options: simplify the handling of -W
2614         * src/getargs.c (warnings_argmatch, warning_argmatch): Simplify by
2615         replacing function arguments with their actual values.
2616         (WARNING_ARGMATCH): Remove, useless.
2617         Adjust callers.
2618
2619 2013-02-14  Akim Demaille  <akim@lrde.epita.fr>
2620
2621         options: don't accept "error=" for -f and -r
2622         * src/getargs.c (warning_argmatch, warnings_argmatch, WARNINGS_ARGMATCH):
2623         New.
2624         Use them for -W/--warning.
2625         They are copied from...
2626         (flag_argmatch, flags_argmatch, FLAGS_ARGMATCH): these.
2627         Simplify by removing the support for "error".
2628         * tests/input.at (Invalid options): New.
2629         * TODO (Laxism in Bison invocation arguments): Remove.
2630
2631 2013-02-14  Akim Demaille  <akim@lrde.epita.fr>
2632
2633         diagnostics: factor the list of warning names
2634         * src/getargs.h, src/getargs.c (warnings_args, warnings_types): Make
2635         them public.
2636         * src/complain.h, src/complain.c (warnings_print_categories): Its
2637         only use outside complain.c was removed in a recent commit, so
2638         make it static.
2639         Simplify its implementation.
2640         Use warnings_args and warnings_types.
2641         * src/muscle-tab.c (muscle_percent_define_check_values): Make it
2642         silent.
2643
2644 2013-02-14  Akim Demaille  <akim@lrde.epita.fr>
2645
2646         diagnostics: no longer pretty-print rules in error messages, carets suffice
2647         * src/gram.c (grammar_rules_useless_report): Let -fcaret handle the
2648         pretty-printing of the guilty rules.
2649         (rule_print): Inline in its only use.
2650         * tests/conflicts.at, tests/existing.at, tests/reduce.at,
2651         * tests/regression.at: Adjust.
2652         * NEWS: Document.
2653
2654 2013-02-14  Akim Demaille  <akim@lrde.epita.fr>
2655
2656         options: no longer document warnings when diagnosing an invalid -W
2657         The argmatch functions accept prefixes of the alternatives (like
2658         getopt does for long options).  Bison uses this to document the
2659         warning categories.  This is troublesome: it duplicates the --help
2660         documentation, it is not gettextized, it is displayed with ugly quotes
2661         (because argmatch uses it to display the list of possible answers),
2662         and it prevents straighforward uses of the tables of valid warning
2663         categories (for instance so that warning diagnostics end with the name
2664         of the warning).
2665
2666         The "hidden" option --trace uses the same trick, but it does not need
2667         to be translated, nor to be described in --help.
2668
2669         * src/getargs.c (warnings_args): Remove pseudo documentation.
2670         Comment changes.
2671
2672 2013-02-11  Akim Demaille  <akim@lrde.epita.fr>
2673
2674         tests: enlarge the allowed duration for calc tests
2675         Hydra "often" fails on this test:
2676
2677         252. calc.at:658: 252. Calculator %glr-parser api.pure
2678         parse.error=verbose %debug %locations %defines api.prefix="calc"
2679         %verbose %yacc %parse-param {semantic_value *result}
2680         %parse-param {int *count} (calc.at:658): FAILED
2681
2682         * tests/calc.at: Give 200s instead of 100s.
2683         Use AT_DEBUG_IF.
2684
2685 2013-02-11  Akim Demaille  <akim@lrde.epita.fr>
2686
2687         debug: improve the display of symbol lists
2688         * src/symtab.c (symbol_print): Remove useless quotes (the symbol already
2689         has quotes).
2690         Prefer fputs.
2691         * src/symlist.c (symbol_list_syms_print): Likewise.
2692         Fix separators.
2693
2694 2013-02-09  Akim Demaille  <akim@lrde.epita.fr>
2695
2696         style: minor changes
2697         * src/complain.c: Space changes.
2698         * src/reader.c: Comment changes.
2699         Avoid && in assertions.
2700         * src/location.c: Move comments to...
2701         * src/location.h: here.
2702         * src/symlist.h, src/symlist.c: Create a pseudo section for members
2703         that apply to the rule.
2704
2705 2013-02-08  Akim Demaille  <akim@lrde.epita.fr>
2706
2707         news: restructure, document variants for C++
2708         * NEWS: here.
2709
2710 2013-02-08  Akim Demaille  <akim@lrde.epita.fr>
2711
2712         c++: api.token.constructor requires api.value.type=variant
2713         Eventually it should also support "union".
2714
2715         * data/glr.cc: Move this check to...
2716         * data/c++.m4: here, as lalr1.cc is affected too.
2717
2718 2013-02-05  Akim Demaille  <akim@lrde.epita.fr>
2719
2720         build: restore C90 compatibility
2721         * src/parse-gram.y, src/parse-gram.c: Don't use // comments.
2722
2723 2013-02-05  Akim Demaille  <akim@lrde.epita.fr>
2724
2725         doc: use @group to improve page breaking
2726         * doc/bison.texi: here.
2727
2728 2013-02-04  Akim Demaille  <akim@lrde.epita.fr>
2729
2730         style: rename internal "stype" as "union_members" for clarity
2731         "stype" is quite unclear, and it also collides with the former %define
2732         variable that had the same name (replaced by api.value.type).
2733
2734         * src/parse-gram.y (stype): Rename as...
2735         (union_members): this.
2736         * data/bison.m4: Adjust.
2737         (b4_user_stype): Rename as...
2738         (b4_user_union_members): this.
2739         * data/c++.m4, data/c.m4: Adjust.
2740         * src/parse-gram.c: regen.
2741
2742 2013-02-04  Akim Demaille  <akim@lrde.epita.fr>
2743
2744         tests: improve the language independance layer
2745         * tests/local.at (_AT_LANG_DISPATCH): New, shamelessly stolen from
2746         Autoconf's _AT_LANG_DISPATCH.
2747         (AT_LANG_DISPATCH): New.
2748         (AT_YYERROR_FORMALS, AT_YYERROR_PROTOTYPE, AT_YYERROR_DECLARE_EXTERN)
2749         (AT_YYERROR_DECLARE, AT_YYERROR_DEFINE, AT_MAIN_DEFINE, AT_COMPILE)
2750         (AT_FULL_COMPILE):
2751         Use AT_LANG_DISPATCH instead of an ad hoc m4_case.
2752
2753 2013-02-04  Akim Demaille  <akim@lrde.epita.fr>
2754
2755         regen
2756
2757 2013-02-04  Akim Demaille  <akim@lrde.epita.fr>
2758
2759         style: space changes in the parser
2760         * src/parse-gram.y: Fix spaces.
2761
2762 2013-02-04  Akim Demaille  <akim@lrde.epita.fr>
2763
2764         parser: use api.pure full
2765         * src/parse-gram.y: Use api.pure full instead of silly macro tricks.
2766
2767 2013-02-04  Akim Demaille  <akim@lrde.epita.fr>
2768
2769         style: use a for loop instead of a while loop, and scope reduction
2770         * src/reader.c (packgram): Improve readability.
2771         The parser calls grammar_current_rule_end at the end of every rhs,
2772         which adds a NULL to separate the rules.  So there is no need to
2773         check whether "p" is non-null before proceeding.
2774
2775 2013-02-01  Theophile Ranquet  <ranquet@lrde.epita.fr>
2776
2777         variants: stylistic change
2778         * data/variant.hh (tname): Respect the GNU Coding Standards for this
2779         pointer's declaration.
2780
2781 2013-02-01  Theophile Ranquet  <ranquet@lrde.epita.fr>
2782
2783         grammar: free the association tracking graph
2784         The graph introduced by Valentin wasn't free'd after use.
2785
2786         * src/symtab.c (assoc_free): New, clear the array of linked lists with...
2787         (linkedlist_free): This, new.
2788         (print_precedence_warnings): Call assoc_free when done.
2789         (print_assoc_warnings): Free used_assoc after use.
2790
2791 2013-02-01  Theophile Ranquet  <ranquet@lrde.epita.fr>
2792
2793         tests: use AT_FULL_COMPILE where possible
2794         * tests/c++.at (C++ Variant-based Symbol, Variants): Here.  Rename the
2795         generated input files to use .y instead of .yy, as a requirement for using
2796         AT_FULL_COMPILE instead of a combination of AT_BISON_CHECK and
2797         AT_BISON_COMPILE_CXX.
2798
2799 2013-02-01  Theophile Ranquet  <ranquet@lrde.epita.fr>
2800
2801         variants: avoid type punning issue
2802         This is based on what is recommended by both Scott Meyers, in 'Effective
2803         C++', and Andrei Alexandrescu and Herb Sutter in 'C++ Coding Standards'.
2804
2805         Use a static_cast on void* rather than directly use a reinterpret_cast,
2806         which can have nefarious effects on objects.  However, even though following
2807         this guideline is good practice in general, I am not quite sure how relevant
2808         it is when applied to conversions from POD to objects.  Actually, it might
2809         very well be the opposite: isn't this exactly what reinterpret_cast is for?
2810         What we really want *is* to transmit the memory map as a series of bytes,
2811         which, if I am correct, falls into the kind of "low level" hack for which
2812         this cast is meant.
2813
2814         In any case, this silences the warning, which will be greatly appreciated by
2815         anyone using variants with a compiler supporting -fstrict-aliasing.
2816
2817         * data/variant.hh (as): Here.
2818         * tests/c++.at (Exception safety, C++ Variant-based Symbols, Variants):
2819         Don't use NO_STRICT_ALIAS_CXXFLAGS (revert commit ddb9db15), as type punning
2820         is no longer an issue.
2821         * tests/atlocal.in, configure.ac (NO_STRICT_ALIAS_CXXFLAGS): Remove
2822         definition.
2823         * examples/local.mk (NO_STRICT_ALIAS_CXXFLAGS): Remove from AM_CXXFLAGS.
2824         * doc/bison.texi: Don't mention type punning issues.
2825
2826 2013-02-01  Theophile Ranquet  <ranquet@lrde.epita.fr>
2827
2828         todo: update
2829         Reformulate and give more details on my thoughts concerning the graphical
2830         visualization, and add an entry about a bug in the options processing for
2831         warnings as errors.
2832
2833         * TODO: Here.
2834
2835 2013-02-01  Akim Demaille  <akim@lrde.epita.fr>
2836
2837         regen
2838
2839 2013-02-01  Akim Demaille  <akim@lrde.epita.fr>
2840
2841         location: pass the location first
2842         * src/location.h, src/location.c (location_print): For consistency
2843         with other data structures and other location_* routines, pass the
2844         location argument first.
2845         * src/complain.c: Adjust.
2846         (location_caret): Likewise.
2847         * src/parse-gram.y: Adjust.
2848
2849 2013-02-01  Akim Demaille  <akim@lrde.epita.fr>
2850
2851         symlist: use the right stream
2852         * src/symlist.c (symbol_list_syms_print): Use "f", not stderr.
2853
2854 2013-01-30  Akim Demaille  <akim@lrde.epita.fr>
2855
2856         tests: put two related tests together
2857         * tests/conflicts.at (Useless associativity warning): Move next
2858         to "Useless precedence warning".
2859
2860 2013-01-30  Akim Demaille  <akim@lrde.epita.fr>
2861
2862         news: name contributors
2863         * NEWS: here.
2864
2865 2013-01-30  Valentin Tolmer  <nitnelave1@gmail.com>
2866
2867         warnings: introduce -Wprecedence
2868         The new warning category "precedence" flags useless precedence and
2869         associativity.  -Wprecedence can now be used, it is disabled by default.
2870         The warnings about precedence and associativity are grouped into one, and
2871         the testsuite was corrected accordingly.
2872
2873         * src/complain.h (warnings): Introduce "precedence".
2874         * src/complain.c (warnings_print_categories): Adjust.
2875         * src/getargs.c (warnings_args, warning_types): Likewise.
2876         * src/symtab.h, src/symtab.c (print_associativity_warnings): Remove.
2877         * src/symtab.h (register_assoc): Correct arguments.
2878         * src/symtab.c (print_precedence_warnings): Print both warnings together.
2879         * doc/bison.texi (Bison options): Document the warnings and provide an
2880         example.
2881         * tests/conflicts.at, tests/existing.at, tests/local.at,
2882         * tests/regression.at: Adapt the testsuite for the new category
2883         (-Wprecedence instead of -Wother where appropriate).
2884
2885 2013-01-30  Akim Demaille  <akim@lrde.epita.fr>
2886
2887         build: avoid clang's colored diagnostics in the test suite
2888         The syncline tests, which try to recognize compiler diagnostics,
2889         are confused by escapes for colors.
2890
2891         * configure.ac (warn_tests): New, to factor the warnings for both
2892         C and C++ tests.
2893         Add -fno-color-diagnostics to it.
2894         * tests/local.at (AT_TEST_TABLES_AND_PARSE): Do not remove glue
2895         together compiler flags.
2896
2897 2013-01-30  Akim Demaille  <akim@lrde.epita.fr>
2898
2899         build: please Clang++ 3.2+ on Flex scanners
2900         Clang++, with -Wall, rejects code generated by Flex (for C scanners):
2901
2902           CXX      examples/calc++/examples_calc___calc__-calc++-scanner.o
2903           In file included from examples/calc++/calc++-scanner.cc:1:
2904           error: implicit conversion of NULL constant to 'bool' [-Werror,-Wnull-conversion]
2905           if ( ! ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : __null) ) {
2906                ~                                                                  ^~~~~~
2907                                                                                   false
2908         * configure.ac (WARN_NO_NULL_CONVERSION_CXXFLAGS): Compute it.
2909         * examples/calc++/local.mk (examples_calc___calc___CXXFLAGS): Use it.
2910
2911 2013-01-30  Valentin Tolmer  <nitnelave1@gmail.com>
2912
2913         grammar: record used associativity and print useless ones
2914         Record which symbol associativity is used, and display useless ones.
2915
2916         * src/symtab.h, src/symtab.c (register_assoc, print_assoc_warnings): New
2917         * src/symtab.c (init_assoc, is_assoc_used): New
2918         * src/main.c: Use print_assoc_warnings
2919         * src/conflicts.c: Use register_assoc
2920         * tests/conflicts.at (Useless associativity warning): New.
2921
2922         Due to the new warning, many tests had to be updated.
2923
2924         * tests/conflicts.at tests/existing.at tests/regression.at:
2925         Add the associativity warning in the expected results.
2926         * tests/java.at: Fix the java calculator's grammar to remove a useless
2927         associativity.
2928         * doc/bison.texi (mfcalc example): Fix associativity to remove
2929         warning.
2930
2931 2013-01-29  Valentin Tolmer  <nitnelave1@gmail.com>
2932
2933         grammar: warn about unused precedence for symbols
2934         Symbols with precedence but no associativity, and whose precedence is
2935         never used, can be declared with %token instead.  The used precedence
2936         relationships are recorded and a warning about useless ones is issued.
2937
2938         * src/conflicts.c (resolve_sr_conflict): Record precedence relation.
2939         * src/symtab.c, src/symtab.h (prec_nodes, init_prec_nodes)
2940         (symgraphlink_new, register_precedence_second_symbol)
2941         (print_precedence_warnings): New.
2942         Record relationships in a graph and warn about useless ones.
2943         * src/main.c (main): Print precedence warnings.
2944         * tests/conflicts.at: New.
2945
2946 2013-01-29  Theophile Ranquet  <ranquet@lrde.epita.fr>
2947
2948         variants: remove the 'built' assertions
2949         When using %define parse.assert, the variants come with additional variables
2950         that are useful for development purposes. One is a Boolean indicating if the
2951         variant is built (to make sure we don't read a non-built variant), and the
2952         other is a string describing the stored type. There is no need to have both of
2953         these, the string is enough.
2954
2955         * data/variant.hh (built): Remove.
2956
2957 2013-01-29  Akim Demaille  <akim@lrde.epita.fr>
2958
2959         style: indentation fixes
2960         * src/parse-gram.y: here.
2961
2962 2013-01-29  Akim Demaille  <akim@lrde.epita.fr>
2963
2964         maint: be sure to neutralize out-of-tree paths from our parser
2965         * tests/bison.in: Adjust to support fixed versions of ylwrap.
2966
2967 2013-01-29  Theophile Ranquet  <ranquet@lrde.epita.fr>
2968
2969         m4: generate a basic_symbol constructor for each symbol type
2970         Recently, there was a slightly vicious bug hidden in the make_ functions:
2971
2972           parser::symbol_type
2973           parser::make_TEXT (const ::std::string& v)
2974           {
2975             return symbol_type (token::TOK_TEXT, v);
2976           }
2977
2978         The constructor for symbol_type doesn't take an ::std::string& as
2979         argument, but a constant variant.  However, because there is a variant
2980         constructor which takes an ::std::string&, this caused the implicit
2981         construction of a built variant.  Considering that the variant argument
2982         for the symbol_type constructor was cv-qualified, this temporary variant
2983         was never destroyed.
2984
2985         As a temporary solution, the symbol was built in two stages:
2986
2987           symbol_type res (token::TOK_TEXT);
2988           res.value.build< ::std::string&> (v);
2989           return res;
2990
2991         However, the solution introduced in this patch contributes to letting
2992         the symbols handle themselves, by supplying them with constructors that
2993         take a non-variant value and build the symbol's own variant with that
2994         value.
2995
2996         * data/variant.hh (b4_symbol_constructor_define_): Use the new
2997         constructors rather than building in a temporary symbol.
2998         (b4_basic_symbol_constructor_declare,
2999         b4_basic_symbol_constructor_define): New macros generating the
3000         constructors.
3001         * data/c++.m4 (basic_symbol): Invoke the macros here.
3002
3003 2013-01-29  Theophile Ranquet  <ranquet@lrde.epita.fr>
3004
3005         c++: minor stylistic changes
3006         * data/c++m4: Remove useless comment lines.
3007         * data/variant.hh (self_type): Use this typedef instead of variant<S>.
3008         (b4_symbol_constructor_define_): Remove commented-out line, and stylistic
3009         change (avoid blank line).
3010
3011 2013-01-29  Akim Demaille  <akim@lrde.epita.fr>
3012
3013         c++: please G++ 4.8 with -O3: type puning issue
3014         * tests/c++.at (Exception safety): Now that this test covers
3015         variants, pass -fno-strict-aliasing to g++.
3016
3017 2013-01-29  Akim Demaille  <akim@lrde.epita.fr>
3018
3019         c++: please G++ 4.8 with -O3: array bounds
3020         * data/c++.m4, data/lalr1.cc (by_state, by_type): Do not use -1 to
3021         denote the absence of value, as GCC then fears that this -1 might
3022         be used to dereference arrays (such as yytname).
3023         Use 0, which corresponds to $accept, which is valueless (the needed
3024         property: the symbol destructor must not try to reclaim the memory
3025         associated with the symbol).
3026
3027 2013-01-29  Akim Demaille  <akim@lrde.epita.fr>
3028
3029         c++: use more explicit types than int
3030         * data/c++.m4 (b4_public_types_declare): Declare token_number_type soon.
3031         Introduce symbol_number_type (wider than token_number_type).
3032         Clarify the requirement that kind_type from by_state and by_type
3033         denote the _input_ type (required by the constructor), not the stored type.
3034         Use symbol_number_type and token_number_type where appropriate, instead
3035         of int.
3036         * data/lalr1.cc: Adjust to these changes.
3037         Propagate "symbol_number_type".
3038         Invoke "type_get ()" instead of read "type" directly.
3039
3040 2013-01-29  Akim Demaille  <akim@lrde.epita.fr>
3041
3042         c++: value_type -> kind_type
3043         * data/c++.m4, data/lalr1.cc (by_type, by_state): Rename 'value_type'
3044         as 'kind_type', as it is clearer.
3045
3046 2013-01-29  Akim Demaille  <akim@lrde.epita.fr>
3047
3048         c++: improve the signature of yysyntax_error_
3049         * data/lalr1.cc: This function is const.
3050         It takes a symbol_number_type.
3051
3052 2013-01-29  Akim Demaille  <akim@lrde.epita.fr>
3053
3054         c++: style changes
3055         * data/lalr1.cc: Formatting changes.
3056         And name changes.
3057
3058 2013-01-28  Akim Demaille  <akim@lrde.epita.fr>
3059
3060         doxygen: upgrade Doxyfile, and complete it
3061         * doc/Doxyfile.in: Let doxygen upgrade it.
3062         (INCLUDE_PATH): Point to lib too.
3063         (PROJECT_BRIEF): New.
3064         (EXCLUDE): Update to reflect the current file hierarchy.
3065
3066 2013-01-28  Akim Demaille  <akim@lrde.epita.fr>
3067
3068         maint: fix syntax-check issues
3069         * cfg.mk: Ignore strcmp in local.at.
3070         * tests/conflicts.at: Use AT_PARSER_CHECK.
3071         * tests/regression.at: Preserve the exit status of the generated parsers.
3072
3073         * tests/local.mk ($(TESTSUITE)): Map @tb@ to a tabulation.
3074         * tests/c++.at, tests/input.at, tests/regression.at: Use @tb@.
3075         * cfg.mk: (space-tab): There are no longer exceptions.
3076
3077 2013-01-28  Akim Demaille  <akim@lrde.epita.fr>
3078
3079         tests: please C90 compilers
3080         * tests/actions.at, tests/conflicts.at: Use /* ... */ comments.
3081         Let "main" return a value.
3082
3083 2013-01-28  Akim Demaille  <akim@lrde.epita.fr>
3084
3085         maint: update todo
3086         * TODO: Remove fixed items.
3087
3088 2013-01-28  Akim Demaille  <akim@lrde.epita.fr>
3089
3090         news: minor improvements
3091         * NEWS: Name some more contributors.
3092         Restructure slightly.
3093
3094 2013-01-28  Akim Demaille  <akim@lrde.epita.fr>
3095
3096         tests: please clang and use ".cc", not ".c", for C++ input
3097         When fed with foo.c, clang++ 3.2 answers:
3098
3099           clang: error: treating 'c' input as 'c++' when in C++ mode,
3100                         this behavior is deprecated
3101
3102         * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use *.cc and *.hh
3103         for C++.
3104
3105 2013-01-28  Akim Demaille  <akim@lrde.epita.fr>
3106
3107         tests: formatting changes
3108         * tests/local.at: Restore proper indentation.
3109
3110 2013-01-28  Theophile Ranquet  <ranquet@lrde.epita.fr>
3111
3112         c++: better inline expansion
3113         Many 'inline' keywords were in the declarations.  They rather belong in
3114         definitions, so move them.
3115
3116         * data/c++.m4 (basic_symbol, by_type): Many inlines here.
3117         * data/lalr1.cc (yytranslate_, yy_destroy_, by_state, yypush_, yypop_): Inline
3118         these as well.
3119         (move): Move the definition outside the struct, where it belongs.
3120
3121 2013-01-28  Akim Demaille  <akim@lrde.epita.fr>
3122
3123         tests: check that using variants is exception safe
3124         * tests/local.at: (Slightly) improve the regexp by escaping '.'
3125         when it denotes a point.
3126         (AT_VARIANT_IF): New.
3127         * tests/c++.at (Exception Safety): Run it for variants too.
3128
3129 2013-01-28  Akim Demaille  <akim@lrde.epita.fr>
3130
3131         tests: remove useless %defines
3132         Many tests were using %defines because C++ skeletons used to require
3133         it.
3134
3135         * tests/actions.at, tests/c++.at, tests/input.at, tests/regression.at:
3136         Remove useless %defines.
3137
3138 2013-01-28  Akim Demaille  <akim@lrde.epita.fr>
3139
3140         c++: remove now-useless operators
3141         Now that symbols behaves properly, we can eliminate special routines
3142         that are no longer needed.
3143
3144         * data/c++.m4, data/glr.cc, data/lalr1.cc, data/variant.hh:
3145         Remove useless assignment operators and copy constructors.
3146         As a consequence, remove useless includes for "abort".
3147
3148 2013-01-28  Akim Demaille  <akim@lrde.epita.fr>
3149
3150         tests: enable support for --debug
3151         * tests/c++.at (Variants): Here.
3152         And remove useless clutter when api.token.constructor is enabled.
3153
3154 2013-01-28  Akim Demaille  <akim@lrde.epita.fr>
3155
3156         c++: revamp the support for variants
3157         The current approach was too adhoc: the symbols were not sufficiently
3158         self-contained, in particular wrt memory management.  The "new"
3159         guideline is the one that should have been followed from the start:
3160         let the symbols handle themslves, instead of leaving their users to
3161         it.  It was justified by the will to avoid gratuitious moves and
3162         copies, but the current approach does not seem to be slower, yet it
3163         will probably be simpler to adjust to support move semantics from
3164         C++11.
3165
3166         The documentation says that the %parse-param are available from the
3167         %destructor.  In retrospect, that was a silly design decision, which
3168         we can break for variants, as its a new feature.  It should be phased
3169         out for non-variants too.
3170
3171         * data/variant.hh: A variant never knows if it stores something or
3172         not, it is up to its users to store this information.
3173         Yet, in parse.assert mode, make sure the empty/filled variants
3174         are properly used.
3175         (b4_symbol_constructor_define_): Don't call directly the symbol
3176         constructor, to save a useless temporary.
3177         * data/stack.hh (push): Steal the pushed value instead of duplicating
3178         it.
3179         This will simplify the callers of push, who handled this "move"
3180         approach themselves.
3181         * data/c++.m4 (basic_symbol): Let -1, as kind, denote the fact that
3182         a symbol is empty.
3183         This is needed for instance when shifting the lookahead: yyla
3184         is given as argument to "push", and its value is then moved on
3185         the stack.  But then yyla must be declared "empty" so that its
3186         destructor won't be called.
3187         (basic_symbol::move): New.
3188         Move the responsibility of calling the destructor from yy_destroy
3189         to ~basic_symbol in the case of variants.
3190         * data/lalr1.cc (stack_symbol_type): Now a derived class from its
3191         previous value, so that we can add a constructor from a symbol_type.
3192         (by_state): State -1 means empty.
3193         (yypush_): Factor, by calling one overload from the other one, and
3194         using the new semantics of stack::push.
3195         No longer reclaim by hand the memory from rhs symbols, since now
3196         that we store objects with proper destructors, they will be reclaimed
3197         automatically.
3198         Conversely, be sure to delete yylhs.
3199         * tests/c++.at (C++ Variant-based Symbols): New "unit" test for
3200         symbols.
3201
3202 2013-01-28  Akim Demaille  <akim@lrde.epita.fr>
3203
3204         c++: formatting and comment changes
3205         * data/c++.m4, data/lalr1.cc, data/stack.hh, data/variant.hh:
3206         Fix indentation.
3207         Fix some comments.
3208
3209 2013-01-27  Valentin Tolmer  <nitnelave1@gmail.com>
3210
3211         tests: add token declaration order test
3212         * tests/conflicts.at: New test.
3213
3214 2013-01-27  Akim Demaille  <akim@lrde.epita.fr>
3215
3216         regen
3217
3218 2013-01-27  Valentin Tolmer  <nitnelave1@gmail.com>
3219
3220         grammar: preserve token declaration order
3221         In a declaration %token A B, the token A is declared before B, but in %left
3222         A B (or with %precedence or %nonassoc or %right), the token B was declared
3223         before A (tokens were declared in reverse order).
3224
3225         * src/symlist.h, src/symlist.c (symbol_list_append): New.
3226         * src/parse-gram.y: Use it instead of symbol_list_prepend.
3227         * tests/input.at: Adjust expectations.
3228
3229 2013-01-25  Akim Demaille  <akim@lrde.epita.fr>
3230
3231         tests: improve test group titles
3232         * tests/local.at (AT_SETUP_STRIP): AT_SETUP does not behave properly
3233         with new-lines in its argument.
3234         Remove them.
3235         Fix the handling of %define with quotes.
3236
3237 2013-01-25  Akim Demaille  <akim@lrde.epita.fr>
3238
3239         c: no longer require stdio.h when locations are enabled
3240         Recent changes (in 2.7) introduced a dependency on both FILE and
3241         fprintf, which are "available" only in %debug mode.  This was to
3242         define yy_location_print_, which is used only in %debug mode by the
3243         parser, but massively used by the test suite to output the locations
3244         in yyerror.
3245
3246         Break this dependency: the test suite should define its own routines
3247         to display the locations.  Eventually Bison will provide the user with
3248         a means to display locations, but not yet.
3249
3250         * data/c.m4 (b4_yy_location_print_define): Use YYFPRINTF instead of
3251         fprintf directly.
3252         * data/yacc.c (b4_yy_location_print_define): Invoke it only in %debug
3253         mode, so that stdio.h is included (needed for FILE*), and YYFPRINTF
3254         is defined.
3255
3256         * tests/local.at (AT_YYERROR_DECLARE, AT_YYERROR_DEFINE): Declare
3257         and define location_print and LOCATION_PRINT.
3258
3259         * tests/actions.at, tests/existing.at, tests/glr-regression.at,
3260         * tests/input.at, tests/named-refs.at, tests/regression.at: Adjust
3261         to use them.
3262         Fix the expected line numbers (as the prologue's length has changed).
3263
3264 2013-01-25  Akim Demaille  <akim@lrde.epita.fr>
3265
3266         c: minor simplification in the debug code
3267         * data/c.m4 (yy_symbol_print): Minor factoring.
3268
3269 2013-01-25  Akim Demaille  <akim@lrde.epita.fr>
3270
3271         c++: display locations as C does
3272         See commit 3804aa260b956dd012adde3894767254422a5fcf.
3273
3274         * data/location.cc (operator<<): Display location exactly as is
3275         done in C skeletons.
3276         * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): Also define
3277         AT_FIRST_LINE, AT_LAST_LINE, AT_FIRST_COLUMN, AT_LAST_COLUMN.
3278         * tests/actions.at (Location Print): Also check C++ skeletons.
3279
3280 2013-01-25  Akim Demaille  <akim@lrde.epita.fr>
3281
3282         tests: highlight empty right-hand sides
3283         * tests/actions.at, tests/c++.at, tests/headers.at,
3284         * tests/input.at: here.
3285
3286 2013-01-25  Akim Demaille  <akim@lrde.epita.fr>
3287
3288         news: prepare for 2.8
3289         * NEWS: Restructure.
3290         Name contributors.
3291
3292 2013-01-21  Akim Demaille  <akim@lrde.epita.fr>
3293
3294         tests: generalize default main for api.namespace
3295         * tests/local.at (AT_NAME_PREFIX): Also match api.namespace.
3296         (AT_MAIN_DEFINE): Take it into account.
3297         * tests/c++.at, tests/headers.at: Use AT_NAME_PREFIX.
3298         (AT_CHECK_NAMESPACE): Rename as...
3299         (AT_TEST): this.
3300
3301 2013-01-21  Akim Demaille  <akim@lrde.epita.fr>
3302
3303         tests: improve factoring of the main function
3304         * tests/local.at (AT_MAIN_DEFINE): If %debug is used, check if
3305         -d/--debug is passed to the generated parser, and enable the traces.
3306         Return exactly the result of yyparse, so that we can check exit code
3307         2 too.
3308         * tests/actions.at, tests/glr-regression.at, tests/regression.at:
3309         Use AT_MAIN_DEFINE, helping AT_BISON_OPTION_PUSHDEFS where needed,
3310         preferably to option -t.
3311
3312 2013-01-21  Akim Demaille  <akim@lrde.epita.fr>
3313
3314         tests: factor the definition of main
3315         With Théophile Ranquet.
3316
3317         * tests/local.at (AT_MAIN_DEFINE): New.
3318         (AT_YYERROR_DEFINE): Improve formatting.
3319         * tests/actions.at, tests/c++.at, tests/conflicts.at,
3320         * tests/glr-regression.at, tests/input.at, tests/regression.at,
3321         * tests/skeletons.at, tests/torture.at: Adjust.
3322         * tests/c++.at: Add missing %skeleton for a PUSHDEFS, and a missing
3323         PUSH/POPDEFS for another test.
3324
3325 2013-01-21  Akim Demaille  <akim@lrde.epita.fr>
3326
3327         tests: minor refactoring
3328         * tests/named-refs.at: Use AT_FULL_COMPILE where applicable.
3329
3330 2013-01-21  Akim Demaille  <akim@lrde.epita.fr>
3331
3332         diagnostics: avoid useless caret stuttering
3333         * src/scan-code.l: When reporting a missing ending ';', don't display
3334         the guilty action twice.
3335
3336 2013-01-21  Theophile Ranquet  <ranquet@lrde.epita.fr>
3337
3338         examples: please clang
3339         * doc/bison.texi (calc++-scanner.ll): Don't output useless yyinput function.
3340
3341 2013-01-21  Theophile Ranquet  <ranquet@lrde.epita.fr>
3342
3343         tests: better silencing of unused argument warnings
3344         input.yy:35:44: error: unused parameter 'msg' [-Werror,-Wunused-parameter]
3345         void yy::parser::error (std::string const& msg)
3346                                                    ^
3347
3348         * tests/c++.at (C++ GLR parser identifier shadowing): Don't name unused
3349         argument, use YYUSE instead of a direct cast to void.
3350
3351 2013-01-21  Theophile Ranquet  <ranquet@lrde.epita.fr>
3352
3353         bench: compatibility for Bison <= 2.7
3354         There used to be a bug in some skeletons, which caused the expansion of
3355         'yylval' and 'yylloc', generating these errors:
3356
3357         input.cc:547:16: error: expected ',' or '...' before '(' token
3358          #define yylval (yystackp->yyval)
3359                         ^
3360         input.yy:29:39: note: in expansion of macro 'yylval'
3361          int yylex (yy::parser::semantic_type *yylval)
3362                                                ^
3363
3364         This bug is fixed by 'skel: better aliasing of identifiers', but a workaround
3365         is useful when benchmarking against older versions of Bison, which are still
3366         affected by the bug.
3367
3368         * etc/bench.pl.in: Rename yylval to yylvalp and yylloc to yyllocp in base
3369         grammar 'list'.
3370
3371 2013-01-15  Theophile Ranquet  <ranquet@lrde.epita.fr>
3372
3373         c++: remove useless inlines
3374         * data/c++.m4 (basic_symbol): Keep 'inline' in the prototypes, but don't
3375         duplicate it in the implementation.
3376         * data/variant.hh (variant): 'inline' is not needed when the implementation is
3377         provided in the class definition.
3378
3379 2013-01-15  Theophile Ranquet  <ranquet@lrde.epita.fr>
3380
3381         c++: m4 stylistic change
3382         * data/c++.m4 (syntax_error): Fix the indentation of 'inline'.
3383
3384 2013-01-14  Theophile Ranquet  <ranquet@lrde.epita.fr>
3385
3386         c++: silence warnings
3387         * data/c++.m4 (basic_symbol<Base>::operator=): Unused parameter.
3388         * tests/c++.at (C++ GLR parser identifier shadowing): Here too.
3389         -
3390
3391 2013-01-14  Theophile Ranquet  <ranquet@lrde.epita.fr>
3392
3393         news: typos
3394         * NEWS: Fix a typo, use YYSTYPE rather than semantic_type.
3395
3396 2013-01-12  Akim Demaille  <akim@lrde.epita.fr>
3397
3398         regen
3399
3400 2013-01-12  Akim Demaille  <akim@lrde.epita.fr>
3401
3402         maint: update copyright years
3403         Suggested by Stefano Lattarini.
3404         Run "make update-copyright".
3405
3406 2013-01-12  Akim Demaille  <akim@lrde.epita.fr>
3407
3408         build: fix VPATH issue
3409         * Makefile.am (update-b4-copyright, update-package-copyright-year): Fix
3410         path to build-aux.
3411
3412 2013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
3413
3414         carets: document default activation
3415         * NEWS: Announce it.
3416         * doc/bison.texi: Adjust.
3417
3418 2013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
3419
3420         carets: show them in more tests
3421         * tests/input.at, tests/named-refs.at: Here.
3422
3423 2013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
3424
3425         carets: activate by default
3426         * src/getargs.c (feature_flag): Here.
3427         * tests/local.at (AT_BISON_CHECK_, AT_BISON_CHECK_NO_XML): Deactivate carets
3428         for the testsuite, by default.
3429         * tests/input.at: Adjust the locations for command line definitions.
3430
3431 2013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
3432
3433         variants: document move and swap
3434         * data/variant.hh (swap): Doc.
3435         (build): Rename as...
3436         (move): This, more coherent naming with clearer meaning.
3437         * data/c++.m4 (move): Adjust.
3438
3439 2013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
3440
3441         c++: privatize variant blind copies
3442         * data/variant.hh (variant, operator=): Make private.
3443         * data/c++.m4 (operator=): New, to avoid needing a definition of that operator
3444         for each class member (such as a possible variant).
3445         * data/glr.cc, data/lalr.cc: Add the necessary include for the abort.
3446
3447 2013-01-11  Akim Demaille  <akim@lrde.epita.fr>
3448
3449         glr.c: fix an unused argument issue
3450         * data/glr.c (yyuserAction): "Use" yyrhslen, as in variant mode, we might
3451         not use it.
3452
3453 2013-01-11  Akim Demaille  <akim@lrde.epita.fr>
3454
3455         glr.c: style changes
3456         * data/glr.c (yyuserAction): Use a size_t for sizes.
3457
3458 2013-01-11  Akim Demaille  <akim@lrde.epita.fr>
3459
3460         c.m4: style fix
3461         * data/c.m4 (b4_parse_param_use): Add missing space before paren.
3462
3463 2013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
3464
3465         skel: better aliasing of identifiers
3466         * data/glr.c, data/yacc.c: Avoid emitting useless defines.
3467         * data/glr.cc: Restore prefixes for epilogue.
3468
3469 2013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
3470
3471         glr.cc: fatal if using api.token.ctor without variants
3472         * data/glr.cc: Here.
3473
3474 2013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
3475
3476         skel: correctly indent switch cases
3477         * data/bison.m4 (b4_type_action_): Here.
3478
3479 2013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
3480
3481         variants: assert changes
3482         * data/variant.hh (swap): More asserts can't hurt. Don't perform useless swaps.
3483         (build): Deactivate problematic asserts, pending further investigation.
3484         (variant): Prohibit copy construction.
3485
3486 2013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
3487
3488         lalr1.cc: use a vector for the symbol stack
3489         * data/lalr1.cc: Adjust includes.
3490         * data/stack.hh (push, pop): Use push_back and pop_back.
3491         (operator []): Access vector from the end.
3492
3493 2013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
3494
3495         lalr1.cc: change symbols implementation
3496         A "symbol" groups together the symbol type (INT, PLUS, etc.), its
3497         possible semantic value, and its optional location.  The type is
3498         needed to access the value, as it is stored as a variant/union.
3499
3500         There are two kinds of symbols. "symbol_type" are "external symbols":
3501         they have type, value and location, and are returned by yylex.
3502         "stack_symbol_type" are "internal symbols", they group state number,
3503         value and location, and are stored in the parser stack.  The type of
3504         the symbol is computed from the state number.
3505
3506         The class template symbol_base_type<Exact> factors the code common to
3507         stack_symbol_type and symbol_type.  It uses the Curiously Recurring
3508         Template pattern so that we can always (static_) downcast to the exact
3509         type.  symbol_base_type features value and location, and delegates the
3510         handling of the type to its parameter.
3511
3512         When trying to generalize the support for variant, a significant issue
3513         was revealed: because stack_symbol_type and symbol_type _derive_ from
3514         symbol_base_type, the type/state member is defined _after_ the value
3515         and location.  In C++ the order of the definition of the members
3516         defines the order in which they are initialized, things go backward:
3517         the value is initialized _before_ the type.  This is wrong, since the
3518         type is needed to access the value.
3519
3520         Therefore, we need another means to factor the common code, one that
3521         ensures the order of the members.
3522
3523         The idea is simple: define two (base) classes that code the symbol
3524         type ("by_type" codes it by its type, and "by_state" by the state
3525         number).  Define basic_symbol<Base> as the class template that
3526         provides value and location support.  Make it _derive_ from its
3527         parameter, by_type or by_state.  Then define stack_symbol_type and
3528         symbol_type as basic_symbol<by_state>, basic_symbol<by_type>.  The
3529         name basic_symbol was chosen by similarity with basic_string and
3530         basic_ostream.
3531
3532         * data/c++.m4 (symbol_base_type<Exact>): Remove, replace by...
3533         (basic_symbol<Base>): which derives from its parameter, one of...
3534         (by_state, by_type): which provide means to retrieve the actual type of
3535         symbol.
3536         (symbol_type): Is now basic_symbol<by_type>.
3537         (stack_symbol_type): Is now basic_symbol<by_state>.
3538         * data/lalr1.cc: Many adjustments.
3539
3540 2013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
3541
3542         bench: add %b directive to use a specific Bison
3543         For example,
3544           $ bench.pl -v '%s lalr1.cc & %d variant & ( %b ~/old-bison/bin/bison
3545             | %b ~/new-bison/bin/bison )' -g list -i 10000
3546
3547         * etc/bench.pl.in: Here.
3548
3549 2013-01-09  Akim Demaille  <akim@lrde.epita.fr>
3550
3551         regen
3552
3553 2013-01-04  Akim Demaille  <akim@lrde.epita.fr>
3554
3555         gnulib: update
3556
3557 2012-12-31  Akim Demaille  <akim@lrde.epita.fr>
3558
3559         doc: use deffn to declare the list of %define variables
3560         * doc/bison.texi (%define Summary): Use @deffn instead of @table, it
3561         spares a lot of width, especially in PDF, and looks nicer in the other
3562         formats too.
3563         It is also more consistent with the rest of the document.
3564
3565 2012-12-31  Akim Demaille  <akim@lrde.epita.fr>
3566
3567         doc: minor completion and fixes
3568         * doc/bison.texi (%define Summary): Provide more history to some
3569         variables.
3570
3571 2012-12-31  Akim Demaille  <akim@lrde.epita.fr>
3572
3573         java: stype is obsoleted by api.value.type
3574         This is consistent with the other %define variable names.
3575
3576         * data/java.m4: Use api.value.type instead of stype.
3577         * doc/bison.texi, NEWS: Document that change.
3578         * src/muscle-tab.c (muscle_percent_variable_update): Provide backward
3579         compatibility.
3580         * tests/java.at: Adjust.
3581
3582 2012-12-31  Akim Demaille  <akim@lrde.epita.fr>
3583
3584         doc: fix html build
3585         * doc/local.mk (bison.html): Fix dependencies.
3586
3587 2012-12-31  Akim Demaille  <akim@lrde.epita.fr>
3588
3589         todo: remove erroneous task
3590         * tests/input.at: Check that there are no warnings about stray $ and @
3591         in the epilogue.
3592         * TODO: Remove the correponding task.
3593
3594 2012-12-31  Akim Demaille  <akim@lrde.epita.fr>
3595
3596         gnulib: update
3597
3598 2012-12-28  Akim Demaille  <akim@lrde.epita.fr>
3599
3600         regen
3601
3602 2012-12-28  Akim Demaille  <akim@lrde.epita.fr>
3603
3604         syncline: one line is enough
3605         So far we were issuing two lines for each syncline change:
3606
3607           /* Line 356 of yacc.c  */
3608           #line 1 "src/parse-gram.y"
3609
3610         This is a lot of clutter, especially when reading diffs, as these
3611         lines change often.  Fuse them into a single, shorter, line:
3612
3613           #line 1 "src/parse-gram.y" /* yacc.c:356  */
3614
3615         * data/bison.m4 (b4_syncline): Issue a single line.
3616         Comment improvements.
3617         (b4_sync_start, b4_sync_end): Issue a shorter comment.
3618         * data/c++.m4 (b4_semantic_type_declare): b4_user_code must be
3619         on its own line as it might start with a "#line" directive.
3620
3621 2012-12-28  Akim Demaille  <akim@lrde.epita.fr>
3622
3623         regen
3624
3625 2012-12-28  Akim Demaille  <akim@lrde.epita.fr>
3626
3627         maint: restore ANSI 89 compliance
3628         * data/bison.m4, src/conflicts.c, src/files.c, src/output.c,
3629         * src/symtab.c: Use /* ... */ comments only.
3630         Declare variables before statements.
3631
3632 2012-12-28  Akim Demaille  <akim@lrde.epita.fr>
3633
3634         graph: minor simplification
3635         * src/gram.c (print_lhs): Use %*s to indent.
3636         * src/print_graph.c (print_lhs): Use obstack_printf.
3637         Became simple enough to be inlined in...
3638         (print_core): here.
3639         Use a "rule*" instead of an index in "rules[]".
3640
3641 2012-12-28  Akim Demaille  <akim@lrde.epita.fr>
3642
3643         closure, gram: add missing const
3644         * src/closure.h, src/closure.c, src/gram.h, src/gram.c: Add some missing
3645         const where appropriate.
3646
3647 2012-12-27  Theophile Ranquet  <ranquet@lrde.epita.fr>
3648
3649         carets: properly display when no line feed is present
3650         * src/location.c (location_caret): finish the line with one whether or not it
3651         is present in input. Rewrite code without getline.
3652         (cleanup_caret): Reset the caret_info global.
3653         * bootstrap.conf: No longer require getline.
3654
3655 2012-12-27  Theophile Ranquet  <ranquet@lrde.epita.fr>
3656
3657         scanner: reintroduce unput for missing end tokens
3658         Unput was no longer used since a POSIX-compatiblity issue with Flex 2.5.31,
3659         which has been adressed in newer versions of Flex.  See this discussion:
3660         <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00029.html>
3661
3662         This partially reverts commit aa4180418fff518198e1b0f2c43fec6432210dc7.
3663
3664         * src/scan-gram.l (unexpected_end): Here.
3665         * tests/input.at: Adjust for new order of error reports.
3666
3667 2012-12-27  Akim Demaille  <akim@lrde.epita.fr>
3668
3669         tables: scope reduction
3670         * src/tables.c (default_goto): Make it easier to understand.
3671
3672 2012-12-27  Akim Demaille  <akim@lrde.epita.fr>
3673
3674         regen
3675
3676 2012-12-27  Akim Demaille  <akim@lrde.epita.fr>
3677
3678         skeletons: fix comments
3679         The commit 38de4e570fdc7c8db9633c3b2054e565d8c1c6b9 underquoted the
3680         content of the comments, which resulted in losing square brackets in
3681         the comments.  Besides, some other invocations were underquoting the
3682         effective arguments.
3683
3684         * data/c.m4 (b4_comment_): Properly quote the comment.
3685         (b4_comment_, b4_comment): Move to...
3686         * data/c-like.m4: here, so that...
3687         * data/java.m4: can use it instead of its own copy.
3688         * data/bison.m4 (b4_integral_parser_tables_map): Fix some comments.
3689
3690         * data/lalr1.cc, data/lalr1.java, data/yacc.c: Comment fixes.
3691
3692         * data/lalr1.cc: Reorder a bit to factor some CPP directives.
3693
3694 2012-12-27  Akim Demaille  <akim@lrde.epita.fr>
3695
3696         maint: which -> whose
3697         Apparently, I was confusing both.
3698
3699         * data/bison.m4, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c:
3700         Use "whose" where appropriate.
3701
3702 2012-12-26  Akim Demaille  <akim@lrde.epita.fr>
3703
3704         tables: scope reduction
3705         * src/tables.c (matching_state): here.
3706
3707 2012-12-26  Akim Demaille  <akim@lrde.epita.fr>
3708
3709         tables: scope reduction
3710         * src/tables.c (token_actions): here.
3711
3712 2012-12-26  Akim Demaille  <akim@lrde.epita.fr>
3713
3714         tables: scope reduction
3715         * src/tables.c (save_row): here.
3716
3717 2012-12-26  Akim Demaille  <akim@lrde.epita.fr>
3718
3719         tables: scope reduction
3720         * src/tables.c (save_column, pack_vector): Reduce the scope to
3721         emphasize the structure of the code.
3722         Rename the returned value "res" to make understanding easier.
3723
3724 2012-12-26  Akim Demaille  <akim@lrde.epita.fr>
3725
3726         tables: use size_t where appropriate
3727         These changes aim at making the code easier to understand.
3728
3729         * src/tables.c (tally): This is a size, always >= 0, so make it
3730         a size_t.
3731
3732 2012-12-26  Akim Demaille  <akim@lrde.epita.fr>
3733
3734         tables: style changes
3735         * src/tables.c: Prefer < to >.
3736         Fix/complete some comments.
3737         Remove useless parens.
3738
3739 2012-12-26  Akim Demaille  <akim@lrde.epita.fr>
3740
3741         skeletons: no longer call yylex via a CPP macro
3742         The YYLEX existed only to support YYLEX_PARAM, which is now removed.
3743         This macro was a nuisance, since incorrect yylex calls where pointed
3744         the macro _use_, instead of its definition.
3745
3746         * data/c.m4 (b4_lex_formals, b4_lex): New.
3747         * data/glr.c, data/yacc.c: Use it.
3748         * data/lalr1.cc (b4_lex): New.
3749         Use it.
3750
3751         squash! skeletons: no longer call yylex via a CPP macro
3752
3753 2012-12-26  Akim Demaille  <akim@lrde.epita.fr>
3754
3755         YYLEX_PARAM: drop support
3756         * data/yacc.c, doc/bison.texi: Remove YYLEX_PARAM support.
3757         * NEWS: Document it.
3758
3759 2012-12-26  Akim Demaille  <akim@lrde.epita.fr>
3760
3761         examples: minor improvements
3762         * examples/variant.yy: Don't use debug_stream(), obsoleted.
3763         Use <*>.
3764
3765 2012-12-26  Akim Demaille  <akim@lrde.epita.fr>
3766
3767         skeletons: factor comments about symbols
3768         * data/variant.hh (b4_char_sizeof_): Rename as...
3769         * data/bison.m4 (b4_symbol_tag_comment): this.
3770         Provide more documentation about b4_symbol_*.
3771
3772 2012-12-26  Akim Demaille  <akim@lrde.epita.fr>
3773
3774         c: improve the definition of public types
3775         * data/c.m4 (b4_token_enum): Improve comments.
3776         (b4_value_type_define, b4_location_type_define): New, extracted
3777         from...
3778         (b4_declare_yylstype): here.
3779         Separate the typedefs from the union/struct definitions.
3780
3781 2012-12-26  Akim Demaille  <akim@lrde.epita.fr>
3782
3783         doc: update variant usage
3784         * doc/bison.texi, examples/variant.yy: Use "%define api.value.type variant",
3785         instead of "%define variant".
3786
3787 2012-12-26  Akim Demaille  <akim@lrde.epita.fr>
3788
3789         tests: check the "%define variant" is deprecated.
3790         * tests/input.at: Rename some AT_SETUP to avoid that
3791         AT_SETUP_STRIP thinks they contain %define directives.
3792         ("%define" backward compatibility): Merge tests together
3793         to speed up the test suite, and to make maintenance easier
3794         (multiple AT_CHECK means multiple runs of the test suite to
3795         be sure to have updated all the error messages).
3796         Check the "%define variant" is properly obsoleted.
3797
3798 2012-12-23  Akim Demaille  <akim@lrde.epita.fr>
3799
3800         %define variables: support value changes in deprecation
3801         * src/muscle-tab.c (define_directive): Be robust to "assignment"
3802         containing '='.
3803         (muscle_percent_variable_update): Upgrade "variant" to "api.value.type".
3804         Support such upgrade patterns.
3805         Adjust callers.
3806
3807         * data/bison.m4: Use api.value.type for variants.
3808         * tests/c++.at: Adjust tests.
3809
3810 2012-12-23  Akim Demaille  <akim@lrde.epita.fr>
3811
3812         diagnostics: treat obsolete %define variable names as obsolete directives
3813         Instead of
3814
3815           warning: deprecated %define variable name: 'namespace', use 'api.namespace' [-Wdeprecated]
3816
3817         display (in -fno-caret mode):
3818
3819           warning: deprecated directive: '%define namespace foo', use '%define api.namespace foo' [-Wdeprecated]
3820
3821         and (in -fcaret mode):
3822
3823           warning: deprecated directive, use '%define api.namespace toto' [-Wdeprecated]
3824            %define namespace toto
3825                    ^^^^^^^^^
3826
3827         This is in preparation of cases where not only the variable is
3828         renamed, but the values are too:
3829
3830           warning: deprecated directive: '%define variant', use '%define api.value.type variant' [-Wdeprecated]
3831
3832         * src/muscle-tab.c (define_directive): New.
3833         (muscle_percent_variable_update): Take the value as argument, and use it
3834         in the diagnostics.
3835         Loop with a pointer instead of an index.
3836         * tests/input.at (%define backward compatibility): Adjust.
3837
3838 2012-12-23  Akim Demaille  <akim@lrde.epita.fr>
3839
3840         diagnostics: factor the deprecated directive message
3841         * src/complain.h, src/complain.c (deprecated_directive): New.
3842         * src/muscle-tab.c: Use it.
3843
3844 2012-12-23  Akim Demaille  <akim@lrde.epita.fr>
3845
3846         variant: produce stable results
3847         Improve the output by ensuring a well defined order for type switches.
3848
3849         * src/uniqstr.h: Style changes for macro arguments.
3850         (UNIQSTR_CMP): Replace by...
3851         (uniqstr_cmp): this.
3852         * src/uniqstr.c (uniqstr_cmp): New.
3853         Produce well defined results.
3854         * src/output.c: Use it.
3855
3856 2012-12-23  Akim Demaille  <akim@lrde.epita.fr>
3857
3858         uniqstr: formatting changes
3859         * src/uniqstr.h: Sort functions by object type.
3860
3861 2012-12-23  Akim Demaille  <akim@lrde.epita.fr>
3862
3863         skeletons: fix an error message
3864         * data/bison.m4 (b4_flag_if): Display the invalid value.
3865
3866 2012-12-23  Akim Demaille  <akim@lrde.epita.fr>
3867
3868         tests: improve titles
3869         * tests/local.at (AT_SETUP_STRIP): New.
3870         (AT_SETUP): Use it to shorten the test titles: remove %defines, %language
3871         and %skeleton whose arguments suffice.
3872         * tests/synclines.at: Use more precise AT_SETUP.
3873
3874 2012-12-23  Akim Demaille  <akim@lrde.epita.fr>
3875
3876         c++: comment changes
3877         * data/c++.m4, data/glr.cc, data/lalr1.cc: Convert some /* ... */
3878         comments to //.
3879
3880 2012-12-23  Akim Demaille  <akim@lrde.epita.fr>
3881
3882         c++: use // comments in the output
3883         This is mostly used for the license header, the synclines, and the
3884         generated tables:
3885
3886         -  /* STOS_[STATE-NUM] -- The (internal number of the) accessing
3887         -     symbol of state STATE-NUM.    */
3888         +  // STOS_[STATE-NUM] -- The (internal number of the) accessing
3889         +  // symbol of state STATE-NUM.
3890            static const unsigned char yystos_[];
3891
3892         * data/c.m4: Comment changes.
3893         (b4_comment_): Expand the text argument.
3894         Before this change, we were actually formatting M4 code as a
3895         C comment, and then expand it.
3896         (b4_comment): Fix the closing of comments: there is no reason to
3897         add the (line) prefix before the closing "*/".
3898         * data/c++.m4 (b4_comment): New.
3899
3900 2012-12-21  Akim Demaille  <akim@lrde.epita.fr>
3901
3902         maint: disable sc_prohibit_test_backticks
3903         * cfg.mk: here.
3904         And fix typos.
3905         Reported by Stefano Lattarini.
3906
3907 2012-12-21  Akim Demaille  <akim@lrde.epita.fr>
3908
3909         maint: more syntax-checks
3910         * cfg.mk (sc_prohibit_tab_based_indentation, sc_prohibit_test_backticks)
3911         (sc_preprocessor_indentation, sc_space_before_open_paren): New,
3912         stolen from Coreutils (2e9f5ca4ebbbdb6a9fa2dd3d5add3f7720a172d7).
3913
3914 2012-12-21  Akim Demaille  <akim@lrde.epita.fr>
3915
3916         debug: no longer generate tabs
3917         * src/closure.c, src/derives.c, src/nullable.c, tests/sets.at: Use
3918         spaces.
3919
3920 2012-12-21  Akim Demaille  <akim@lrde.epita.fr>
3921
3922         style changes: run cppi
3923         Run it in src/ for a start.
3924
3925         * src/AnnotationList.h, src/InadequacyList.h, src/Sbitset.h,
3926         * src/closure.c, src/complain.h, src/flex-scanner.h, src/getargs.h,
3927         * src/gram.h, src/graphviz.h, src/ielr.h, src/location.h,
3928         * src/muscle-tab.h, src/named-ref.h, src/relation.h, src/scan-code.h,
3929         * src/state.h, src/symtab.h, src/system.h, src/uniqstr.h:
3930         Reindent preprocessor directives.
3931
3932 2012-12-21  Akim Demaille  <akim@lrde.epita.fr>
3933
3934         style changes: untabify
3935         * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl, m4/flex.m4,
3936         * tests/glr-regression.at, tests/torture.at: here.
3937
3938 2012-12-21  Akim Demaille  <akim@lrde.epita.fr>
3939
3940         tests: be robust to set -e.
3941         * examples/test (run): here.
3942
3943 2012-12-19  Akim Demaille  <akim@lrde.epita.fr>
3944
3945         variants: prohibit simple copies
3946         The "variant" structure provides a means to store, in a typeless way,
3947         C++ objects.  Manipulating it without provide the type of the stored
3948         content is doomed to failure.  So provide a means to copy in a type
3949         safe way, and prohibit typeless assignments.
3950
3951         * data/c++.m4 (symbol_type::move): New.
3952         * data/lalr1.cc: Use it.
3953         * data/variant.hh (b4_variant_define): Provide variant::copy.
3954         Let variant::operator= abort.
3955         We cannot undefine it, yet, as it is still uses by the implicit
3956         assigment in symbols, which must also be disabled.
3957
3958 2012-12-19  Akim Demaille  <akim@lrde.epita.fr>
3959
3960         variant: more assertions
3961         Equip variants with more checking code.  Provide a means to request
3962         includes.
3963
3964         * data/variant.hh (b4_variant_includes): New.
3965         * data/lalr1.cc: Use it.
3966         * data/variant.hh (variant::built): Define at the end, as a private member.
3967         (variant::tname): New.
3968         Somewhat makes "built" useless, but let's keep both for a start, in
3969         case using "typeinfo" is considered unacceptable in some environments.
3970         Fix some formatting issues.
3971
3972 2012-12-19  Akim Demaille  <akim@lrde.epita.fr>
3973
3974         gnulib: update
3975
3976 2012-12-19  Akim Demaille  <akim@lrde.epita.fr>
3977
3978         skeletons: fix output directives
3979         * data/lalr1.cc, data/location.cc, data/glr.cc: Use b4_output_begin.
3980         Broken during a merge.
3981
3982 2012-12-19  Akim Demaille  <akim@lrde.epita.fr>
3983
3984         yacc.c: style changes
3985         * data/yacc.c (b4_lex_param): Provide arguments with a name.
3986
3987 2012-12-19  Akim Demaille  <akim@lrde.epita.fr>
3988
3989         glr.cc: simplifying the handling of parse/lex params
3990         The fact that glr.cc uses glr.c makes the handling of parse params
3991         more complex, as the parser object of glr.cc must be passed to the
3992         parse function of glr.c.  Yet not all the functions need access to
3993         the parser object.
3994
3995         * data/glr.cc (b4_parse_param_wrap): New.
3996         Use them.
3997
3998 2012-12-19  Akim Demaille  <akim@lrde.epita.fr>
3999
4000         glr: rename lex params
4001         * data/glr.c (b4_lex_param): Rename as...
4002         (b4_lex_formals): this, for consistency.
4003         Provide arguments a name.
4004         (LEX): Adjust.
4005
4006 2012-12-19  Akim Demaille  <akim@lrde.epita.fr>
4007
4008         glr.c: move function declaration earlier
4009         * data/glr.c (yypstack, yypdumpstack): Declare earlier, to make
4010         it easier to call them from other functions.
4011
4012 2012-12-19  Akim Demaille  <akim@lrde.epita.fr>
4013
4014         %define variables: backward compatibility
4015         * src/muscle-tab.c (muscle_percent_variable_update): Accept lex_symbol.
4016         Reported by Roland Levillain.
4017
4018 2012-12-16  Akim Demaille  <akim@lrde.epita.fr>
4019
4020         diagnostics: improve -fcaret for list of accepted values
4021         Instead of
4022
4023           input.y:1.9-21: error: invalid value for %define variable 'api.push-pull': 'neither'
4024            %define api.push_pull "neither"
4025                    ^^^^^^^^^^^^^
4026           input.y:1.9-21:     accepted value: 'pull'
4027            %define api.push_pull "neither"
4028                    ^^^^^^^^^^^^^
4029           input.y:1.9-21:     accepted value: 'push'
4030            %define api.push_pull "neither"
4031                    ^^^^^^^^^^^^^
4032           input.y:1.9-21:     accepted value: 'both'
4033            %define api.push_pull "neither"
4034                    ^^^^^^^^^^^^^
4035
4036         report
4037
4038           input.y:1.9-21: error: invalid value for %define variable 'api.push-pull': 'neither'
4039            %define api.push_pull "neither"
4040                    ^^^^^^^^^^^^^
4041           input.y:1.9-21:     accepted value: 'pull'
4042           input.y:1.9-21:     accepted value: 'push'
4043           input.y:1.9-21:     accepted value: 'both'
4044
4045         * src/complain.h (no_caret): New.
4046         * src/complain.c (error_message): Use it.
4047         * src/muscle-tab.c (muscle_percent_define_check_values): Use it.
4048         * src/scan-skel.l (flag): Ditto.
4049         * tests/input.at: Adjust and check.
4050
4051 2012-12-16  Akim Demaille  <akim@lrde.epita.fr>
4052
4053         skeletons: simplify the handling of default api.location.type
4054         * data/bison.m4 (b4_bison_locations_if): New.
4055         * data/glr.cc, data/lalr1.cc: Use it.
4056
4057 2012-12-16  Akim Demaille  <akim@lrde.epita.fr>
4058
4059         tests: address syntax-check failures
4060         * cfg.mk: Ignore failures in timevar (uses GCC style configuration,
4061         not gnulib's).
4062         * doc/local.mk: Space changes.
4063         * lib/main.c, tests/calc.at: Remove useless HAVE_ tests.
4064
4065 2012-12-15  Akim Demaille  <akim@lrde.epita.fr>
4066
4067         remove duplicate definitions
4068         * src/system.h: here, inherited from a merge.
4069
4070 2012-12-15  Akim Demaille  <akim@lrde.epita.fr>
4071
4072         tests: style changes
4073         * tests/glr-regression.at: Issue yyerror before yylex.
4074
4075 2012-12-15  Akim Demaille  <akim@lrde.epita.fr>
4076
4077         doc: fix dependencies
4078         * doc/local.mk: here.
4079
4080 2012-12-14  Akim Demaille  <akim@lrde.epita.fr>
4081
4082         doc: style fixes
4083         * doc/bison.texi: Add a couple of missing @var and @code.
4084
4085 2012-12-14  Theophile Ranquet  <ranquet@lrde.epita.fr>
4086
4087         doc: fix build dependencies
4088         Suggested by Nick Bowler
4089         <http://lists.gnu.org/archive/html/bug-automake/2012-12/msg00001.html>
4090
4091         * doc/local.mk: Avoid overwriting Automake's rules.
4092
4093 2012-12-14  Akim Demaille  <akim@lrde.epita.fr>
4094
4095         Merge branch 'origin/maint'
4096         * origin/maint:
4097           maint: credit Wojciech Polak
4098           maint: post-release administrivia
4099           version 2.7
4100           yacc.c: scope reduction
4101           tests: C90 compliance
4102           fix C90 compliance
4103           glr.c: scope reduction
4104           gnulib: update
4105
4106 2012-12-14  Theophile Ranquet  <ranquet@lrde.epita.fr>
4107
4108         symtab: add missing initializations
4109         * src/symtab.c (semantic_type_new): Here.
4110
4111 2012-12-14  Theophile Ranquet  <ranquet@lrde.epita.fr>
4112
4113         symtab: fix some leaks
4114         * src/symlist.c (symbol_list_free): Deep free it.
4115         * src/symtab.c (symbols_free, semantic_types_sorted): Free it too.
4116         (symbols_do, sorted): Call by address.
4117
4118 2012-12-14  Theophile Ranquet  <ranquet@lrde.epita.fr>
4119
4120         tests: remove use of PARSE_PARAM
4121         * tests/header.at: Here.
4122
4123 2012-12-13  Akim Demaille  <akim@lrde.epita.fr>
4124
4125         maint: credit Wojciech Polak
4126         * NEWS, THANKS: He is the author of XML support (including XSLTs).
4127
4128 2012-12-12  Akim Demaille  <akim@lrde.epita.fr>
4129
4130         maint: post-release administrivia
4131         * NEWS: Add header line for next release.
4132         * .prev-version: Record previous version.
4133         * cfg.mk (old_NEWS_hash): Auto-update.
4134
4135 2012-12-12  Akim Demaille  <akim@lrde.epita.fr>
4136
4137         version 2.7
4138         * NEWS: Record release date.
4139
4140 2012-12-12  Akim Demaille  <akim@lrde.epita.fr>
4141
4142         yacc.c: scope reduction
4143         * data/yacc.c (yysyntax_error): here.
4144
4145 2012-12-12  Akim Demaille  <akim@lrde.epita.fr>
4146
4147         tests: C90 compliance
4148         * tests/synclines.at: here.
4149
4150 2012-12-12  Akim Demaille  <akim@lrde.epita.fr>
4151
4152         fix C90 compliance
4153         * data/glr.c, src/graphviz.h, src/ielr.c, src/scan-gram.l,
4154         * src/system.h, tests/actions.at, tests/glr-regression.at: Do not
4155         use // comments.
4156         Do not introduce variables after statements.
4157         Provide "main" with a return value.
4158
4159 2012-12-12  Akim Demaille  <akim@lrde.epita.fr>
4160
4161         glr.c: scope reduction
4162         * data/glr.c (yyreportSyntaxError): Reduce the scope of yysize1 (now
4163         yysz).
4164
4165 2012-12-12  Akim Demaille  <akim@lrde.epita.fr>
4166
4167         gnulib: update
4168
4169 2012-12-10  Theophile Ranquet  <ranquet@lrde.epita.fr>
4170
4171         Merge remote-tracking branch 'origin/maint'
4172         * origin/maint:
4173           news: prepare for forthcoming release
4174           doc: explain how mid-rule actions are translated
4175           error: use better locations for unused midrule values
4176           doc: various minor improvements and fixes
4177           tests: ignore more useless compiler warnings
4178           tests: be robust to C being compiled with a C++11 compiler
4179           build: beware of Clang++ not supporting POSIXLY_CORRECT
4180           maint: post-release administrivia
4181           version 2.6.90
4182           build: fix syntax-check error.
4183           cpp: simplify the Flex version checking macro
4184           news: improve the carets example and fix a typo
4185           cpp: improve the Flex version checking macro
4186           carets: improve the code
4187           maint: update news
4188           build: keep -Wmissing-declarations and -Wmissing-prototypes for modern GCCs
4189           build: drop -Wcast-qual
4190           gnulib: update
4191
4192 2012-12-09  Akim Demaille  <akim@lrde.epita.fr>
4193
4194         news: prepare for forthcoming release
4195         * NEWS: Fill paragraph.
4196         Reorder.
4197         Update examples.
4198         Remove line for 2.6.90.
4199
4200 2012-12-09  Akim Demaille  <akim@lrde.epita.fr>
4201
4202         doc: explain how mid-rule actions are translated
4203         * doc/bison.texi (Actions in Mid-Rule): Mention and use named references.
4204         Split into three subsections, among which...
4205         (Mid-Rule Action Translation): this new section.
4206
4207 2012-12-09  Akim Demaille  <akim@lrde.epita.fr>
4208
4209         error: use better locations for unused midrule values
4210         On
4211
4212           %%
4213           exp: {;} {$$;} { $$ = $1; }
4214
4215         instead of reporting (with -fcaret -Wmidrule-value)
4216
4217           midrule.y:2.6-8: warning: unset value: $$ [-Wmidrule-values]
4218            exp: {;} {$$;} { $$ = $1; }
4219                 ^^^
4220           midrule.y:2.6-27: warning: unused value: $2 [-Wmidrule-values]
4221            exp: {;} {$$;} { $$ = $1; }
4222                 ^^^^^^^^^^^^^^^^^^^^^^
4223
4224         report
4225
4226           midrule.y:2.6-8: warning: unset value: $$
4227            exp: {;} {$$;} { $$ = $1; }
4228                 ^^^
4229           midrule.y:2.10-14: warning: unused value: $2
4230            exp: {;} {$$;} { $$ = $1; }
4231                     ^^^^^
4232
4233         * src/reader.c (grammar_rule_check): When warning about the value of a
4234         midrule action, use the location of the midrule action instead of the
4235         location of the rule.
4236         the location of the part of the rule.
4237         * tests/actions.at (Default %printer and %destructor for mid-rule values):
4238         Adjust expectations
4239         * tests/input.at (Unused values with default %destructor): Ditto.
4240         (AT_CHECK_UNUSED_VALUES): Ditto.
4241         And use -fcaret.
4242
4243 2012-12-09  Akim Demaille  <akim@lrde.epita.fr>
4244
4245         doc: various minor improvements and fixes
4246         * doc/figs/example.dot, doc/figs/example.y: New.
4247         * doc/bison.texi: Prefer "token" to TOKEN.
4248         Use @group where appropriate.
4249         Adjust with style changes in the output (State 0, not state 0).
4250         Fix some @ref that were missing the third argument.
4251         Fix some incorrect line numbers.
4252         Use "nonterminal", not "non-terminal".
4253         Fix overfull and underfull TeX hboxes.
4254         Put the comments in the index.
4255         Remove duplicate index entries.
4256         Fuse glossary entries where appropriate.
4257         (Understanding): Improve the continuity between sections.
4258         Use example.dot to show the whole graph.
4259         * doc/Makefile.am: Adjust.
4260
4261 2012-12-09  Akim Demaille  <akim@lrde.epita.fr>
4262
4263         tests: ignore more useless compiler warnings
4264         * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore complains about
4265         using c++ to compile C.
4266
4267 2012-12-09  Akim Demaille  <akim@lrde.epita.fr>
4268
4269         tests: be robust to C being compiled with a C++11 compiler
4270         * tests/glr-regression.at: Use YY_NULL instead of NULL.
4271         Comment changes.
4272
4273 2012-12-09  Akim Demaille  <akim@lrde.epita.fr>
4274
4275         build: beware of Clang++ not supporting POSIXLY_CORRECT
4276         * m4/c-working.m4 (BISON_LANG_COMPILER_POSIXLY_CORRECT): New.
4277         (BISON_C_COMPILER_POSIXLY_CORRECT): Use it.
4278         For consistency with C++, also define BISON_C_WORKS.
4279         * m4/cxx.m4 (BISON_CXX_COMPILER_POSIXLY_CORRECT): New.
4280         * configure.ac: Use it.
4281         * tests/atlocal.in: Get its result.
4282         Propagate properly CXX values when used to compile C.
4283         When POSIXLY_CORRECT, adjust BISON_C_WORKS and BISON_CXX_WORKS.
4284         * tests/local.at (AT_COMPILE): Use BISON_C_WORKS.
4285
4286 2012-12-07  Akim Demaille  <akim@lrde.epita.fr>
4287
4288         maint: post-release administrivia
4289         * NEWS: Add header line for next release.
4290         * .prev-version: Record previous version.
4291         * cfg.mk (old_NEWS_hash): Auto-update.
4292
4293 2012-12-07  Akim Demaille  <akim@lrde.epita.fr>
4294
4295         version 2.6.90
4296         * NEWS: Record release date.
4297
4298 2012-12-07  Akim Demaille  <akim@lrde.epita.fr>
4299
4300         build: fix syntax-check error.
4301         * cfg.mk: Exclude names-refs, it includes a "double" if (end of first
4302         line, first of second line below).
4303
4304         test.y:43.12-44.59:  symbol not found in production: if
4305          if-stmt-a: IF expr[cond] THEN stmt.list[then] ELSE stmt.list[else] FI
4306                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4307
4308 2012-12-07  Theophile Ranquet  <ranquet@lrde.epita.fr>
4309
4310         cpp: simplify the Flex version checking macro
4311         * src/flex-scanner,h (FLEX_VERSION): Consider YY_FLEX_SUBMINOR_VERSION
4312         defined.
4313
4314 2012-12-07  Theophile Ranquet  <ranquet@lrde.epita.fr>
4315
4316         news: improve the carets example and fix a typo
4317         * NEWS: Here.
4318
4319 2012-12-07  Theophile Ranquet  <ranquet@lrde.epita.fr>
4320
4321         cpp: improve the Flex version checking macro
4322         * src/flex-scanner.h (FLEX_VERSION): Here.
4323
4324 2012-12-07  Theophile Ranquet  <ranquet@lrde.epita.fr>
4325
4326         carets: improve the code
4327         * src/location.c: Remove duplicate documentations.
4328         (caret_info): Stylistic change.
4329         (location_caret): Many reworks.
4330
4331 2012-12-07  Akim Demaille  <akim@lrde.epita.fr>
4332
4333         maint: update news
4334         * NEWS: There is no 2.6.6, remove its stub.
4335
4336 2012-12-07  Akim Demaille  <akim@lrde.epita.fr>
4337
4338         build: keep -Wmissing-declarations and -Wmissing-prototypes for modern GCCs
4339         Fixes a -Werror failure of xalloc.h used in src.
4340         From Eric Blake.
4341         http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00006.html
4342
4343         * configure.ac: Check whether GCC pragma diagnostic push/pop works.
4344         Enable these warnings for bison if it does.
4345         Enable these warnings for the test suite anyway.
4346
4347 2012-12-07  Akim Demaille  <akim@lrde.epita.fr>
4348
4349         build: drop -Wcast-qual
4350         Suggested by Jim Meyering.
4351         http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00017.html
4352         * configure.ac (warn_common): Remove -Wcast-qual.
4353
4354 2012-12-07  Akim Demaille  <akim@lrde.epita.fr>
4355
4356         gnulib: update
4357
4358 2012-12-06  Theophile Ranquet  <ranquet@lrde.epita.fr>
4359
4360         Merge remote-tracking branch 'origin/maint'
4361         * origin/maint:
4362           misc: pacify the Tiny C Compiler
4363           cpp: make the check of Flex version portable
4364           misc: require getline
4365           c++: support wide strings for file names
4366           doc: document carets
4367           tests: enhance existing tests with carets
4368           errors: show carets
4369           getargs: add support for --flags/-f
4370
4371 2012-12-06  Theophile Ranquet  <ranquet@lrde.epita.fr>
4372
4373         misc: pacify the Tiny C Compiler
4374         * src/graphviz.c (conclude_red): Remove a useless return.
4375
4376 2012-12-05  Theophile Ranquet  <ranquet@lrde.epita.fr>
4377
4378         cpp: make the check of Flex version portable
4379         This was problematic with tcc 0.9.25
4380
4381         * src/flex-scanner.h (FLEX_VERSION_GT): Rewrite and rename as...
4382         (FLEX_VERSION): This.
4383
4384 2012-12-05  Theophile Ranquet  <ranquet@lrde.epita.fr>
4385
4386         misc: require getline
4387         * bootstrap.conf: Here, used by src/location.c.
4388         * src/getargs.c (long_options): Rename --flags to --feature.
4389
4390 2012-12-05  Akim Demaille  <akim@lrde.epita.fr>
4391
4392         c++: support wide strings for file names
4393         Reported by Mark Boyall.
4394         http://lists.gnu.org/archive/html/help-bison/2011-08/msg00002.html
4395
4396         * data/location.cc (operator<<): Be templated on the type of
4397         output stream.
4398         * tests/headers.at (Several parsers): Adjust.
4399
4400 2012-12-05  Theophile Ranquet  <ranquet@lrde.epita.fr>
4401
4402         doc: document carets
4403         * NEWS: Announce it.
4404         * doc/bison.texi (Bison Options):  Here.
4405
4406 2012-12-05  Theophile Ranquet  <ranquet@lrde.epita.fr>
4407
4408         tests: enhance existing tests with carets
4409         * tests/actions.at: Unset value.
4410         * tests/conflicts.at: Rule useless due to conflicts.
4411         * tests/input.at: Missing terminator, unexpected end of file, command line
4412         redefinition of variable.
4413         * tests/named-refs.at: Many errors.
4414         * tests/reduce.at: Useless nonterminals and rules.
4415         * tests/regression.at: Large token.
4416
4417 2012-12-05  Theophile Ranquet  <ranquet@lrde.epita.fr>
4418
4419         errors: show carets
4420         * src/locations.c (caret_info): New, persistant information useful
4421         for...
4422         (location_caret): New, print a caret.
4423         (cleanup_caret): Release caret_info cleanly, call it...
4424         * src/main.c (main): Here.
4425         * src/complain.c (error_message): Call location_caret here.
4426
4427 2012-12-05  Theophile Ranquet  <ranquet@lrde.epita.fr>
4428
4429         getargs: add support for --feature/-f
4430         Introduce -fdiagnostics-show-caret
4431
4432         * src/getargs.c (feature_flag): New global.
4433         * src/getargs.h (feature): New enum.
4434
4435 2012-12-05  Akim Demaille  <akim@lrde.epita.fr>
4436
4437         Merge remote-tracking branch 'origin/maint'
4438         * origin/maint:
4439           getargs: don't label --language/-l as experimental
4440           getargs: fix the locations of command-line input
4441           errors: indent missing action code semicolon warning
4442
4443 2012-12-04  Theophile Ranquet  <ranquet@lrde.epita.fr>
4444
4445         getargs: don't label --language/-l as experimental
4446         * NEWS: Announce it.
4447         * doc/bison.texi, src/getargs.c (usage): Here.
4448
4449 2012-12-03  Akim Demaille  <akim@lrde.epita.fr>
4450
4451         tests: minor improvements
4452         * tests/calc.at (AT_CHECK_SPACES): To speed up, accept several files
4453         at once, and factor some calls.
4454
4455 2012-12-03  Theophile Ranquet  <ranquet@lrde.epita.fr>
4456
4457         getargs: fix the locations of command-line input
4458         * src/getargs.c (command_line_location): Here.
4459         * tests/input.at: Adjust.
4460
4461 2012-12-03  Theophile Ranquet  <ranquet@lrde.epita.fr>
4462
4463         errors: indent missing action code semicolon warning
4464         Also, remove a duplicate #define.
4465
4466         * src/scan-code.l (SC_RULE_ACTION): Here.
4467         * tests/actions.at: Adjust.
4468
4469 2012-12-03  Akim Demaille  <akim@lrde.epita.fr>
4470
4471         Merge remote-tracking branch 'origin/maint'
4472         * origin/maint:
4473           parser: accept #line NUM
4474           m4: use a safer pattern to enable/disable output
4475           tests: beware of gnulib's need for config.h
4476           gnulib: update
4477           yacc.c, glr.c: check and fix the display of locations
4478           formatting changes
4479           glr.c: remove stray macro
4480
4481 2012-12-03  Akim Demaille  <akim@lrde.epita.fr>
4482
4483         parser: accept #line NUM
4484         * src/scan-gram.l (scanner): Accept '#line NUM'.
4485         (handle_syncline): Adjust to the possible missing file name.
4486
4487 2012-12-03  Akim Demaille  <akim@lrde.epita.fr>
4488
4489         m4: use a safer pattern to enable/disable output
4490         Work on some other areas of Bison revealed that some macros expanded
4491         to be expanded only once were actually expanded several times.  This
4492         was due to the fact that changecom was not properly restored each
4493         time, and macro names appearing in comments were then expanded.
4494
4495         Introduce begin/end macros which are easier to match that
4496         changecom()/changecom(#).
4497
4498         * data/bison.m4 (b4_output_begin, b4_output_end): New.
4499         * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
4500         * data/location.cc, data/stack.hh, data/yacc.c:
4501         Use them.
4502
4503 2012-12-03  Akim Demaille  <akim@lrde.epita.fr>
4504
4505         tests: beware of gnulib's need for config.h
4506         * tests/skeletons.at, tests/torture.at: Be sure to include config.h
4507         where appropriate.
4508
4509 2012-11-30  Akim Demaille  <akim@lrde.epita.fr>
4510
4511         gnulib: update
4512         * lib/yyerror.c: Include config.h since the following stdio.h might be
4513         from gnulib.
4514
4515 2012-11-30  Akim Demaille  <akim@lrde.epita.fr>
4516
4517         yacc.c, glr.c: check and fix the display of locations
4518         In some case, negative column number could be displayed.
4519         Make YY_LOCATION_PRINT similar to bison's own implementation of
4520         locations.  Since the macro is getting fat, make it a static
4521         function.
4522         Reported by Jonathan Fabrizio.
4523
4524         * data/c.m4 (yy_location_print_define): Improve the implementation,
4525         and generate the yy_location_print_ function.
4526         Adjust YY_LOCATION_PRINT.
4527         * tests/actions.at (Location Print): New tests.
4528
4529 2012-11-30  Akim Demaille  <akim@lrde.epita.fr>
4530
4531         formatting changes
4532         * data/c.m4: Fix comments, put macros in a more natural order.
4533         Space changes (from M-x whitespace-cleanup).
4534         * src/location.c: Fix spaces.
4535         * tests/actions.at: Space changes.
4536
4537 2012-11-30  Akim Demaille  <akim@lrde.epita.fr>
4538
4539         glr.c: remove stray macro
4540         * data/glr.c (YYOPTIONAL_LOC): Remove, unused since commit
4541         769a8ef9bcb5e14d0be9d0869f5dca20ab093930.
4542
4543 2012-11-29  Akim Demaille  <akim@lrde.epita.fr>
4544
4545         Merge remote-tracking branch 'origin/maint'
4546         * origin/maint:
4547           doc: minor fixes
4548           doc: improve the index
4549           doc: introduce api.pure full, rearrange some examples
4550           yacc.c: support "%define api.pure full"
4551           local.at: improvements
4552
4553 2012-11-29  Akim Demaille  <akim@lrde.epita.fr>
4554
4555         doc: minor fixes
4556         * doc/bison.texi: Use stderr for error messages.
4557         Meta-variables are usually spelled in lower case.
4558         Use @code for function names.
4559
4560 2012-11-29  Akim Demaille  <akim@lrde.epita.fr>
4561
4562         doc: improve the index
4563         * doc/bison.texi: Fix uses of "deffn" so that the arguments of the
4564         directives do not show in the index.
4565         Remove a duplicate entry for api.pure.
4566
4567 2012-11-29  Theophile Ranquet  <ranquet@lrde.epita.fr>
4568
4569         doc: introduce api.pure full, rearrange some examples
4570         * NEWS: Add entry.
4571         * doc/bison.texi (%define Summary): Show the old Yacc behaviour.
4572         (Parser Function): Move parse-param examples here.
4573         (Pure Calling): Remove parse-param examples.
4574         (Error Reporting): Don't show the old behavior, stick to 'full'.
4575
4576 2012-11-29  Theophile Ranquet  <ranquet@lrde.epita.fr>
4577
4578         yacc.c: support "%define api.pure full"
4579         This makes the interface for yyerror() pure without the need for a spurious
4580         parse_param.
4581
4582         * data/yacc.c (b4_pure_if, b4_pure_flag): New definition, accept three states.
4583         (b4_yacc_pure_if): Rename as...
4584         (b4_yyerror_arg_loc_if): This, and use b4_pure_flag.
4585         * tests/actions.at (%define api.pure): Modernize.
4586         * test/calc.at (Simple LALR Calculator): Modernize.
4587         * tests/local.at (AT_YYERROR_ARG_LOC_IF): Adjust.
4588
4589 2012-11-28  Akim Demaille  <akim@lrde.epita.fr>
4590
4591         tests: check variants without locations
4592         * tests/c++.at (Variants): Support non-use of locations, and
4593         check its support.
4594
4595 2012-11-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
4596
4597         local.at: improvements
4598         * tests/local.at (AT_YYERROR_FORMALS): Make llocp const.
4599         (AT_PURE_AND_LOC_IF, AT_GLR_OR_PARAM_IF): Remove, expand...
4600         (AT_YYERROR_ARG_LOC_IF): Here, and use m4_join for readability.
4601
4602 2012-11-26  Akim Demaille  <akim@lrde.epita.fr>
4603
4604         tests: use -fno-strict-aliasing with variants
4605         Reported by Théophile Ranquet.
4606
4607         * configure.ac (NO_STRICT_ALIAS_CXXFLAGS): New.
4608         * tests/c++.at, tests/atlocal.in, examples/local.mk: Use it.
4609
4610 2012-11-26  Akim Demaille  <akim@lrde.epita.fr>
4611
4612         tests: remove leftover
4613         * tests/atlocal.in: Remove duplicate handling of --compile-c-with-cxx.
4614
4615 2012-11-26  Akim Demaille  <akim@lrde.epita.fr>
4616
4617         doc: use %precedence instead of nonassoc when associativity is not wanted
4618         * doc/bison.texi: here.
4619         Formatting changes in some grammars.
4620         Fix a %prec into %precedence.
4621
4622 2012-11-26  Akim Demaille  <akim@lrde.epita.fr>
4623
4624         Merge remote-tracking branch 'origin/maint'
4625         * origin/maint:
4626           yacc.c: always initialize yylloc
4627           scanner: issue a single error for groups of invalid characters
4628           tests: formatting changes
4629           doc: one of the fixes for an ambiguous grammar was ambiguous too
4630           doc: fix the dangling else with precedence directives
4631           doc: prefer "token" to TOKEN
4632           doc: formatting changes
4633           scanner: use explicit "ignore" statements
4634
4635 2012-11-26  Akim Demaille  <akim@lrde.epita.fr>
4636
4637         Merge remote-tracking branch 'origin/branch-2.6' into maint
4638         * origin/branch-2.6:
4639           yacc.c: always initialize yylloc
4640           doc: one of the fixes for an ambiguous grammar was ambiguous too
4641           doc: fix the dangling else with precedence directives
4642           doc: prefer "token" to TOKEN
4643           doc: formatting changes
4644
4645 2012-11-23  Theophile Ranquet  <ranquet@lrde.epita.fr>
4646
4647         yacc.c: always initialize yylloc
4648         The initial location might be used if the parser starts by an empty
4649         reduction, so really ensure proper initialization of the initial
4650         location.  The previous approach fails for PostgreSQL, which uses
4651         Reported by Peter Eisentraut.
4652         http://lists.gnu.org/archive/html/bug-bison/2012-11/msg00023.html
4653         With help from Théophile Ranquet.
4654
4655         * data/yacc.c (b4_declare_scanner_communication_variables): Be sure
4656         to initialize yylloc, even when its structure is unknown.
4657         (yyparse): Simplify the call to b4_dollar_pushdef.
4658         * tests/actions.at (Initial location): Check of similar pattern
4659         as in the case of PostgreSQL.
4660
4661 2012-11-23  Akim Demaille  <akim@lrde.epita.fr>
4662
4663         scanner: issue a single error for groups of invalid characters
4664         * src/scan-gram.l: Scan groups of invalid characters together.
4665         * tests/input.at, tests/named-refs.at: Adjust.
4666
4667 2012-11-23  Akim Demaille  <akim@lrde.epita.fr>
4668
4669         tests: formatting changes
4670         * tests/named-refs.at: Here.
4671
4672 2012-11-23  Akim Demaille  <akim@lrde.epita.fr>
4673
4674         doc: one of the fixes for an ambiguous grammar was ambiguous too
4675         Reported by ÐÑкар Ð¡Ð°Ñ„ин.
4676         http://lists.gnu.org/archive/html/bug-bison/2012-11/msg00024.html
4677
4678         * doc/bison.texi (Reduce/Reduce): Fix the resulting ambiguity using
4679         precedence/associativity directives.
4680
4681 2012-11-22  Akim Demaille  <akim@lrde.epita.fr>
4682
4683         doc: fix the dangling else with precedence directives
4684         * doc/bison.texi (Non Operators): New node.
4685         (Shift/Reduce): Point to it.
4686         Don't promote "%expect n" too much.
4687
4688 2012-11-22  Akim Demaille  <akim@lrde.epita.fr>
4689
4690         doc: prefer "token" to TOKEN
4691         This is more readable in short examples.
4692
4693         * doc/bison.texi (Shift/Reduce): here.
4694         Make "win" and "lose" action more alike.
4695
4696 2012-11-22  Akim Demaille  <akim@lrde.epita.fr>
4697
4698         doc: formatting changes
4699         * doc/bison.texi: Use @group.
4700
4701 2012-11-14  Akim Demaille  <akim@lrde.epita.fr>
4702
4703         scanner: use explicit "ignore" statements
4704         * src/scan-gram.l: here.
4705
4706 2012-11-13  Akim Demaille  <akim@lrde.epita.fr>
4707
4708         Merge remote-tracking branch 'origin/maint'
4709         * origin/maint:
4710           tests: close files in glr-regression
4711           xml: match DOT output and xml2dot.xsl processing
4712           xml: factor xslt space template
4713           graph: fix a memory leak
4714           xml: documentation
4715           output: capitalize State
4716
4717 2012-11-12  Theophile Ranquet  <ranquet@lrde.epita.fr>
4718
4719         tests: close files in glr-regression
4720         * tests/glr-regression.at: Here.
4721
4722 2012-11-12  Theophile Ranquet  <ranquet@lrde.epita.fr>
4723
4724         xml: match DOT output and xml2dot.xsl processing
4725         Make the DOT produced by XSLT processing equivalent to the one made with the
4726         --graph option.
4727
4728         * data/xslt/xml2dot.xsl: Stylistic changes, and add support for reductions.
4729         * doc/bison.texi (Xml): Update.
4730         * src/graphviz.c (conclude_red): Minor stylistic changes to DOT internals.
4731         (output_red): Swap enabled and disabled reductions output, for coherence
4732         with XSLT output.
4733         * src/print_graph.c (print_core): Minor stylistic change to States' output.
4734         (print_actions): Swap order of output for reductions and transitions.
4735         * tests/local.at (AT_BISON_CHECK_XML): Ignore differences in order.
4736         * tests/output.at: Adjust to changes in DOT internals.
4737
4738 2012-11-12  Theophile Ranquet  <ranquet@lrde.epita.fr>
4739
4740         xml: factor xslt space template
4741         * data/xslt/bison.xsl (space): New, import from...
4742         * data/xslt/xml2text.xsl: Here.
4743
4744 2012-11-12  Theophile Ranquet  <ranquet@lrde.epita.fr>
4745
4746         graph: fix a memory leak
4747         * src/graphviz.c (output_red): Here.
4748
4749 2012-11-12  Theophile Ranquet  <ranquet@lrde.epita.fr>
4750
4751         xml: documentation
4752         The XML output combined with the XSL Transformations provided in data/ are
4753         incredibly useful, they should be documented.
4754
4755         * doc/bison.texi (Xml): New node.
4756
4757 2012-11-12  Theophile Ranquet  <ranquet@lrde.epita.fr>
4758
4759         output: capitalize State
4760         * src/print.c (print_state): Here.
4761         * tests/conflicts.at, tests/existing.at, tests/local.at, tests/reduce.at,
4762         tests/regression.at, tests/sets.at: Adjust.
4763
4764 2012-11-12  Akim Demaille  <akim@lrde.epita.fr>
4765
4766         tests: fix syntax-check errors
4767         Reported by Théophile Ranquet.
4768
4769         * tests/c++.at: Use AT_PARSER_CHECK.
4770         Avoid using "strcmp", which triggers an error from syntax-check.
4771
4772 2012-11-12  Akim Demaille  <akim@lrde.epita.fr>
4773
4774         Merge remote-tracking branch 'origin/maint'
4775         * origin/maint:
4776           maint: address syntax-check errors.
4777           tests: use valgrind where appropriate
4778           tests: use valgrind where appropriate
4779           tests: don't expect $EGREP to support -w
4780           tests: more possible error compiler messages for "#error"
4781
4782 2012-11-12  Akim Demaille  <akim@lrde.epita.fr>
4783
4784         maint: address syntax-check errors.
4785         * cfg.mk: Ignore the "error" call in tests/c++.at, it is not to be
4786         translated.
4787         * doc/bison.texi: Fix incorrect @pxref use.
4788         * po/POTFILES.in: Add missing file.
4789         * src/print_graph.c: Remove useless include.
4790
4791 2012-11-12  Akim Demaille  <akim@lrde.epita.fr>
4792
4793         tests: use valgrind where appropriate
4794         Reported by Théophile Ranquet.
4795
4796         * cfg.mk (sc_at_parser_check): New.
4797         * tests/c++.at: Fix use of AT_CHECK vs. AT_PARSER_CHECK.
4798
4799 2012-11-12  Akim Demaille  <akim@lrde.epita.fr>
4800
4801         Merge remote-tracking branch 'origin/branch-2.6' into maint
4802         * origin/branch-2.6:
4803           tests: use valgrind where appropriate
4804           tests: don't expect $EGREP to support -w
4805
4806 2012-11-10  Akim Demaille  <akim@lrde.epita.fr>
4807
4808         tests: use valgrind where appropriate
4809         Reported by Théophile Ranquet.
4810
4811         * tests/glr-regression.at: Rewrite some test cases so that AT_PARSER_CHECK,
4812         which runs valgrind, is exposed with the parser, not with "echo".
4813         * tests/local.at, tests/regression.at, tests/headers.at:
4814         Use AT_PARSER_CHECK for generated parsers.
4815
4816 2012-11-08  Akim Demaille  <akim@lrde.epita.fr>
4817
4818         tests: don't expect $EGREP to support -w
4819         Does not work on Solaris 10.  Reported by Dennis Clarke.
4820         http://lists.gnu.org/archive/html/bug-bison/2012-11/msg00009.html
4821         * tests/headers.at (Several parsers): Use Perl instead.
4822         While at it, run it only once, on all the generated headers.
4823         Adjust to YY_NULL be defined in position.hh.
4824
4825 2012-11-08  Akim Demaille  <akim@lrde.epita.fr>
4826
4827         tests: more possible error compiler messages for "#error"
4828         * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust for Clang.
4829         Verified with GCC 4.0, 4.2 to 4.8, and Clang 2.9, 3.2: none skip.
4830
4831 2012-11-08  Akim Demaille  <akim@lrde.epita.fr>
4832
4833         regen
4834
4835 2012-11-08  Akim Demaille  <akim@lrde.epita.fr>
4836
4837         Merge branch 'maint'
4838         * origin/maint:
4839           regen
4840           maint: post-release administrivia
4841           version 2.6.5
4842           regen
4843           tests: syntax-check
4844           tests: beware of compilers that do not support POSIXLY_CORRECT
4845           gnulib: update
4846
4847 2012-11-08  Akim Demaille  <akim@lrde.epita.fr>
4848
4849         regen
4850
4851 2012-11-08  Akim Demaille  <akim@lrde.epita.fr>
4852
4853         Merge branch 'branch-2.6' into maint
4854         * origin/branch-2.6:
4855           maint: post-release administrivia
4856           version 2.6.5
4857           regen
4858           tests: syntax-check
4859           tests: beware of compilers that do not support POSIXLY_CORRECT
4860           gnulib: update
4861
4862 2012-11-07  Akim Demaille  <akim@lrde.epita.fr>
4863
4864         maint: post-release administrivia
4865         * NEWS: Add header line for next release.
4866         * .prev-version: Record previous version.
4867         * cfg.mk (old_NEWS_hash): Auto-update.
4868
4869 2012-11-07  Akim Demaille  <akim@lrde.epita.fr>
4870
4871         version 2.6.5
4872         * NEWS: Record release date.
4873
4874 2012-11-07  Akim Demaille  <akim@lrde.epita.fr>
4875
4876         regen
4877
4878 2012-11-07  Akim Demaille  <akim@lrde.epita.fr>
4879
4880         tests: syntax-check
4881         * tests/actions.at: Fix typo.
4882
4883 2012-11-07  Akim Demaille  <akim@lrde.epita.fr>
4884
4885         tests: beware of compilers that do not support POSIXLY_CORRECT
4886         Running "maintainer-release-check" on OS X with Clang 2.9 fails,
4887         because "clang-mp-2.9 -o test -g test.c" launches "/usr/bin/dsymutil
4888         test -o test.dSYM" which fails with "error: unable to open executable
4889         '-o'".
4890
4891         * m4/c-working.m4 (BISON_CHECK_WITH_POSIXLY_CORRECT)
4892         (BISON_C_COMPILER_POSIXLY_CORRECT): New.
4893         * configure.ac: Use the latter.
4894         * tests/atlocal.in (POSIXLY_CORRECT_IS_EXPORTED): New.
4895         * tests/local.at (AT_BISON_CHECK_WARNINGS_): Use it instead of computing its
4896         value each time.
4897         (AT_QUELL_VALGRIND): Skip tests that cannot work because of compilers
4898         that do not support POSIXLY_CORRECT.
4899
4900 2012-11-07  Akim Demaille  <akim@lrde.epita.fr>
4901
4902         gnulib: update
4903
4904 2012-11-06  Akim Demaille  <akim@lrde.epita.fr>
4905
4906         Merge remote-tracking branch 'origin/maint'
4907         * origin/maint: (24 commits)
4908           tests: calc: modernize the use of locations
4909           tests: remove useless location initializations
4910           lalr1.cc: always initialize yylval.
4911           tests: check that C and C++ objects can be linked together.
4912           yacc.c: also disable -Wuninitialized.
4913           glr.cc, yacc.c: initialize yylloc properly
4914           yacc.c, glr.c: a better YY_LOCATION_PRINT
4915           yacc.c: simplify initialization
4916           doc: formatting changes
4917           c++: fix position operator signatures
4918           tests: remove useless location initialization.
4919           tests: fix locations in C
4920           tests: handle %parse-param in the generated yyerror
4921           tests: simplifications
4922           grammars: fix display of nul character in error message
4923           tests: sort
4924           tests: cosmetic changes
4925           comment changes
4926           autoconf: update
4927           gnulib: update
4928           ...
4929
4930 2012-11-06  Akim Demaille  <akim@lrde.epita.fr>
4931
4932         Merge branch 'branch-2.6' into maint
4933         * origin/branch-2.6: (24 commits)
4934           tests: calc: modernize the use of locations
4935           tests: remove useless location initializations
4936           lalr1.cc: always initialize yylval.
4937           tests: check that C and C++ objects can be linked together.
4938           yacc.c: also disable -Wuninitialized.
4939           glr.cc, yacc.c: initialize yylloc properly
4940           yacc.c, glr.c: a better YY_LOCATION_PRINT
4941           yacc.c: simplify initialization
4942           doc: formatting changes
4943           c++: fix position operator signatures
4944           tests: remove useless location initialization.
4945           tests: fix locations in C
4946           tests: handle %parse-param in the generated yyerror
4947           tests: simplifications
4948           grammars: fix display of nul character in error message
4949           tests: sort
4950           tests: cosmetic changes
4951           comment changes
4952           autoconf: update
4953           gnulib: update
4954           ...
4955
4956 2012-11-06  Akim Demaille  <akim@lrde.epita.fr>
4957
4958         tests: calc: modernize the use of locations
4959         * tests/calc.at: Don't initialize the location, let the parser
4960         do it.
4961         Use a $printer.
4962         Change some testing input to be easier to distinguish (instead of always
4963         "0 0" for instance).
4964
4965 2012-11-06  Akim Demaille  <akim@lrde.epita.fr>
4966
4967         tests: remove useless location initializations
4968         * tests/actions.at, tests/calc.at: here.
4969
4970 2012-11-06  Akim Demaille  <akim@lrde.epita.fr>
4971
4972         lalr1.cc: always initialize yylval.
4973         * data/lalr1.cc: here.
4974
4975 2012-11-06  Akim Demaille  <akim@lrde.epita.fr>
4976
4977         tests: check that C and C++ objects can be linked together.
4978         * tests/local.at (AT_SKIP_IF_CANNOT_LINK_C_AND_CXX): New.
4979         * tests/headers.at (Several parsers): Use it.
4980
4981 2012-11-06  Akim Demaille  <akim@lrde.epita.fr>
4982
4983         yacc.c: also disable -Wuninitialized.
4984         * data/yacc.c (YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN): For some versions
4985         of GCC, -Wmaybe-uninitialized alone does not suffice.
4986
4987 2012-11-06  Akim Demaille  <akim@lrde.epita.fr>
4988
4989         glr.cc, yacc.c: initialize yylloc properly
4990         There are several issues to address here.  One is that yylloc should
4991         be initialized when possible.  Another is that the push parser needs
4992         to update yypushed_loc when the user modified it.  And if the parser
4993         starts by a reduction of an empty, it uses the first location on the
4994         stack, which, therefore, must also be initialized to this initial
4995         location.
4996
4997         This is getting complex, especially since because initializing a
4998         global (impure interface) is different from initializing a local
4999         variable.  To simplify, the local yylloc is not initialized during its
5000         definition.
5001
5002         * data/c.m4 (b4_yyloc_default_define): Replace by...
5003         (b4_yyloc_default): this.
5004         Adjust dependencies.
5005         * data/glr.cc: Initialize yylloc.
5006         * data/yacc.c (b4_declare_scanner_communication_variables):
5007         Initialize yylloc during its definition.
5008         Don't define yyloc_default.
5009         (yypush_parse): The location formal is not const, as we might
5010         initialize it.
5011         (yyparse): Define yyloc_default.
5012         Use it before running the user initial action.
5013         Possibly update the first location on the stack, and the pushed
5014         location after the user initial action.
5015         * tests/actions.at (Initial locations): Check that the initial
5016         location is correct.
5017
5018 2012-11-06  Akim Demaille  <akim@lrde.epita.fr>
5019
5020         yacc.c, glr.c: a better YY_LOCATION_PRINT
5021         * data/c.m4 (b4_yy_location_print_define): New.
5022         Now issues "short" locations, e.g., "1.1" instead of "1.1-1.1".
5023         Was initially a function, but then we face "static but unused"
5024         warnings.
5025         Simpler as a macro.
5026         * tests/local.at, data/glr.c, data/yacc.c: Use it instead of duplicating.
5027         * tests/actions.at: Adjust expectations.
5028
5029 2012-11-06  Akim Demaille  <akim@lrde.epita.fr>
5030
5031         yacc.c: simplify initialization
5032         * data/yacc.c: Fuse the initializations of yyssp, yyss and the like.
5033         Remove an obsolete comment: we do initialize these initial stack
5034         members (in some cases).
5035
5036 2012-11-05  Akim Demaille  <akim@lrde.epita.fr>
5037
5038         doc: formatting changes
5039         * doc/bison.texi: In a pointer type.
5040
5041 2012-11-05  Akim Demaille  <akim@lrde.epita.fr>
5042
5043         c++: fix position operator signatures
5044         * data/location.cc (operator+=, operator-=): Remove const from return
5045         type.
5046
5047 2012-11-05  Akim Demaille  <akim@lrde.epita.fr>
5048
5049         tests: remove useless location initialization.
5050         * tests/glr-regression.at: here.
5051         glr.c does initialize yylloc.
5052
5053 2012-11-05  Akim Demaille  <akim@lrde.epita.fr>
5054
5055         tests: fix locations in C
5056         * tests/local.at (AT_YYERROR_DEFINE): Don't display the end of the location
5057         if it is not after its beginning.
5058         * tests/actions.at, tests/cxx-type.at: Adjust the expected output.
5059
5060 2012-11-05  Akim Demaille  <akim@lrde.epita.fr>
5061
5062         tests: handle %parse-param in the generated yyerror
5063         * tests/local.at (AT_PARSE_PARAMS): New.
5064         (AT_YYERROR_FORMALS, AT_YYERROR_DEFINE): Use it to add the parse-param
5065         to yyerror.
5066         * tests/calc.at, tests/regression.at: Use AT_YYERROR_DEFINE and
5067         AT_YYERROR_DECLARE, now that they handle properly the parse-params.
5068         Be sure to let AT_BISON_OPTION_PUSHDEFS now what parse-params are used.
5069
5070 2012-11-05  Akim Demaille  <akim@lrde.epita.fr>
5071
5072         tests: simplifications
5073         * tests/actions.at (Exotic Dollars): Formatting changes.
5074         Use AT_FULL_COMPILE.
5075         (AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove useless initialization of @$.
5076
5077 2012-11-01  Akim Demaille  <akim@lrde.epita.fr>
5078
5079         lalr1.cc: rename lex_symbol as api.token.constructor
5080         * data/bison.m4 (b4_lex_symbol_if): Rename as...
5081         (b4_token_ctor_if): this.
5082         Depend upon api.token.constructor.
5083         * data/c++.m4, data/lalr1.cc: Adjust.
5084         * doc/bison.texi: Fix all the occurrences of lex_symbol.
5085         * etc/bench.pl.in: Adjust.
5086         * examples/variant.yy: Likewise.
5087
5088         * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
5089         Handle AT_TOKEN_CTOR_IF.
5090         * tests/c++.at: Adjust to using api.token.constructor and AT_TOKEN_CTOR_IF.
5091         Simplify the test of both build call styles.
5092         (AT_CHECK_VARIANTS): Rename as...
5093         (AT_TEST): this.
5094         And undef when done.
5095
5096 2012-11-01  Akim Demaille  <akim@lrde.epita.fr>
5097
5098         examples: simplify/improve
5099         * examples/variant.yy: Put yylex in yy::, and simplify accordingly.
5100         Minor formatting changes.
5101
5102 2012-11-01  Akim Demaille  <akim@lrde.epita.fr>
5103
5104         bison.m4: support b4_*_if macros whose name differ from their variable
5105         * data/bison.m4 (b4_percent_define_if_define_, b4_percent_define_if_define):
5106         Accept a second argument.
5107
5108 2012-11-01  Akim Demaille  <akim@lrde.epita.fr>
5109
5110         grammars: fix display of nul character in error message
5111         Reported by Marc Mendiola.
5112         http://lists.gnu.org/archive/html/help-bison/2012-10/msg00017.html
5113
5114         * gnulib: Update to get quote_mem.
5115         * src/scan-gram.l: Use it.
5116         * tests/input.at (Invalid inputs): Additional checks.
5117         * tests/named-refs.at: Likewise.
5118
5119 2012-11-01  Akim Demaille  <akim@lrde.epita.fr>
5120
5121         tests: sort
5122         * tests/regression.at (Invalid inputs, Invalid inputs with {}): Move to...
5123         * tests/input.at: here, for consistency.
5124
5125 2012-11-01  Akim Demaille  <akim@lrde.epita.fr>
5126
5127         tests: cosmetic changes
5128         * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): Improve the
5129         displayed title.
5130
5131 2012-11-01  Akim Demaille  <akim@lrde.epita.fr>
5132
5133         comment changes
5134         * data/lalr1.cc: here.
5135
5136 2012-11-01  Akim Demaille  <akim@lrde.epita.fr>
5137
5138         autoconf: update
5139         There are comment changes only in the files we use.
5140
5141 2012-11-01  Akim Demaille  <akim@lrde.epita.fr>
5142
5143         gnulib: update
5144
5145 2012-10-28  Akim Demaille  <akim@lrde.epita.fr>
5146
5147         regen
5148
5149 2012-10-28  Akim Demaille  <akim@lrde.epita.fr>
5150
5151         yacc.c: initialize yylval and yylloc.
5152         When generating a pure push parser, the initialization of yylval and
5153         yylloc may not be visible to the compiler.  With warnings enabled, GCC
5154         4.3.6, 4.4.7, 4.5.4, and 4.6.3 report uninitialized uses of
5155         yylval/yylloc.  Using local pragmas to disable these warnings is not
5156         supported before 4.6, and 4.6 does not support it properly.  So
5157         initialize yylval and yylloc at their definition.  Reported by Peter
5158         Simons.  See
5159         http://lists.gnu.org/archive/html/bison-patches/2012-10/msg00133.html
5160
5161         * data/c.m4 (b4_yyloc_default_define): New.
5162         * data/yacc.c: Use it when locations are requested.
5163         (YYLVAL_INITIALIZE): Replace by...
5164         (YY_INITIAL_VALUE): this.
5165         (yyparse): Initialize yylloc and yylval.
5166         Therefore, remove the initialization of yylloc's field.
5167         * data/glr.c: Likewise.
5168
5169 2012-10-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
5170
5171         graphs: fix spacing refactoring
5172         * src/print_graph.c (print_lhs, print_core): Here.
5173
5174 2012-10-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
5175
5176         tests: make deprecation tests more specific
5177         * tests/input.at (Deprecated directives): Here, don't generate unrelated errors
5178         or warnings.
5179
5180 2012-10-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
5181
5182         tests: fix AT_BISON_CHECK_WARNINGS_ stderr rewriting
5183         * tests/input.at (Deprecated directives): Avoid spurious error.
5184         * tests/locat.at (AT_BISON_CHECK_WARNINGS): Adjust for recent changes.
5185
5186 2012-10-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
5187
5188         scan-skel.l: consider m4 notes as related to "complaint" errors
5189         * src/scan-skel.l (flag): Here.
5190
5191 2012-10-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
5192
5193         warnings: distinguish context information based on warning type
5194         * src/scan-code.l (show_sub_message, show_sub_messages): Take a new warnings
5195         argument.
5196
5197 2012-10-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
5198
5199         warnings: fix early exit of warnings treated as errors
5200         Treating warnings as errors caused Bison to exit earlier than needed, making it
5201         hide warnings that would have been printed had -Werror not been set.
5202
5203         Also, fix a bug that caused some context information of errors to not be
5204         shown.
5205
5206         * src/complain.c (complaint_issued): Rename as...
5207         (complaint_status): This, and change its type from boolean to
5208         * src/complain.h (err_status): This, new enumeration.
5209         * src/main.c (main): Adjust (only finish early if an actual complaint was
5210         risen, not a mere warning treated an error).
5211         * src/reader.c: Adjust.
5212
5213 2012-10-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
5214
5215         tests: reindent for legibility
5216         * tests/local.at (AT_BISON_CHECK_WARNINGS_): Here.
5217
5218 2012-10-26  Akim Demaille  <akim@lrde.epita.fr>
5219
5220         build: fix Texinfo compilation
5221         * doc/local.mk: fix dependencies.
5222
5223 2012-10-26  Akim Demaille  <akim@lrde.epita.fr>
5224
5225         regen
5226
5227 2012-10-26  Akim Demaille  <akim@lrde.epita.fr>
5228
5229         Merge remote-tracking branch 'origin/maint'
5230         * origin/maint: (46 commits)
5231           doc: minor style change
5232           maint: use gendocs's new -I option
5233           regen
5234           yacc.c: do not define location support when not using locations
5235           maint: be compilable with GCC 4.0
5236           tests: address a warning from GCC 4.4
5237           tests: don't use options that Clang does not support
5238           tests: restore the tests on -Werror
5239           regen
5240           parse-gram: update the Bison interface
5241           fix comment
5242           maint: post-release administrivia
5243           version 2.6.4
5244           regen
5245           2.6.4: botched 2.6.3
5246           maint: post-release administrivia
5247           version 2.6.3
5248           gnulib: update
5249           tests: check %no-lines
5250           NEWS: warnings with clang
5251           ...
5252
5253 2012-10-26  Akim Demaille  <akim@lrde.epita.fr>
5254
5255         Merge branch 'branch-2.6' into maint
5256         * origin/branch-2.6:
5257           regen
5258           yacc.c: do not define location support when not using locations
5259           maint: be compilable with GCC 4.0
5260           tests: address a warning from GCC 4.4
5261           tests: don't use options that Clang does not support
5262           tests: restore the tests on -Werror
5263           regen
5264           parse-gram: update the Bison interface
5265           fix comment
5266
5267 2012-10-26  Akim Demaille  <akim@lrde.epita.fr>
5268
5269         doc: minor style change
5270         * doc/figs/example-reduce.txt: here.
5271
5272 2012-10-26  Akim Demaille  <akim@lrde.epita.fr>
5273
5274         maint: use gendocs's new -I option
5275         * gnulib: Update gendocs.
5276         * cfg.mk (gendocs_options_): New.
5277
5278 2012-10-26  Akim Demaille  <akim@lrde.epita.fr>
5279
5280         regen
5281
5282 2012-10-26  Akim Demaille  <akim@lrde.epita.fr>
5283
5284         yacc.c: don't use _Pragma GCC diagnostic with 4.6
5285         Reported by Peter Simons.
5286         http://lists.gnu.org/archive/html/bug-bison/2012-10/msg00033.html
5287
5288         * data/yacc.c (b4_declare_scanner_communication_variables): 4.7
5289         seems fine though.
5290
5291 2012-10-26  Akim Demaille  <akim@lrde.epita.fr>
5292
5293         regen
5294
5295 2012-10-26  Akim Demaille  <akim@lrde.epita.fr>
5296
5297         yacc.c: do not define location support when not using locations
5298         * data/yacc.c (YYLLOC_DEFAULT, YYRHSLOC): Don't define when not
5299         using locations.
5300
5301 2012-10-26  Akim Demaille  <akim@lrde.epita.fr>
5302
5303         maint: be compilable with GCC 4.0
5304         The "shadows a global declaration" warning in GCC 4.0 was a bit
5305         annoying.  It does not like that a type name be used in a prototype of
5306         a function (not the implementation, just the declaration):
5307
5308           In file included from src/LR0.c:38:
5309           src/reader.h:56: warning: declaration of 'named_ref' shadows a
5310                                     global declaration
5311           src/named-ref.h:35: warning: shadowed declaration is here
5312
5313         It does not like either when a global variable name is used in a
5314         prototype.  Flex 2.5.37 generates this prototype:
5315
5316           void gram_set_debug (int debug_flag  );
5317
5318         * src/getargs.h, src/getargs.c (debug_flag): Rename as...
5319         (debug): this.
5320         Adjust dependencies.
5321         * src/reader.h: Don't use "named_ref" as a formal argument name.
5322
5323 2012-10-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
5324
5325         misc: document TESTSUITEFLAGS in README-hacking
5326         * README-hacking: Document -j and -k flags.
5327
5328 2012-10-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
5329
5330         deprecation: add tests
5331         * tests/input.at (Deprecated directives warn, Non-deprecated
5332         directives don't, Unput doesn't mess up locations): New tests.
5333
5334 2012-10-25  Akim Demaille  <akim@lrde.epita.fr>
5335
5336         tests: address a warning from GCC 4.4
5337         236. torture.at:465: testing Exploding the Stack Size with Alloca ...
5338         ../../../tests/torture.at:474: bison -o input.c input.y
5339         ../../../tests/torture.at:474: $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
5340         stderr:
5341         cc1: warnings being treated as errors
5342         input.y: In function 'main':
5343         input.y:60: error: 'status' may be used uninitialized in this function
5344
5345         * tests/torture.at (AT_DATA_STACK_TORTURE): Initial status to avoid
5346         the previous error.
5347
5348 2012-10-25  Akim Demaille  <akim@lrde.epita.fr>
5349
5350         tests: don't use options that Clang does not support
5351         * configure.ac (WARN_CFLAGS, WARN_CXXFLAGS): Do not include options
5352         that Clang does not support.
5353
5354 2012-10-25  Akim Demaille  <akim@lrde.epita.fr>
5355
5356         tests: restore the tests on -Werror
5357         When run as /bin/sh, Bash sets the shell variable POSIXLY_CORRECT to
5358         y.  The test suite checks for the envvar POSIXLY_CORRECT to turn of
5359         some tests not supported in POSIX mode.  Restore these tests.
5360
5361         Reported by the Hydra build farm, from Rob Vermaas.
5362
5363         * tests/local.at (AT_BISON_CHECK_WARNINGS_): Check the envvar
5364         POSIXLY_CORRECT, not the shell variable.
5365
5366 2012-10-25  Akim Demaille  <akim@lrde.epita.fr>
5367
5368         regen
5369
5370 2012-10-25  Akim Demaille  <akim@lrde.epita.fr>
5371
5372         parse-gram: update the Bison interface
5373         * src/parse-gram.y (%pure-parser, %name-prefix): Replace with...
5374         (%define api.pure, %define api.prefix)
5375         * src/location.h, src/scan-gram.h: Adjust to api.prefix.
5376
5377 2012-10-25  Akim Demaille  <akim@lrde.epita.fr>
5378
5379         fix comment
5380         * data/c.m4 (b4_YYDEBUG_define): here.
5381
5382 2012-10-24  Theophile Ranquet  <ranquet@lrde.epita.fr>
5383
5384         regen
5385
5386 2012-10-24  Theophile Ranquet  <ranquet@lrde.epita.fr>
5387
5388         deprecation: issue warnings in scanner
5389         * src/parse-gram.y: Move the handling of (three) deprecated constructs ...
5390         * src/scan-gram.l: ...Here, and issue warnings.
5391         (DEPRECATED): New.
5392
5393 2012-10-23  Akim Demaille  <akim@lrde.epita.fr>
5394
5395         Merge branch 'branch-2.6' into maint
5396         * origin/branch-2.6:
5397           maint: post-release administrivia
5398           version 2.6.4
5399           regen
5400           2.6.4: botched 2.6.3
5401
5402 2012-10-23  Akim Demaille  <akim@lrde.epita.fr>
5403
5404         maint: post-release administrivia
5405         * NEWS: Add header line for next release.
5406         * .prev-version: Record previous version.
5407         * cfg.mk (old_NEWS_hash): Auto-update.
5408
5409 2012-10-23  Akim Demaille  <akim@lrde.epita.fr>
5410
5411         version 2.6.4
5412         * NEWS: Record release date.
5413
5414 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5415
5416         regen
5417
5418 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5419
5420         2.6.4: botched 2.6.3
5421         * NEWS: here.
5422
5423 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5424
5425         Merge branch '2.6.3' into maint
5426         * 2.6.3: (22 commits)
5427           maint: post-release administrivia
5428           version 2.6.3
5429           gnulib: update
5430           tests: check %no-lines
5431           NEWS: warnings with clang
5432           warnings: avoid warnings from clang
5433           tests: no longer disable -O compiler options
5434           yacc.c: initialize yylval in pure-parser mode
5435           skeletons: style changes
5436           tests: minor improvements
5437           tests: use $PERL instead of perl
5438           build: look for Perl in configure.
5439           tests: fix sed portability issues
5440           tests: diff -u is not portable
5441           maint: word changes
5442           lalr1.cc: fix test suite portability
5443           maint: fix an erroneous include
5444           tests: check that headers are self contained
5445           doc: add missing documentation for --report
5446           headers: move CPP guards into YY_*_INCLUDED to avoid collisions
5447           ...
5448
5449 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5450
5451         maint: post-release administrivia
5452         * NEWS: Add header line for next release.
5453         * .prev-version: Record previous version.
5454         * cfg.mk (old_NEWS_hash): Auto-update.
5455
5456 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5457
5458         version 2.6.3
5459         * NEWS: Record release date.
5460
5461 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5462
5463         gnulib: update
5464
5465 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5466
5467         tests: check %no-lines
5468         * tests/synclines.at: here.
5469
5470 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5471
5472         NEWS: warnings with clang
5473         * NEWS: here.
5474
5475 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5476
5477         warnings: avoid warnings from clang
5478         Fix the following warning
5479
5480           parse-gram.c:2078:14: error: equality comparison with extraneous parentheses
5481                                 [-Werror,-Wparentheses-equality]
5482             if (((yyn) == (-91)))
5483                  ~~~~~~^~~~~~~~
5484           parse-gram.c:2078:14: note: remove extraneous parentheses around the
5485                                 comparison to silence this warning
5486             if (((yyn) == (-91)))
5487                 ~      ^       ~
5488           parse-gram.c:2078:14: note: use '=' to turn this equality comparison into
5489                                 an assignment
5490             if (((yyn) == (-91)))
5491                        ^~
5492                        =
5493           1 error generated.
5494
5495         and the following one:
5496
5497           input.cc:740:1: error: function declared 'noreturn' should not return
5498                                  [-Werror,-Winvalid-noreturn]
5499           static void yyMemoryExhausted (yyGLRStack* yystackp)
5500             __attribute__ ((__noreturn__));
5501           static void
5502           yyMemoryExhausted (yyGLRStack* yystackp)
5503           {
5504             YYLONGJMP (yystackp->yyexception_buffer, 2);
5505           }
5506           ^
5507           1 warning and 1 error generated.
5508
5509         This is Apple clang version 3.1 (tags/Apple/clang-318.0.61).
5510
5511         * data/c.m4 (b4_table_value_equals): Use (!!(A == B)) instead of (A == B)
5512         to avoid this warning.
5513         Any reasonable compiler should generate the same code.
5514         * src/uniqstr.h (UNIQSTR_EQ): Likewise.
5515         * data/glr.c (LONGJMP): abort after longjmp to pacify clang.
5516
5517 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5518
5519         tests: no longer disable -O compiler options
5520         Tests are running without -O since
5521         f377f69fec28013c79db4efe12bbb9d48987fb2c because some warnings (about
5522         yylval not being initialized) show only when GCC is given -O2.  The
5523         previous patch fixes the warnings. Run the test suite with compiler
5524         options unmodified.
5525
5526         * tests/atlocal.in (O0CFLAGS, O0CXXFLAGS): Remove, use CFLAGS and
5527         CXXFLAGS.
5528
5529 2012-10-22  Paul Eggert  <eggert@cs.ucla.edu>
5530
5531         yacc.c: initialize yylval in pure-parser mode
5532         See http://lists.gnu.org/archive/html/bison-patches/2012-08/msg00024.html
5533         (spreading over September and October).
5534
5535         * data/yacc.c (YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN)
5536         (YY_IGNORE_MAYBE_UNINITIALIZED_END, YYLVAL_INITIALIZE):
5537         New macros.  Use them to suppress an unwanted GCC diagnostic.
5538
5539 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5540
5541         skeletons: style changes
5542         * data/yacc.c, data/glr.c: Prefer Title case for (CPP) macro arguments.
5543
5544 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5545
5546         tests: minor improvements
5547         * tests/c++.at: Space changes.
5548         Use AT_YYERROR_DEFINE.
5549         * tests/local.at (AT_YYERROR_DEFINE): Issue errors on unknown languages.
5550
5551 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5552
5553         tests: use $PERL instead of perl
5554         * tests/atlocal.in (PERL): New.
5555         Sort.
5556         * tests/calc.at, tests/input.at, tests/local.at, tests/regression.at,
5557         * tests/skeletons.at, tests/synclines.at, tests/torture.at: here.
5558
5559 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5560
5561         build: look for Perl in configure.
5562         Bison uses "/usr/bin/perl" or "perl" in several places, and it does
5563         not appear to be a problem.  But, at least to make it simpler to
5564         change PERL on the make command line, check for perl in configure.
5565
5566         * configure.ac (PERL): New.
5567         * doc/Doxyfile.in, doc/Makefile.am, tests/bison.in: Use it.
5568
5569 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5570
5571         tests: fix sed portability issues
5572         Reported by Didier Godefroy,
5573         <http://lists.gnu.org/archive/html/bug-bison/2012-10/msg00005.html>.
5574
5575         * tests/calc.at (AT_CHECK_SPACES): Use Perl.
5576
5577 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5578
5579         tests: diff -u is not portable
5580         Reported by Didier Godefroy
5581         <http://lists.gnu.org/archive/html/bug-bison/2012-10/msg00006.html>.
5582
5583         * tests/existing.at (AT_LALR1_DIFF_CHECK): Skip if diff -u does not
5584         work.
5585
5586 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5587
5588         maint: word changes
5589         * README-hacking (Typical errors): Improve wording.
5590
5591 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5592
5593         lalr1.cc: fix test suite portability
5594         Reported by Rob Vermaas' Hydra build farm on x86_64-darwin 10.2.0 with
5595         G++ 4.6.3.
5596
5597         * tests/headers.at (Several parsers): Include AT_DATA_SOURCE_PROLOGUE
5598         in the files to compile.
5599         * data/location.cc: Do not include twice string and iostream (once
5600         by position.hh, and then by location.hh).
5601         * README-hacking (Typical errors): Some hints for other maintainers.
5602
5603 2012-10-22  Theophile Ranquet  <theophile.ranquet@gmail.com>
5604
5605         maint: fix an erroneous include
5606         This fixes test 130 (Several parsers).
5607
5608         * data/location.cc: Include <iostream> rather than <iosfwd> since
5609         we really need << on strings for instance.
5610         * NEWS: Document this.
5611
5612 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5613
5614         tests: check that headers are self contained
5615         Reported by Alexandre Duret-Lutz.
5616
5617         * tests/headers.at (Several parsers): here.
5618
5619 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5620
5621         doc: add missing documentation for --report
5622         * doc/bison.texi (Bison Options): Document --report's "solved", "all",
5623         and "none".
5624
5625 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5626
5627         headers: move CPP guards into YY_*_INCLUDED to avoid collisions
5628         See <http://lists.gnu.org/archive/html/bug-bison/2012-09/msg00016.html>.
5629
5630         * data/c.m4 (b4_cpp_guard): Prepend YY_ and append _INCLUDED.
5631         * tests/headers.at: Adjust.
5632         * NEWS, doc/bison.texi: Document.
5633
5634 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5635
5636         minor changes.
5637         * NEWS: Word changes.
5638         * doc/bison.texi: Spell check.
5639         Fix minor issues.
5640         * tests/headers.at: Comment and formatting changes.
5641
5642 2012-10-22  Akim Demaille  <akim@lrde.epita.fr>
5643
5644         gnulib: update
5645
5646 2012-10-19  Akim Demaille  <akim@lrde.epita.fr>
5647
5648         gnulib: update
5649
5650 2012-10-19  Akim Demaille  <akim@lrde.epita.fr>
5651
5652         xml: slight improvement of the DOT output
5653         This was completely forgotten...  Nothing about XML is actually
5654         documented...
5655
5656         * data/xslt/xml2dot.xsl: Use boxes, and Courier font.
5657
5658 2012-10-19  Akim Demaille  <akim@lrde.epita.fr>
5659
5660         maint: check for dot before using it
5661         * configure.ac: here.
5662         * doc/Makefile.am: Use $(DOT).
5663         Ship the generated files, to spare the user the need for Graphviz.
5664
5665 2012-10-18  Theophile Ranquet  <theophile.ranquet@gmail.com>
5666
5667         graphs: documentation
5668         Note that 'make web-manual' fails.
5669
5670         * NEWS: Document these changes.
5671         * doc/Makefile.am: Adjust to generate example files.
5672         * doc/bison.texi: Add a Graphviz section after "Understanding::", the section
5673         describing the .output file, because these are similar.
5674         * doc/figs/example-reduce.dot, doc/figs/example-reduce.txt,
5675         doc/figs/example-shift.dot, doc/figs/example-shift.txt: New, minimal
5676         examples to illustrate the documentation.
5677
5678 2012-10-18  Theophile Ranquet  <theophile.ranquet@gmail.com>
5679
5680         graphs: add tests, introducing -k graph
5681         * tests/output.at (AT_TEST): New.
5682         Use it to add 6 --graph tests.
5683
5684 2012-10-18  Theophile Ranquet  <theophile.ranquet@gmail.com>
5685
5686         graphs: change the output format of the rules
5687         Use something similar to the report file.
5688
5689         * src/print_graph.c (print_lhs): New, obstack equivalent of rule_lhs_print.
5690         (print_core): Use here.
5691
5692 2012-10-18  Theophile Ranquet  <theophile.ranquet@gmail.com>
5693
5694         graphs: style changes
5695         * src/graphviz.c (start_graph): Use courier font.
5696         (conclude_red): Use commas to separate attributes. Show the acceptation
5697         as a special reduction, with a blue color and an "Acc" label. Show the
5698         lookahead tokens between square brackets.
5699         (output_red): No longer label default reductions.
5700         * src/print_graph.c (print_core): Refactor spacing, and print an
5701         additional space between a rule's rhs and its lookahead tokens. Also,
5702         capitalize "State".
5703         (print_actions): Style, move a declaration.
5704
5705 2012-10-18  Theophile Ranquet  <theophile.ranquet@gmail.com>
5706
5707         graphs: address an issue with R/R conflicts
5708         All disabled reductions should now be shown as such.
5709
5710         * src/graphviz.c (output_red): Here.
5711         (conclude_red): New.
5712
5713 2012-10-16  Akim Demaille  <akim@lrde.epita.fr>
5714
5715         news: spell check
5716         * NEWS: here.
5717
5718 2012-10-16  Akim Demaille  <akim@lrde.epita.fr>
5719
5720         Merge branch 'maint'
5721         * origin/maint:
5722           java: use api.location.type and api.position.type
5723
5724 2012-10-16  Akim Demaille  <akim@lrde.epita.fr>
5725
5726         variables: use singular in %define variable names
5727         See http://lists.gnu.org/archive/html/bison-patches/2012-02/msg00045.html
5728
5729         * doc/bison.texi, src/lalr.c, src/main.c, src/muscle-tab.c,
5730         * src/print.c, src/reader.c, src/tables.c, tests/conflicts.at,
5731         * tests/input.at, tests/reduce.at:
5732         s/lr.default-reductions/lr.default-reduction/
5733         s/lr.keep-unreachable-states/lr.keep-unreachable-state/.
5734         * NEWS: Document.
5735
5736 2012-10-16  Akim Demaille  <akim@lrde.epita.fr>
5737
5738         java: fixes
5739         * data/java.m4: Remove stray M4 characters.
5740
5741 2012-10-16  Akim Demaille  <akim@lrde.epita.fr>
5742
5743         api.tokens.prefix -> api.token.prefix
5744         See
5745         http://lists.gnu.org/archive/html/bison-patches/2012-02/msg00045.html
5746         Note that api.tokens.prefix has not been released, yet.
5747
5748         * NEWS, data/bison.m4, doc/bison.texi, tests/c++.at,
5749         * tests/calc.at, tests/java.at, tests/local.at: Do it.
5750         * src/muscle-tab.c (muscle_percent_variable_update): Ensure
5751         backward compatibility.
5752
5753 2012-10-15  Theophile Ranquet  <theophile.ranquet@gmail.com>
5754
5755         scan-skel.l: shift complain_args arguments
5756         Because argv[0] is never used, shift it out from the argument list.
5757
5758         * src/complain.c (complain_args): Here.
5759         * src/scan-skel.l (at_complain): Adjust argv and argc.
5760
5761 2012-10-15  Theophile Ranquet  <theophile.ranquet@gmail.com>
5762
5763         scan-skel.l: formatting changes
5764         * src/scan-skel.l (fail_for_at_directive_too_few_args): Here.
5765
5766 2012-10-12  Akim Demaille  <akim@lrde.epita.fr>
5767
5768         java: use api.location.type and api.position.type
5769         * data/java.m4: here.
5770         * NEWS, doc/bison.texi, tests/java.at: Adjust.
5771
5772 2012-10-12  Akim Demaille  <akim@lrde.epita.fr>
5773
5774         Merge branch 'maint'
5775         * origin/maint:
5776           tests: check %no-lines
5777           tests: minor simplification
5778           graphs: stylistic changes.
5779           graphs: minor style changes
5780           graphs: show reductions
5781           graphs: style: prefix state number with "state"
5782           graphs: style: use left justification for states
5783           graphs: style: prefix rules and change shapes
5784           obstack: import obstack_finish0 from master
5785           c++: api.location.type
5786           muscles: a function for backward compatibility
5787           maint: more macros
5788
5789 2012-10-12  Akim Demaille  <akim@lrde.epita.fr>
5790
5791         tests: check %no-lines
5792         * tests/synclines.at: here.
5793
5794 2012-10-12  Akim Demaille  <akim@lrde.epita.fr>
5795
5796         tests: minor simplification
5797         * tests/headers.at (Several parsers): Use *.y even for C++.
5798
5799 2012-10-11  Akim Demaille  <akim@lrde.epita.fr>
5800
5801         graphs: stylistic changes.
5802         * src/graphviz.c (output_red): Comment and formatting changes.
5803
5804 2012-10-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
5805
5806         graphs: minor style changes
5807         * src/graphviz.c (output_red): Fix C90 issues.
5808         Reduce variable scopes.
5809
5810 2012-10-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
5811
5812         graphs: show reductions
5813         * src/graphviz.c (output_red): New, show reductions on the graph.
5814         (no_reduce_bitset_init): New, initialize a bitset.
5815         (print_token): New, print a lookahead token.
5816         (escape): New, print "foo" as \"foo\" because Dot doesn't like quotes within
5817         a label.
5818
5819         * src/graphviz.h : Adjust.
5820         * src/print_graph.c (print_actions): Call output_red here.
5821
5822 2012-10-11  Theophile Ranquet  <theophile.ranquet@gmail.com>
5823
5824         graphs: style: prefix state number with "state"
5825         * src/print_graph.c (print_core): Here.
5826
5827 2012-10-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
5828
5829         graphs: style: use left justification for states
5830         The label text of nodes is centered "by default" (by the use of '\n' as
5831         a line feed). This gives bad readability to the grammar rules shown in
5832         state nodes, a left justification is much nicer. This is done by using '\l'
5833         as the line feed.
5834
5835         In order to allow \l in the DOT file, changes to the quoting system seem
5836         necessary.
5837
5838         * src/print_graph.c (print_core): Escape tokens here, instead of...
5839         * src/graphviz.c (output_node): Here...
5840         (escape): Using this, new.
5841
5842 2012-10-11  Theophile Ranquet  <theophile.ranquet@gmail.com>
5843
5844         graphs: style: prefix rules and change shapes
5845         * src/graphviz.c (start_graph): Use box rather than ellipsis.
5846         * src/print_graph.c (print_core): Prefix rules with their number.
5847
5848 2012-10-11  Theophile Ranquet  <theophile.ranquet@gmail.com>
5849
5850         obstack: import obstack_finish0 from master
5851         * src/system.h (obstack_finish0): New.
5852
5853 2012-10-11  Akim Demaille  <akim@lrde.epita.fr>
5854
5855         Merge branch 'maint'
5856         * origin/maint:
5857           NEWS: warnings with clang
5858           warnings: avoid warnings from clang
5859           tests: no longer disable -O compiler options
5860           yacc.c: initialize yylval in pure-parser mode
5861           skeletons: style changes
5862           lalr1.cc: document exception safety
5863           lalr1.cc: check exception safety of error handling
5864           lalr1.cc: check (and fix) %printer exception safety
5865           lalr1.cc: check (and fix) %initial-action exception safety
5866           lalr1.cc: fix exception safety
5867           lalr1.cc: check exception safety.
5868           lalr1.cc: indentation fixes.
5869           lalr1.cc: don't leave macros define to nothing
5870           tests: minor improvements
5871           tests: use $PERL instead of perl
5872           build: look for Perl in configure.
5873           tests: fix sed portability issues
5874           tests: diff -u is not portable
5875
5876 2012-10-09  Akim Demaille  <akim@lrde.epita.fr>
5877
5878         c++: api.location.type
5879         This feature was introduced in 95a2de5695670ae0df98cb3c42141cad549f0204
5880         (which is part of 2.5), but not documented.  Give it a proper name, and
5881         make it public.
5882
5883         * data/c++.m4, data/lalr1.cc, data/glr.cc, data/java.m4: Use
5884         api.location.type instead of location_type.
5885         * src/muscle-tab.c (muscle_percent_variable_update): Map the latter to
5886         the former.
5887         * tests/local.at: Adjust.
5888         * tests/calc.at: Use api.location.type.
5889         Leave tests/java.at with location_type, at least for the time being,
5890         to cover both names.
5891         * doc/bison.texi: Document api.location.type.
5892         (User Defined Location Type): New.
5893         * NEWS: Update.
5894
5895 2012-10-09  Akim Demaille  <akim@lrde.epita.fr>
5896
5897         muscles: a function for backward compatibility
5898         Based on commit 171ad99d6421935a278656be6dc7161591835d00 from master.
5899
5900         * src/muscle-tab.c (muscle_percent_variable_update): New.
5901         (muscle_percent_define_insert): Use it.
5902         Define the variables with their initial value.
5903
5904 2012-10-09  Akim Demaille  <akim@lrde.epita.fr>
5905
5906         maint: more macros
5907         * src/output.c (ARRAY_CARDINALITY): Move to...
5908         * src/system.h: here.
5909         (STREQ, STRNEQ): new.
5910
5911 2012-10-08  Akim Demaille  <akim@lrde.epita.fr>
5912
5913         NEWS: warnings with clang
5914         * NEWS: here.
5915
5916 2012-10-08  Akim Demaille  <akim@lrde.epita.fr>
5917
5918         warnings: avoid warnings from clang
5919         Fix the following warning
5920
5921           parse-gram.c:2078:14: error: equality comparison with extraneous parentheses
5922                                 [-Werror,-Wparentheses-equality]
5923             if (((yyn) == (-91)))
5924                  ~~~~~~^~~~~~~~
5925           parse-gram.c:2078:14: note: remove extraneous parentheses around the
5926                                 comparison to silence this warning
5927             if (((yyn) == (-91)))
5928                 ~      ^       ~
5929           parse-gram.c:2078:14: note: use '=' to turn this equality comparison into
5930                                 an assignment
5931             if (((yyn) == (-91)))
5932                        ^~
5933                        =
5934           1 error generated.
5935
5936         and the following one:
5937
5938           input.cc:740:1: error: function declared 'noreturn' should not return
5939                                  [-Werror,-Winvalid-noreturn]
5940           static void yyMemoryExhausted (yyGLRStack* yystackp)
5941             __attribute__ ((__noreturn__));
5942           static void
5943           yyMemoryExhausted (yyGLRStack* yystackp)
5944           {
5945             YYLONGJMP (yystackp->yyexception_buffer, 2);
5946           }
5947           ^
5948           1 warning and 1 error generated.
5949
5950         This is Apple clang version 3.1 (tags/Apple/clang-318.0.61).
5951
5952         * data/c.m4 (b4_table_value_equals): Use (!!(A == B)) instead of (A == B)
5953         to avoid this warning.
5954         Any reasonable compiler should generate the same code.
5955         * src/uniqstr.h (UNIQSTR_EQ): Likewise.
5956         * data/glr.c (LONGJMP): abort after longjmp to pacify clang.
5957
5958 2012-10-08  Akim Demaille  <akim@lrde.epita.fr>
5959
5960         tests: no longer disable -O compiler options
5961         Tests are running without -O since
5962         f377f69fec28013c79db4efe12bbb9d48987fb2c because some warnings (about
5963         yylval not being initialized) show only when GCC is given -O2.  The
5964         previous patch fixes the warnings. Run the test suite with compiler
5965         options unmodified.
5966
5967         * tests/atlocal.in (O0CFLAGS, O0CXXFLAGS): Remove, use CFLAGS and
5968         CXXFLAGS.
5969
5970 2012-10-08  Paul Eggert  <eggert@cs.ucla.edu>
5971
5972         yacc.c: initialize yylval in pure-parser mode
5973         See http://lists.gnu.org/archive/html/bison-patches/2012-08/msg00024.html
5974         (spreading over September and October).
5975
5976         * data/yacc.c (YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN)
5977         (YY_IGNORE_MAYBE_UNINITIALIZED_END, YYLVAL_INITIALIZE):
5978         New macros.  Use them to suppress an unwanted GCC diagnostic.
5979
5980 2012-10-08  Akim Demaille  <akim@lrde.epita.fr>
5981
5982         skeletons: style changes
5983         * data/yacc.c, data/glr.c: Prefer Title case for (CPP) macro arguments.
5984
5985 2012-10-06  Akim Demaille  <akim@lrde.epita.fr>
5986
5987         lalr1.cc: document exception safety
5988         * NEWS: here.
5989         * doc/bison.texi (Destructor Decl, C++ Parser Interface): and there.
5990
5991 2012-10-06  Akim Demaille  <akim@lrde.epita.fr>
5992
5993         lalr1.cc: check exception safety of error handling
5994         * tests/c++.at (Exception safety): Don't use swap here, it
5995         is useless.
5996         Cover more test cases: yyerror, YYERROR, YYABORT, and
5997         error recovery.
5998         (Object): Instead of just keeping a counter of instances, keep
5999         a list of them.
6000
6001 2012-10-06  Akim Demaille  <akim@lrde.epita.fr>
6002
6003         lalr1.cc: check (and fix) %printer exception safety
6004         * tests/c++.at (Exception safety): Let the parser support the --debug
6005         option.
6006         On 'p', throw an exception from the %printer.
6007         * data/lalr1.cc (yyparse): Do not display the values we discard, as it
6008         uses %printer, which might have thrown the exception.
6009
6010 2012-10-06  Akim Demaille  <akim@lrde.epita.fr>
6011
6012         lalr1.cc: check (and fix) %initial-action exception safety
6013         * data/lalr1.cc: Check size > 1, rather than size != 1, when cleaning
6014         the stack, as at the beginning, size is 0.
6015         * tests/c++.at (Exception safety): Check exception safety in
6016         %initial-action.
6017
6018 2012-10-06  Akim Demaille  <akim@lrde.epita.fr>
6019
6020         lalr1.cc: fix exception safety
6021         lalr1.cc does not reclaim its memory when ended by an exception.
6022
6023         Reported by Oleksii Taran:
6024         http://lists.gnu.org/archive/html/help-bison/2012-09/msg00000.html
6025
6026         * data/lalr1.cc (yyparse): Protect the whole yyparse by a try-catch
6027         block that cleans the stack and the lookahead.
6028
6029 2012-10-06  Akim Demaille  <akim@lrde.epita.fr>
6030
6031         lalr1.cc: check exception safety.
6032         * tests/c++.at (Exception safety): New.
6033
6034 2012-10-06  Akim Demaille  <akim@lrde.epita.fr>
6035
6036         lalr1.cc: indentation fixes.
6037         * data/lalr1.cc (yyparse): here.
6038         Untabify a block of code.
6039
6040 2012-10-06  Akim Demaille  <akim@lrde.epita.fr>
6041
6042         lalr1.cc: don't leave macros define to nothing
6043         * data/lalr1.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT, YY_STACK_PRINT):
6044         Define to something so that, for instance, "if (foo) YY_SYMBOL_PRINT"
6045         is valid even when !YYDEBUG.
6046
6047 2012-10-06  Akim Demaille  <akim@lrde.epita.fr>
6048
6049         tests: minor improvements
6050         * tests/c++.at: Space changes.
6051         Use AT_YYERROR_DEFINE.
6052         * tests/local.at (AT_YYERROR_DEFINE): Issue errors on unknown languages.
6053
6054 2012-10-05  Akim Demaille  <akim@lrde.epita.fr>
6055
6056         tests: use $PERL instead of perl
6057         * tests/atlocal.in (PERL): New.
6058         Sort.
6059         * tests/calc.at, tests/input.at, tests/local.at, tests/regression.at,
6060         * tests/skeletons.at, tests/synclines.at, tests/torture.at: here.
6061
6062 2012-10-05  Akim Demaille  <akim@lrde.epita.fr>
6063
6064         build: look for Perl in configure.
6065         Bison uses "/usr/bin/perl" or "perl" in several places, and it does
6066         not appear to be a problem.  But, at least to make it simpler to
6067         change PERL on the make command line, check for perl in configure.
6068
6069         * configure.ac (PERL): New.
6070         * doc/Doxyfile.in, doc/Makefile.am, tests/bison.in: Use it.
6071
6072 2012-10-05  Akim Demaille  <akim@lrde.epita.fr>
6073
6074         tests: fix sed portability issues
6075         Reported by Didier Godefroy,
6076         <http://lists.gnu.org/archive/html/bug-bison/2012-10/msg00005.html>.
6077
6078         * tests/calc.at (AT_CHECK_SPACES): Use Perl.
6079
6080 2012-10-05  Akim Demaille  <akim@lrde.epita.fr>
6081
6082         tests: diff -u is not portable
6083         Reported by Didier Godefroy
6084         <http://lists.gnu.org/archive/html/bug-bison/2012-10/msg00006.html>.
6085
6086         * tests/existing.at (AT_LALR1_DIFF_CHECK): Skip if diff -u does not
6087         work.
6088
6089 2012-10-04  Akim Demaille  <akim@lrde.epita.fr>
6090
6091         Merge branch 'maint'
6092         * origin/maint:
6093           maint: word changes
6094           lalr1.cc: fix test suite portability
6095           maint: fix an erroneous include
6096           tests: check that headers are self contained
6097           doc: add missing documentation for --report
6098
6099 2012-10-04  Akim Demaille  <akim@lrde.epita.fr>
6100
6101         scan-skel: use the scanner to reject all invalid directives
6102         * src/scan-skel.l: Use a simpler and more consistent pattern escaping
6103         scheme.
6104         Catch all the invalid directives here by just removing the previous
6105         catch-all-but-alphabetical rule.
6106
6107 2012-10-04  Theophile Ranquet  <theophile.ranquet@gmail.com>
6108
6109         scan-skel: recognize the @directives directly in scanner
6110         * src/scan-skel.l (at_directive, at_init): New.
6111         (at_ptr): New, function pointer used to call the right at_directive
6112         function (at_basename, etc.).
6113         (outname): Rename as...
6114         (out_name): this, for consistency with out_lineno.
6115
6116 2012-10-04  Theophile Ranquet  <theophile.ranquet@gmail.com>
6117
6118         scan-skel: split @directive functions
6119         * src/scan-skel.l (at_directive_perform): Split as...
6120         (at_basename, at_complain, at_output): these.
6121
6122 2012-10-04  Theophile Ranquet  <theophile.ranquet@gmail.com>
6123
6124         errors: support indented context info in m4 macros
6125         * TODO: Address the issue, so remove it.
6126         * data/bison.m4: Use b4_error with [[note]] rather than a complain_at
6127         for context information.
6128         * src/complain.c (complain_args): Take an additional argument, an
6129         indentation pointer, to allow the dispatching of context information.
6130         * src/complain.h (complain_args): Adjust prototype.
6131         * src/scan-skel.l (at_directive_perform): Recognize the new @note mark.
6132         * tests/input.at: Adjust.
6133
6134 2012-10-04  Theophile Ranquet  <theophile.ranquet@gmail.com>
6135
6136         errors: factor b4_error @directives
6137         Instead of @complain, @warn, and @fatal, use a unique @complain
6138         directive. This directive's first argument is "complain", "warn", etc.
6139
6140         * data/bison.m4 (m4_error): Here.
6141         * src/scan-skel.l (at_directive_perform): Adjust.
6142         (flag): Replace the switch by safer and more explicit if branches.
6143
6144 2012-10-04  Theophile Ranquet  <theophile.ranquet@gmail.com>
6145
6146         errors: pointerize complain_at_indent
6147         * src/complain.c (complain_at_indent): Rename as...
6148         (complaint_indent): This, and take the location as a pointer.
6149         * src/complain.h, src/muscle-tab.c, src/reader.c, src/scan-code.l,
6150         src/symtab.c: Adjust.
6151
6152 2012-10-04  Akim Demaille  <akim@lrde.epita.fr>
6153
6154         maint: word changes
6155         * README-hacking (Typical errors): Improve wording.
6156
6157 2012-10-04  Akim Demaille  <akim@lrde.epita.fr>
6158
6159         lalr1.cc: fix test suite portability
6160         Reported by Rob Vermaas' Hydra build farm on x86_64-darwin 10.2.0 with
6161         G++ 4.6.3.
6162
6163         * tests/headers.at (Several parsers): Include AT_DATA_SOURCE_PROLOGUE
6164         in the files to compile.
6165         * data/location.cc: Do not include twice string and iostream (once
6166         by position.hh, and then by location.hh).
6167         * README-hacking (Typical errors): Some hints for other maintainers.
6168
6169 2012-10-03  Theophile Ranquet  <theophile.ranquet@gmail.com>
6170
6171         maint: fix an erroneous include
6172         This fixes test 130 (Several parsers).
6173
6174         * data/location.cc: Include <iostream> rather than <iosfwd> since
6175         we really need << on strings for instance.
6176         * NEWS: Document this.
6177
6178 2012-10-03  Akim Demaille  <akim@lrde.epita.fr>
6179
6180         tests: check that headers are self contained
6181         Reported by Alexandre Duret-Lutz.
6182
6183         * tests/headers.at (Several parsers): here.
6184
6185 2012-10-03  Akim Demaille  <akim@lrde.epita.fr>
6186
6187         doc: add missing documentation for --report
6188         * doc/bison.texi (Bison Options): Document --report's "solved", "all",
6189         and "none".
6190
6191 2012-10-01  Akim Demaille  <akim@lrde.epita.fr>
6192
6193         build: use gnulib's non-recursive-gnulib-prefix-hack
6194         Suggested by Jim Meyering.
6195
6196         * etc/prefix-gnulib-mk: Remove, as it is now provided by...
6197         * bootstrap.conf (modules): the non-recursive-gnulib-prefix-hack module.
6198         * build-aux/.gitignore, configure.ac, m4/.gitignore: Adjust.
6199
6200 2012-10-01  Akim Demaille  <akim@lrde.epita.fr>
6201
6202         warnings: simplify the m4 interface
6203         * data/bison.m4 (error_at): Replace...
6204         (error): this.
6205         (b4_warn, b4_complain, b4_fatal): Bounce to their _at equivalent,
6206         with empty location.
6207         * src/scan-skel.l (at_directive_perform): Simplify accordingly.
6208
6209 2012-10-01  Theophile Ranquet  <theophile.ranquet@gmail.com>
6210
6211         warnings: separate flags_argmatch
6212         This function is now a mere iterator that calls flag_argmatch,
6213         a new function, that matches a single option parameter.
6214
6215         * src/getargs.c (flag_argmatch): New, taken from...
6216         (flags_argmatch): Here.
6217
6218 2012-10-01  Theophile Ranquet  <theophile.ranquet@gmail.com>
6219
6220         warnings: refactoring
6221         The code here was too confusing, this seems more natural.
6222
6223         * src/complain.c (error_message): Move the indentation check and the category
6224         output to complains. Also, no longer take a 'warnings' argument.
6225         (complains): Factor calls to error_message.
6226
6227 2012-10-01  Theophile Ranquet  <theophile.ranquet@gmail.com>
6228
6229         formatting changes
6230         * src/complain.c: Here.
6231
6232 2012-10-01  Theophile Ranquet  <theophile.ranquet@gmail.com>
6233
6234         warnings: organize variadic complaints call
6235         Move the dispatch of variadic complains to complain.c, rather than do
6236         it in a scanner.
6237
6238         * src/complain.h, src/complain.c (complain_args): New.
6239         * src/scan-skel.l (at_directive_perform): Use it.
6240
6241 2012-10-01  Theophile Ranquet  <theophile.ranquet@gmail.com>
6242
6243         warnings: fusion of complain and complain_at
6244         These functions are very similar, and keeping them seperate makes
6245         future improvements difficult, so merge them.
6246
6247         This impacts 89 calls.
6248
6249         * src/bootstrap.conf: Adjust.
6250         * src/complain.c (complain, complain_at): Merge into...
6251         (complain): this.
6252         (complain_args): Adjust.
6253         * src/complain.h, src/conflicts.c, src/files.c, src/getargs.c,
6254         * src/gram.c, src/location.c, src/muscle-tab.c, src/parse-gram.y,
6255         * src/reader.c, src/reduce.c, src/scan-code.l, src/scan-gram.l,
6256         * src/scan-skel.l, src/symlist.c, src/symtab.c:
6257         Adjust.
6258
6259 2012-10-01  Theophile Ranquet  <theophile.ranquet@gmail.com>
6260
6261         warnings: remove spurious suffixes on context
6262         Rectify a bug that introduced suffixes out of place.
6263
6264         * src/complainc.c (complains): Handle all three special warning bits.
6265         * src/scan-code.l (show_sub_message): Remove useless argument.
6266         * tests/named-refs.at: Adjust.
6267
6268 2012-10-01  Akim Demaille  <akim@lrde.epita.fr>
6269
6270         Merge remote-tracking branch 'origin/maint'
6271         * origin/maint:
6272           headers: move CPP guards into YY_*_INCLUDED to avoid collisions
6273           minor changes.
6274
6275 2012-10-01  Akim Demaille  <akim@lrde.epita.fr>
6276
6277         Merge remote-tracking branch 'origin/maint'
6278         * origin/maint:
6279           gnulib: update
6280           errors: indent "user token number redeclaration" context
6281
6282 2012-10-01  Akim Demaille  <akim@lrde.epita.fr>
6283
6284         headers: move CPP guards into YY_*_INCLUDED to avoid collisions
6285         See <http://lists.gnu.org/archive/html/bug-bison/2012-09/msg00016.html>.
6286
6287         * data/c.m4 (b4_cpp_guard): Prepend YY_ and append _INCLUDED.
6288         * tests/headers.at: Adjust.
6289         * NEWS, doc/bison.texi: Document.
6290
6291 2012-10-01  Akim Demaille  <akim@lrde.epita.fr>
6292
6293         minor changes.
6294         * NEWS: Word changes.
6295         * doc/bison.texi: Spell check.
6296         Fix minor issues.
6297         * tests/headers.at: Comment and formatting changes.
6298
6299 2012-09-28  Akim Demaille  <akim@lrde.epita.fr>
6300
6301         gnulib: update
6302
6303 2012-09-28  Theophile Ranquet  <theophile.ranquet@gmail.com>
6304
6305         errors: indent "user token number redeclaration" context
6306         This is the continuation of the work on the readability of errors
6307         context.
6308
6309         * src/symtab.c (user_token_number_redeclaration): Use
6310         complain_at_indent to output with increased indentation level.
6311         * tests/input:at: Apply this change.
6312
6313 2012-09-27  Theophile Ranquet  <theophile.ranquet@gmail.com>
6314
6315         errors: don't display "warnings treated as errors"
6316         This line doesn't add any meaningful information anymore, the appended
6317         [-Werror=CATEGORY] is enough.  It is actually more insightful, as it
6318         allows to distinguish warnings treated as errors from those that
6319         aren't.  This line is also removed by gcc 4.8.
6320
6321         * src/complain.c (set_warnings_issued): The only action left was
6322         checking if the error bit corresponding to the warning issued was set,
6323         and that function was only called once. Therefore, remove it, and do
6324         its job directly in the caller...
6325         (complains): here.
6326         * src/complains.h: Adjust.
6327         * tests/input.at: Adjust.
6328         * NEWS: Document this change.
6329
6330 2012-09-27  Akim Demaille  <akim@lrde.epita.fr>
6331
6332         errors: change output, and improve -y coherence
6333         The prefix of warnings treated as errors is now "error: ". Also, their
6334         suffix now reflects the changes in the Werror option format.
6335
6336         An output for -Werror=other used to be:
6337           bison: warnings being treated as errors
6338           input.y:1.1: warning: stray ',' treated as white space [-Wother]
6339
6340         It is now:
6341           bison: warnings being treated as errors
6342           input.y:1.1: error: stray ',' treated as white space [-Werror=other]
6343
6344         The line "warnings being treated as errors" no longer adds any info,
6345         it will be removed in a forthcoming change.
6346
6347         * NEWS: Add entry "Enhancement of the -Werror"
6348         * doc/bison.texi: Move the warnings-as-error to a new bullet.
6349         * src/complain.c (complains): Refactor, change the prefix of warnings
6350         that are treated as errors.
6351         (warnings_print_categories): Support for [-Werror=CATEGORY] display
6352         * src/getargc.c (getargs): -y implies -Werror=yacc
6353         * tests/input.at: Update expected --yacc output for coherence.
6354
6355 2012-09-27  Theophile Ranquet  <theophile.ranquet@gmail.com>
6356
6357         errors: introduce the -Werror=CATEGORY option
6358         This new option is a lot more flexible than the previous one. Its
6359         details will be discussed in the NEWS and info file, in a forthcoming
6360         change.
6361
6362         If no category is specified (ie: used as simply "-Werror"), the
6363         functionality is the same as before.
6364
6365         * src/complain.c (errors_flag): New variable.
6366         (set_warning_issued): Accept warning categories as an argument.
6367         * src/complain.h (Wall): Better definition.
6368         * src/getargs.c (flags_argmatch): Support for the new format.
6369         (usage): Update -Werror to -Werror[=CATEGORY] format.
6370
6371         * src/complain.c (errors_flag): New variable.
6372         (set_warning_issued): Accept warning categories as an argument.
6373         * src/complain.h (Wall): Better definition.
6374         * src/getargs.c (flags_argmatch): Support for the new format.
6375         (usage): Update -Werror to -Werror=[CATEGORY] format.
6376
6377 2012-09-26  Akim Demaille  <akim@lrde.epita.fr>
6378
6379         Merge branch 'maint'
6380         * maint:
6381           warnings: introduce -Wdeprecated in the usage info
6382           errors: prefix the output with "error: "
6383           errors: indent "invalid value for %define" context
6384           errors: indent "%define var" redefinition context
6385           errors: indent "symbol redeclaration" context
6386           errors: indent "result type clash" error context
6387
6388 2012-09-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
6389
6390         warnings: introduce -Wdeprecated in the usage info
6391         The deprecated warning, introduced some time ago, was not displayed in
6392         the usage message. This patch addresses the issue.
6393
6394         * src/getargs.c (usage): Insert here.
6395
6396 2012-09-26  Akim Demaille  <akim@lrde.epita.fr>
6397
6398         regen
6399
6400 2012-09-26  Akim Demaille  <akim@lrde.epita.fr>
6401
6402         Merge remote-tracking branch 'origin/maint'
6403         * origin/maint:
6404           regen
6405           yacc: fix handling of CPP guards when no header is generated
6406           gnulib: update
6407
6408 2012-09-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
6409
6410         errors: prefix the output with "error: "
6411         This improves readability. This is also what gcc does.
6412
6413         * NEWS: Document this change.
6414         * src/complain.c (complain_at): Prefix all errors with "error: ".
6415         (complain_at_indent, warn_at_indent): Do not prefix the context
6416         information of errors, which are basically just indented errors.
6417         * tests/conflicts.at, tests/glr-regression.at, tests/input.at,
6418         tests/named-refs.at, tests/output.at, tests/push.at,
6419         tests/regression.at, tests/skeletons.at: Apply this change.
6420
6421 2012-09-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
6422
6423         errors: indent "invalid value for %define" context
6424         This is the continuation of the work on the readability of errors
6425             context.
6426
6427         For example, what used to be:
6428           input.y:1.9-29: invalid value for %define variable 'foo' : 'bar'
6429           input.y:1.9-29: accepted value: 'most'
6430
6431         is now:
6432           input.y:1.9-29: invalid value for %define variable 'foo' : 'bar'
6433           input.y:1.9-29:     accepted value: 'most'
6434
6435         * src/muscle-tab.c (muscle_percent_define_check_values): Use
6436         complain_at_indent to output with increased indentation level.
6437         * tests/input:at: Apply this change.
6438
6439 2012-09-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
6440
6441         errors: indent "%define var" redefinition context
6442         This is the continuation of the work on the readability of errors
6443         context.
6444
6445         For example, what used to be:
6446           input.y:2.9-11: %define variable 'var' redefined
6447           input.y:1.9-11: previous definition
6448
6449         is now:
6450           input.y:2.9-11: %define variable 'var' redefined
6451           input.y:1.9-11:     previous definition
6452
6453         * src/muscle-tab.c (muscle_percent_define_insert): Use
6454         complain_at_indent to output with increased indentation level.
6455         * tests/input.at: Apply this change.
6456
6457 2012-09-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
6458
6459         errors: indent "symbol redeclaration" context
6460         This is the continuation of the work on the readability of errors
6461         context.
6462
6463         For example, what used to be:
6464           input.y:5.10-24: %printer redeclaration for <field2>
6465           input.y:3.11-25: previous declaration
6466
6467         is now:
6468           input.y:5.10-24: %printer redeclaration for <field2>
6469           input.y:3.11-25:     previous declaration
6470
6471         * NEWS: Document this change.
6472         * src/symtab.c (symbol_redeclaration, semantic_type_redeclaration,
6473         user_token_number_redeclaration, default_tagged_destructor_set,
6474         default_tagless_destructor_set, default_tagged_printer_set,
6475         default_tagless_printer_set): Use complain_at_indent to
6476         output with increased indentation level.
6477         * tests/input.at: Apply this change.
6478
6479 2012-09-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
6480
6481         errors: indent "result type clash" error context
6482         This used to be the format of the error report:
6483
6484           input.y:6.5-10: result type clash on merge function 'merge': [...]
6485           input.y:2.4-9: previous declaration
6486
6487         In order to distinguish the actual error from the context provided, we
6488         rather this new output:
6489
6490           input.y:6.5-10: result type clash on merge function 'merge': [...]
6491           input.y:2.4-9:     previous declaration
6492
6493         Another patch will introduce an "error: " prefix to all non-indented
6494         lines, giving yet better readability to the reports.
6495
6496         * src/complain.h (SUB_INDENT): Move to here.
6497         * src/reader.c (record_merge_function_type): Use complain_at_indent to
6498         output with increased indentation level.
6499         * src/scan-code.l (SUB_INDENT): Remove from here.
6500         * tests/glr-regression.at: Apply this change.
6501
6502 2012-09-25  Akim Demaille  <akim@lrde.epita.fr>
6503
6504         warnings: use the regular interface for s/r and r/r conflicts
6505         The current routines used to display s/r and r/r conflicts are both
6506         inconvenient from the programmer point of view (they do not use the
6507         warning infrastructure) and for the user (the messages are rather
6508         terse, not necessarily pleasant to read, and because they don't use
6509         the same routines, they look different).
6510
6511         It was due to the belief (dating back to the initial checked-in
6512         version of Bison) that, at some point, POSIX Yacc mandated the format
6513         for these messages.  Today, the Open Group's manual page for Yacc,
6514         <http://pubs.opengroup.org/onlinepubs/009695399/utilities/yacc.html>,
6515         explicitly states that the format of these messages is unspecified.
6516         See commit be7280480c175bed203883f524c7dcd6cf37c13d and
6517         <http://lists.gnu.org/archive/html/bison-patches/2002-12/msg00027.html>.
6518
6519         For a discussion on the chosen warning format, see
6520         http://lists.gnu.org/archive/html/bison-patches/2012-09/msg00039.html
6521
6522         In an effort to factor the handling of errors and warnings, use the
6523         Bison warning routines to report these messages.
6524
6525         * src/conflicts.c (conflicts_print): Rewrite with clearer sections
6526         about S/R and then R/R conflicts.
6527         (conflict_report): Remove, inlined in its sole
6528         caller...
6529         (conflicts_output): here.
6530         * tests/conflicts.at, tests/existing.at, tests/glr-regression.at,
6531         * tests/reduce.at, tests/regression.at: Adjust the expected results.
6532         * NEWS: Update.
6533
6534 2012-09-25  Akim Demaille  <akim@lrde.epita.fr>
6535
6536         regen
6537
6538 2012-09-25  Akim Demaille  <akim@lrde.epita.fr>
6539
6540         yacc: fix handling of CPP guards when no header is generated
6541         When no header was to be generated, Bison would issue:
6542
6543           /* In a future release of Bison, this section will be replaced
6544              by #include "".  */
6545           #ifndef YY_
6546           # define YY_
6547
6548         It now properly generates nothing.
6549
6550         * data/c.m4 (b4_cpp_guard_open, b4_cpp_guard_close): Issue nothing when
6551         the file name is empty.
6552         * data/yacc.c: Do not generate the above comment when there is no header
6553         to generate.
6554         * NEWS: Update.
6555
6556 2012-09-25  Akim Demaille  <akim@lrde.epita.fr>
6557
6558         gnulib: update
6559
6560 2012-09-21  Akim Demaille  <akim@lrde.epita.fr>
6561
6562         conflicts: refactor the counting routines
6563         * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Rename as...
6564         (count_sr_conflicts, count_rr_conflicts): these.
6565         Use size_t for counts.
6566         (count_sr_conflicts, count_rr_conflicts): New.
6567         Use them.
6568
6569 2012-09-21  Akim Demaille  <akim@lrde.epita.fr>
6570
6571         %expect-rr is for GLR only
6572         * src/conflicts.c (conflicts_print): Complain about %expect-rr if not
6573         in GLR mode, regardless of the number of reduce/reduce conflicts.
6574         * tests/conflicts.at (%expect-rr non GLR): New test.
6575         * NEWS: Update.
6576
6577 2012-09-21  Akim Demaille  <akim@lrde.epita.fr>
6578
6579         TODO: lalr1.cc master vs maint
6580         * TODO: here.
6581
6582 2012-09-21  Akim Demaille  <akim@lrde.epita.fr>
6583
6584         c++: coding style fixes
6585         * data/lalr1.cc, tests/c++.at: Formatting changes.
6586
6587 2012-09-21  Akim Demaille  <akim@lrde.epita.fr>
6588
6589         Revert "introduced a GCC-like -Werror=type"
6590         This reverts commit 981c53e257f1974854edc4f6ad0e88c7f18e2bea.
6591
6592 2012-09-21  Akim Demaille  <akim@lrde.epita.fr>
6593
6594         Revert "made previous commit less hairy"
6595         This reverts commit fd01e1d05ea3e627033d148b5400b99a18ac7ba3.
6596
6597 2012-09-21  Akim Demaille  <akim@lrde.epita.fr>
6598
6599         Revert "new Werror report format fixed in a test"
6600         This reverts commit 41511178a71ebaf81bde7ffc682c575537af45cb.
6601
6602 2012-09-21  Theophile Ranquet  <ranquet@lrde.epita.fr>
6603
6604         new Werror report format fixed in a test
6605         * tests/input.at : replaced [-Wyacc] with [-Werror=yacc]
6606
6607         todo: fix the other failed test of the suite, tests/conflicts.at:1554
6608
6609 2012-09-21  Theophile Ranquet  <ranquet@lrde.epita.fr>
6610
6611         made previous commit less hairy
6612         * src/getargs.c : here
6613
6614 2012-09-20  Theophile Ranquet  <ranquet@lrde.epita.fr>
6615
6616         introduced a GCC-like -Werror=type
6617         * src/complain.h : errors_flag variable
6618         * src/complain.c : actual stuff happens here
6619         * src/conflits.c : differentiated SR and RR conflicts
6620         * src/getargs.c : flags_argmatch recognizes the new -Werror format
6621
6622 2012-09-04  Akim Demaille  <akim@lrde.epita.fr>
6623
6624         regen
6625
6626 2012-09-04  Akim Demaille  <akim@lrde.epita.fr>
6627
6628         Merge remote-tracking branch 'origin/maint'
6629         * origin/maint:
6630           maint: remove useless file
6631           update files to ignore
6632           remove useless include
6633           use locale-indep. c_is* functions for parsing, not isspace, isprint etc
6634           gnulib: update
6635           --help: include a place to report translation issues
6636           tests: style changes
6637           tests: fix push-pull test
6638           yacc.c: style changes
6639
6640 2012-09-04  Akim Demaille  <akim@lrde.epita.fr>
6641
6642         maint: remove useless file
6643         * externals/bootstrap.cfg: Remove.
6644         This file was used by a specific build system.
6645         It was added to the master repository by accident.
6646
6647 2012-09-04  Akim Demaille  <akim@lrde.epita.fr>
6648
6649         update files to ignore
6650         * doc/.gitignore: Don't ignore split info files as we don't split our
6651         info file.
6652         See <http://lists.gnu.org/archive/html/bug-bison/2012-08/msg00006.html>.
6653
6654 2012-09-04  Akim Demaille  <akim@lrde.epita.fr>
6655
6656         remove useless include
6657         * src/system.h: Don't include sys/types.h.
6658         Reported by Eric Blake,
6659         <http://lists.gnu.org/archive/html/bug-bison/2012-09/msg00002.html>.
6660         (FUNCTION_PRINT): Remove, unused.
6661
6662 2012-09-03  Jim Meyering  <meyering@redhat.com>
6663
6664         use locale-indep. c_is* functions for parsing, not isspace, isprint etc
6665         * src/parse-gram.y: Include "c-ctype.h".
6666         (add_param): Parse with c_isspace, not isspace.
6667         * src/parse-gram.c: Likewise.
6668         * src/scan-gram.l: Include c-ctype.h, not ctype.h.
6669         (SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER): Use c_isspace and c_isprint,
6670         not ctype.h's locale-dependent functions.
6671
6672 2012-09-03  Akim Demaille  <akim@lrde.epita.fr>
6673
6674         gnulib: update
6675
6676 2012-09-03  Akim Demaille  <akim@lrde.epita.fr>
6677
6678         --help: include a place to report translation issues
6679         http://lists.gnu.org/archive/html/bug-bison/2012-08/msg00007.html
6680         shows that it is useful to help users report translation issues.
6681         While at it, include other informative bits that the coreutils shows.
6682
6683         * src/getargs.c (usage): Report more URLs where the user can
6684         refer to.
6685         Mostly copied/pasted from coreutils' emit_ancillary_info function.
6686
6687 2012-09-03  Akim Demaille  <akim@lrde.epita.fr>
6688
6689         news: style changes
6690         * NEWS: Minor improvements.
6691
6692 2012-09-03  Akim Demaille  <akim@lrde.epita.fr>
6693
6694         use -Wdeprecated for obsolete %define variable names
6695         * src/muscle-tab.c (muscle_percent_variable_update): Here.
6696         * tests/input.at (%define backward compatibility): Update expectations.
6697
6698 2012-09-03  Akim Demaille  <akim@lrde.epita.fr>
6699
6700         introduce -Wdeprecated
6701         GCC seems to be using "deprecated" consistently over "obsoleted", so
6702         use -Wdeprecated rather than -Wobsolete.
6703
6704         * src/complain.h (warnings): Add Wdeprecated.
6705         * src/complain.c (warnings_print_categories): Adjust.
6706         * src/getargs.c: Likewise.
6707         * doc/bison.texi: Document it.
6708
6709         * src/scan-code.l: Use this category for the trailing ';' support.
6710         * tests/actions.at: Adjust expected output.
6711
6712 2012-09-03  Akim Demaille  <akim@lrde.epita.fr>
6713
6714         undefined but unused is a warning
6715         * src/symtab.c (symbol_check_defined): Undeclared symbols are only
6716         a warning.
6717         * tests/input.at (Undeclared symbols used for a printer or destructor):
6718         Rename as...
6719         (Undefined symbols): this, and check this case.
6720         * NEWS: Doc it.
6721
6722 2012-09-03  Akim Demaille  <akim@lrde.epita.fr>
6723
6724         glr.cc: %defines is no longer mandatory
6725         * data/glr.cc: No longer require %defines.
6726         When it is not given, define the position and location classes instead
6727         of including their headers.
6728         (b4_shared_declarations): Use the original parse-params.
6729         * data/glr.c (b4_shared_declarations): Define only if undefined.
6730         * tests/actions.at, tests/calc.at: No longer force the use of %defines
6731         for glr.cc.
6732         * NEWS: Doc it.
6733
6734 2012-09-03  Akim Demaille  <akim@lrde.epita.fr>
6735
6736         todo: check push parsers
6737
6738 2012-09-03  Akim Demaille  <akim@lrde.epita.fr>
6739
6740         style: remove useless C++ provisio
6741         * src/complain.h: here.
6742
6743 2012-09-03  Akim Demaille  <akim@lrde.epita.fr>
6744
6745         parser: style changes
6746         * src/parse-gram.y: Avoid deprecated directives.
6747
6748 2012-09-03  Akim Demaille  <akim@lrde.epita.fr>
6749
6750         doc: address a fixme
6751         * doc/bison.texi (Calc++ Parser): Add a cross-reference.
6752
6753 2012-09-03  Akim Demaille  <akim@lrde.epita.fr>
6754
6755         style changes
6756         * data/glr.cc, tests/actions.at: Fix comments.
6757         * src/symtab.h, src/symtab.c: Fix indentation/comments.
6758         * src/symlist.c: Fix indentation.
6759
6760 2012-08-31  Akim Demaille  <akim@lrde.epita.fr>
6761
6762         tests: style changes
6763         * tests/torture.at (AT_DATA_STACK_TORTURE): M4 style changes to
6764         improve readability.
6765         Fix an assertion which, because of a <= instead of ==, did not check
6766         new_status as visibly meant.
6767         (get_args): New.
6768
6769 2012-08-31  Akim Demaille  <akim@lrde.epita.fr>
6770
6771         tests: fix push-pull test
6772         * tests/torture.at: %push-pull-parser is no longer supported.
6773
6774 2012-08-31  Akim Demaille  <akim@lrde.epita.fr>
6775
6776         yacc.c: style changes
6777         * data/yacc.c: (yytoken): Define with initial value.
6778
6779 2012-08-12  Akim Demaille  <akim@lrde.epita.fr>
6780
6781         refactoring: define variables with a value
6782         * src/muscle-tab.c: Where possible, fuse definition and initial assignment.
6783
6784 2012-08-12  Akim Demaille  <akim@lrde.epita.fr>
6785
6786         minor refactoring: shorten variable names
6787         * src/scan-skel.l (at_directive_argc, at_directive_argv)
6788         (AT_DIRECTIVE_ARGC_MAX): Rename as...
6789         (argc, argv, ARGC_MAX): these, as there is no possible confusion.
6790         (flags): New.
6791         (QPUTS): Remove, inline its only use.
6792
6793 2012-08-12  Akim Demaille  <akim@lrde.epita.fr>
6794
6795         obstacks: simplifications
6796         * src/system.h (obstack_finish0): New.
6797         Use it to simplify several uses.
6798         * src/muscle-tab.h (MUSCLE_INSERTF): New.
6799         * src/muscle-tab.c: Use obstack_printf where simpler.
6800
6801 2012-08-12  Akim Demaille  <akim@lrde.epita.fr>
6802
6803         minor refactoring in user code scanning
6804         * src/scan-code.l (show_sub_message, show_sub_messages): Instead of a
6805         Boolean, take a "warnings" argument.
6806         Avoid storing printf-like format strings in a variable, so that GCC
6807         can check them.
6808
6809 2012-08-12  Akim Demaille  <akim@lrde.epita.fr>
6810
6811         minor refactoring in user code scanning
6812         * src/scan-code.l (show_sub_message): New, extracted from...
6813         (show_sub_messages): here.
6814
6815 2012-08-03  Akim Demaille  <akim@lrde.epita.fr>
6816
6817         tests: strengthen the trailing spaces check
6818         * tests/calc.at: here.
6819         * data/glr.c: Fix accordingly.
6820
6821 2012-08-03  Akim Demaille  <akim@lrde.epita.fr>
6822
6823         regen
6824
6825 2012-08-03  Akim Demaille  <akim@lrde.epita.fr>
6826
6827         Merge branch 'maint'
6828         * origin/maint:
6829           maint: post-release administrivia
6830           version 2.6.2
6831           NEWS: update.
6832           yacc: remove trailing end of line at end of file
6833           thanks: fix a contributor name
6834           gnulib: update
6835           tests: synch line -> syncline, for consistency
6836           tests: synclines: style changes
6837           tests: synclines: fix perl invocation
6838           regen
6839           c++: trailing end-of-lines in %parse-param
6840           tests: simplify
6841
6842 2012-08-03  Akim Demaille  <akim@lrde.epita.fr>
6843
6844         regen
6845
6846 2012-08-03  Akim Demaille  <akim@lrde.epita.fr>
6847
6848         remove support for lint
6849         Basically revert commit 12ce2df60d16961eaa03a5aa009eeaa645e4e1cb.
6850         http://lists.gnu.org/archive/html/bison-patches/2012-08/msg00004.html
6851
6852         * data/c.m4, data/glr.c, data/yacc.c (YYID): Remove.
6853         No longer use ARGSUSED.
6854         * src/getargs.c: Restore simpler inclusion of getopt.h (anyway, since
6855         then we now use gnulib which certainly protects us from such issues).
6856
6857 2012-08-03  Akim Demaille  <akim@lrde.epita.fr>
6858
6859         skeletons: renamings after knr removal
6860         * data/c.m4 (b4_yydestruct_generate, b4_yy_symbol_print_generate):
6861         Rename as...
6862         (b4_yydestruct_define, b4_yy_symbol_print_define): these, for consistency.
6863         * data/glr.c, data/glr.cc, data/yacc.c: Adjust.
6864
6865 2012-08-03  Akim Demaille  <akim@lrde.epita.fr>
6866
6867         maint: post-release administrivia
6868         * NEWS: Add header line for next release.
6869         * .prev-version: Record previous version.
6870         * cfg.mk (old_NEWS_hash): Auto-update.
6871
6872 2012-08-03  Akim Demaille  <akim@lrde.epita.fr>
6873
6874         version 2.6.2
6875         * NEWS: Record release date.
6876
6877 2012-08-02  Akim Demaille  <akim@lrde.epita.fr>
6878
6879         c++: fix a comment
6880         * data/c++.m4: Be sure to attach a ';' to its declaration, otherwise
6881         it appears in the preceding comment.
6882
6883 2012-08-02  Akim Demaille  <akim@lrde.epita.fr>
6884
6885         skeletons: simplify after knr removal
6886         * data/c.m4 (b4_yydestruct_generate, b4_yy_symbol_print_generate):
6887         They no longer need an argument, it has a single possible value.
6888         * data/glr.c, data/yacc.c: Adjust.
6889
6890 2012-08-02  Akim Demaille  <akim@lrde.epita.fr>
6891
6892         skeletons: renamings after knr removal
6893         * data/c.m4 (b4_c_comment_, b4_c_args, b4_c_function_def)
6894         (b4_c_function_decl, b4_c_formals, b4_c_call, b4_c_arg): Rename as...
6895         (b4_comment, b4_args, b4_function_define, b4_function_declare,
6896         b4_formals, b4_function_call, b4_arg): these.
6897         * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c: Adjust.
6898
6899 2012-08-02  Akim Demaille  <akim@lrde.epita.fr>
6900
6901         skeletons: b4_args -> b4_join to prepare forthcoming changes
6902         * data/bison.m4 (b4_args, _b4_args): Rename as...
6903         (b4_join, _b4_join): these.
6904         * data/c++.m4, data/lalr1.cc, data/variant.hh: Adjust.
6905
6906 2012-08-02  Akim Demaille  <akim@lrde.epita.fr>
6907
6908         regen
6909
6910 2012-08-02  Akim Demaille  <akim@lrde.epita.fr>
6911
6912         YYPARSE_PARAM: drop support
6913         * data/yacc.c: No longer support it.
6914         * doc/bison.texi, tests/headers.at: Adjust.
6915         * NEWS: Document.
6916
6917 2012-08-02  Akim Demaille  <akim@lrde.epita.fr>
6918
6919         skeletons: remove K&R C support
6920         * data/c.m4 (b4_c_modern, b4_c_knr_formal_names, b4_c_knr_formal_decls)
6921         (b4_c_knr_formal_decl, b4_c_formal_names, b4_c_formal_decls)
6922         (b4_c_formal_decl): Remove.
6923         (b4_c_ansi_formal_names, b4_c_ansi_formal_decls, b4_c_ansi_formal_decl):
6924         Rename as...
6925         (b4_c_formal_names, b4_c_formal_decls, b4_c_formal_decl):
6926         these.
6927         * data/glr.c, data/glr.cc, data/yacc.c: Adjust.
6928
6929 2012-08-02  Akim Demaille  <akim@lrde.epita.fr>
6930
6931         NEWS: update.
6932         * NEWS: Catch up with the other changes from 2.6.1.
6933
6934 2012-08-02  Akim Demaille  <akim@lrde.epita.fr>
6935
6936         yacc: remove trailing end of line at end of file
6937         There are still spurious spaces at the end of some lines.  But this is
6938         addressed in the master branch, and I am reluctant to try to backport
6939         this.
6940
6941         * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: here.
6942         * tests/calc.at (AT_CHECK_SPACES): New.
6943         Use it.
6944         Be sure not to introduce trailing empty lines in the *.y files.
6945         * NEWS: Doc it.
6946         * cfg.mk (syntax-check): Remove the exception.
6947
6948 2012-08-02  Akim Demaille  <akim@lrde.epita.fr>
6949
6950         thanks: fix a contributor name
6951         * THANKS: On his request.
6952
6953 2012-08-01  Akim Demaille  <akim@lrde.epita.fr>
6954
6955         gnulib: update
6956
6957 2012-08-01  Akim Demaille  <akim@lrde.epita.fr>
6958
6959         tests: synch line -> syncline, for consistency
6960         * tests/synclines.at: Do it, as "syncline" is used consistently
6961         everywhere else in Bison.
6962
6963 2012-08-01  Akim Demaille  <akim@lrde.epita.fr>
6964
6965         tests: synclines: style changes
6966         * tests/synclines.at (AT_TEST_SYNCLINE): Rename as...
6967         (AT_TEST): this.
6968         Use pushdef/popdef.
6969         Formatting changes.
6970         Use '+' instead of '*' where appropriate.
6971
6972 2012-08-01  Akim Demaille  <akim@lrde.epita.fr>
6973
6974         tests: synclines: fix perl invocation
6975         Reported by Summum Bonum.
6976
6977         * tests/synclines.at: Fix Perl invocation: its -f is not like sed's.
6978
6979 2012-08-01  Akim Demaille  <akim@lrde.epita.fr>
6980
6981         regen
6982
6983 2012-08-01  Akim Demaille  <akim@lrde.epita.fr>
6984
6985         c++: trailing end-of-lines in %parse-param
6986         * src/parse-gram.y (add_param): No only skip ' ' and '\t', skip all
6987         leading and trailing spaces.
6988         * tests/regression.at (Lex and parse params): Check it.
6989         * NEWS: Document it.
6990
6991 2012-08-01  Akim Demaille  <akim@lrde.epita.fr>
6992
6993         tests: simplify
6994         * tests/regression.at: Remove useless compilations: AT_FULL_COMPILE
6995         includes the compilation by bison.
6996
6997 2012-07-31  Akim Demaille  <akim@lrde.epita.fr>
6998
6999         todo: more items
7000         * TODO: $ in the epilogue, and obstack_copy.
7001
7002 2012-07-31  Akim Demaille  <akim@lrde.epita.fr>
7003
7004         Merge branch 'maint'
7005         * maint:
7006           use obstack_printf
7007           scanner: restore a missing start condition
7008           gnulib: update
7009           maint: post-release administrivia
7010           version 2.6.1
7011           gnulib: update
7012           maint: fix some syntax-check issues
7013           tests: do not depend on __cplusplus to decide for C++ or C output
7014
7015 2012-07-31  Akim Demaille  <akim@lrde.epita.fr>
7016
7017         tests: comment changes
7018         * tests/actions.at, tests/input.at: here.
7019
7020 2012-07-31  Akim Demaille  <akim@lrde.epita.fr>
7021
7022         tests: really check the set of generated files
7023         * tests/output.at (AT_CHECK_OUTPUT): It used to check that the
7024         expected files are indeed generated, but it did not check that
7025         there are no additional ones.
7026         Do that, and adjust expectations (in particular alphabetical order).
7027
7028 2012-07-31  Akim Demaille  <akim@lrde.epita.fr>
7029
7030         lalr1.cc: do not create stack.hh without %defines
7031         * data/stack.hh (b4_stack_define): New.
7032         * data/lalr1.cc: Use it when %defines is not passed.
7033         * tests/output.at: Adjust expected output.
7034
7035 2012-07-31  Akim Demaille  <akim@lrde.epita.fr>
7036
7037         lalr1.cc: location.hh and position.hh are not generated without %defines
7038         * data/location.cc (b4_position_define, b4_location_define): New.
7039         (location.hh, position.hh): Generate only if %defines.
7040         * data/lalr1.cc: therefore, define these classes when locations are
7041         needed, but headers are not generated.
7042         * tests/output.at: Check that these files are not generated.
7043         * NEWS: Document.
7044
7045 2012-07-31  Akim Demaille  <akim@lrde.epita.fr>
7046
7047         lalr1.cc: no longer require %defines.
7048         * data/lalr1.cc: Generate the parser header only when %defines is
7049         passed.
7050         * tests/calc.at: Check it.
7051
7052 2012-07-31  Akim Demaille  <akim@lrde.epita.fr>
7053
7054         skeletons: style changes
7055         * data/glr.c, data/lalr1.cc: Use more consistent comments,
7056         and YY_NULL declaration.
7057
7058 2012-07-31  Akim Demaille  <akim@lrde.epita.fr>
7059
7060         glr.cc, lalr1.cc: define b4_shared_declarations
7061         * data/glr.cc, data/lalr1.cc: here.
7062         The name is no longer right, but at least it is consistent with
7063         the other skeletons.
7064
7065 2012-07-31  Akim Demaille  <akim@lrde.epita.fr>
7066
7067         glr.cc: no longer require location support
7068         * data/glr.cc: Use b4_locations_if where appropriate.
7069         * data/lalr1.cc: M4 quotation changes to highlight code duplication
7070         with glr.cc.
7071         * tests/calc.at: Check glr.cc with and without %location.
7072         While at it, fuse multiple %parse-params into one.
7073         * tests/actions.at: Simplify.
7074         * NEWS: Doc this.
7075         Some other wording changes.
7076
7077 2012-07-31  Akim Demaille  <akim@lrde.epita.fr>
7078
7079         use obstack_printf
7080         This is not just nicer, it is also much safer, since we were
7081         using sprintf...
7082
7083         * bootstrap.conf: Require it.
7084         * src/system.h (obstack_fgrow1, obstack_fgrow2, obstack_fgrow3)
7085         (obstack_fgrow4): Remove.
7086         Adjust dependencies.
7087
7088 2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
7089
7090         scanner: restore a missing start condition
7091         $ flex src/scan-skel.l
7092         src/scan-skel.l:145: multiple <<EOF>> rules for start condition SC_AT_DIRECTIVE_ARGS
7093         src/scan-skel.l:145: multiple <<EOF>> rules for start condition SC_AT_DIRECTIVE_SKIP_WS
7094         This is warning, and it seems there are no means to make it an error.
7095
7096         * src/scan-skel.l: Restore the start-condition INITIAL for an <<EOF>>
7097         clause.
7098
7099 2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
7100
7101         gnulib: update
7102
7103 2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
7104
7105         maint: post-release administrivia
7106         * NEWS: Add header line for next release.
7107         * .prev-version: Record previous version.
7108         * cfg.mk (old_NEWS_hash): Auto-update.
7109
7110 2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
7111
7112         version 2.6.1
7113         * NEWS: Record release date.
7114
7115 2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
7116
7117         gnulib: update
7118
7119 2012-07-27  Akim Demaille  <akim@lrde.epita.fr>
7120
7121         maint: fix some syntax-check issues
7122         * cfg.mk: Nuke the following warnings which are confused by our
7123         text reports (that state that the error token is number 256).
7124           prohibit_magic_number_exit
7125           ../../doc/bison.texi:8170:error (256)
7126           ../../tests/conflicts.at:570:error (256)
7127           ../../tests/conflicts.at:673:error (256)
7128           ../../tests/conflicts.at:811:error (256)
7129           ../../tests/conflicts.at:1154:error (256)
7130           ../../tests/regression.at:281:error (256)
7131           ../../tests/regression.at:582:error (256)
7132           maint.mk: use EXIT_* values rather than magic number
7133
7134 2012-07-27  Akim Demaille  <akim@lrde.epita.fr>
7135
7136         regen
7137
7138 2012-07-27  Akim Demaille  <akim@lrde.epita.fr>
7139
7140         tests: do not depend on __cplusplus to decide for C++ or C output
7141         Since we do support compiling C code with a C++ compiler.
7142
7143         * tests/actions.at (Qualified $$ in actions): Use AT_SKEL_CC_IF.
7144
7145 2012-07-27  Akim Demaille  <akim@lrde.epita.fr>
7146
7147         Merge remote-tracking branch 'origin/maint'
7148         * origin/maint: (29 commits)
7149           regen
7150           synclines: remove spurious empty line
7151           also support $<foo>$ in the %initial-action
7152           skeletons: b4_dollar_pushdef and popdef to simpify complex definitions
7153           regen
7154           printer/destructor: translate only once
7155           factor the handling of m4 escaping
7156           news: schedule the removal of the ";" hack
7157           style changes in the scanners
7158           regen
7159           support $<tag>$ in printers and destructors
7160           scan-code: factor the handling of the type in $<TYPE>$
7161           muscles: fix another occurrence of unescaped type name
7162           glr.cc: fix the handling of yydebug
7163           gnulib: update
7164           formatting changes
7165           tests: fix an assertion
7166           tests: adjust to GCC 4.8, which displays caret errors
7167           be sure to properly escape type names
7168           obstack_quote: escape and quote for M4
7169           muscles: shuffle responsabilities
7170           muscles: make private functions static
7171           muscles: rename private functions/macros
7172           obstack_escape: escape M4 characters
7173           remove dead macro
7174           maint: style changes
7175           doc: avoid problems with case insensitive file systems
7176           configure: fix botched quoting
7177           news: fix typo.
7178
7179 2012-07-27  Akim Demaille  <akim@lrde.epita.fr>
7180
7181         regen
7182
7183 2012-07-27  Akim Demaille  <akim@lrde.epita.fr>
7184
7185         synclines: remove spurious empty line
7186         * data/bison.m4 (b4_syncline): Do not start with an empty line.
7187
7188 2012-07-27  Akim Demaille  <akim@lrde.epita.fr>
7189
7190         also support $<foo>$ in the %initial-action
7191         scan-code.l is already passing argument to b4_dollar_dollar for the
7192         initial acton, but its definition (of b4_dollar_dollar) does not use
7193         this argument.
7194
7195         Generalize this definition, and use it for the %initial-action too.
7196
7197         * data/c.m4 (b4_dollar_dollar_, b4_dollar_pushdef, b4_dollar_popdef):
7198         Instead of expecting a pointer, require a value, and use ".".
7199         Since they are now generic enough, move to...
7200         * data/c-like.m4: this new file.
7201         * data/c.m4, data/java.m4: Load it.
7202         * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Use
7203         b4_dollar_pushdef for the %initial-action.
7204         * tests/actions.at: Check that.
7205         * data/Makefile.am: Adjust.
7206         * NEWS, doc/bison.texi: Document.
7207
7208 2012-07-27  Akim Demaille  <akim@lrde.epita.fr>
7209
7210         skeletons: b4_dollar_pushdef and popdef to simpify complex definitions
7211         M4 is really making it uselessly hard to define macros that define
7212         macros.
7213         * data/c.m4 (b4_dollar_pushdef, b4_dollar_popdef): New.
7214         Use it.
7215
7216 2012-07-27  Akim Demaille  <akim@lrde.epita.fr>
7217
7218         regen
7219
7220 2012-07-27  Akim Demaille  <akim@lrde.epita.fr>
7221
7222         printer/destructor: translate only once
7223         Currently "%printer {...} a b c d e f" translates the {...} six times.
7224         Not only is this bad for time and space, it also issues six times the
7225         same warnings.
7226
7227         * src/symlist.h, src/symlist.c (symbol_list_destructor_set)
7228         (symbol_list_printer_set): Take the action as code_props instead of
7229         const char *.
7230         * src/parse-gram.y: Translate these actions here.
7231         * src/scan-code.h: Comment change.
7232         * tests/input.at: Check that warnings are issued only once.
7233
7234 2012-07-27  Akim Demaille  <akim@lrde.epita.fr>
7235
7236         factor the handling of m4 escaping
7237         The conversion from @ to @@ and so forth is coded is too many
7238         different places.  Factor, a bit.
7239
7240         * src/scan-code.l: Instead of duplicating the logic of obstack_escape,
7241         use it.
7242         It sure is less efficient, but the cost is negligible.
7243         This allows to factor rules that are alike.
7244         And to factor some start-condition clauses.
7245         * tests/input.at (Stray $ or @): New.
7246         * NEWS: Document it.
7247
7248 2012-07-27  Akim Demaille  <akim@lrde.epita.fr>
7249
7250         news: schedule the removal of the ";" hack
7251         scan-code.l is significantly more complex because of this.
7252
7253         * NEWS: Doc it.
7254
7255 2012-07-27  Akim Demaille  <akim@lrde.epita.fr>
7256
7257         style changes in the scanners
7258         * src/scan-code.l, src/scan-skel.l: Use a more traditional indentation
7259         style for start-conditions.
7260         Prefer "continue" to a comment, for empty actions.
7261         Strip useless {}.
7262         Remove useless start-condition clauses.
7263
7264 2012-07-26  Akim Demaille  <akim@lrde.epita.fr>
7265
7266         regen
7267
7268 2012-07-26  Akim Demaille  <akim@lrde.epita.fr>
7269
7270         support $<tag>$ in printers and destructors
7271         * src/scan-code.l (SC_SYMBOL_ACTION): Accept $<tag>$, not just $$.
7272         * data/c.m4 (b4_dollar_dollar_): New.
7273         (b4_symbol_actions): Let b4_dollar_dollar use b4_dollar_dollar_.
7274         * NEWS, doc/bison.texi: Document it.
7275         * tests/actions.at: Check this for C and C++.
7276
7277 2012-07-26  Akim Demaille  <akim@lrde.epita.fr>
7278
7279         scan-code: factor the handling of the type in $<TYPE>$
7280         * src/scan-code.l (fetch_type_name): New.
7281         (handle_action_dollar): Use it.
7282         (gt_ptr): Remove, useless.
7283
7284 2012-07-26  Akim Demaille  <akim@lrde.epita.fr>
7285
7286         muscles: fix another occurrence of unescaped type name
7287         * src/output.c (quoted_output): Split into...
7288         (quoted_output, string_output): these.
7289         Use the former when outputting a type_name.
7290         * tests/input.at: Check this case.
7291         * src/symtab.h: Comment changes.
7292
7293 2012-07-26  Akim Demaille  <akim@lrde.epita.fr>
7294
7295         glr.cc: fix the handling of yydebug
7296         * data/glr.cc (yydebug_): Remove, unused.
7297         (set_debug_level, debug_level): Work on yydebug instead.
7298         * doc/bison.texi, NEWS: Document this.
7299
7300 2012-07-26  Akim Demaille  <akim@lrde.epita.fr>
7301
7302         gnulib: update
7303
7304 2012-07-26  Akim Demaille  <akim@lrde.epita.fr>
7305
7306         formatting changes
7307         * src/symtab.h: here.
7308
7309 2012-07-26  Akim Demaille  <akim@lrde.epita.fr>
7310
7311         tests: fix an assertion
7312         * tests/local.at (AT_YYLEX_DEFINE): Be sure to check the array
7313         against its length, not its size in bytes.
7314
7315 2012-07-26  Akim Demaille  <akim@lrde.epita.fr>
7316
7317         tests: adjust to GCC 4.8, which displays caret errors
7318         With GCC 4.8, the tests on synclines are skipped.  Transform
7319
7320           input.y:1:2: error: #error "1"
7321            #error "1"
7322             ^
7323
7324         into
7325
7326           input.y:1: #error "1"
7327
7328         * tests/synclines.at (AT_SYNCLINES_COMPILE): Do it, using Perl instead of
7329         sed.
7330
7331 2012-07-26  Akim Demaille  <akim@lrde.epita.fr>
7332
7333         be sure to properly escape type names
7334         * src/scan-code.l: Use obstack_quote when passing type_name to m4.
7335         * tests/input.at (Code injection): New.
7336         * NEWS: Document it.
7337         Thanks to Paul Eggert for the wording.
7338
7339 2012-07-26  Akim Demaille  <akim@lrde.epita.fr>
7340
7341         obstack_quote: escape and quote for M4
7342         * src/system.h (obstack_quote): New.
7343         * src/muscle-tab.c: Use it instead of obstack_escape where applicable.
7344         * src/scan-code.l: Since obstack_quote supports NULL, leave type_name
7345         as NULL instead of defaulting to "".
7346
7347 2012-07-26  Akim Demaille  <akim@lrde.epita.fr>
7348
7349         muscles: shuffle responsabilities
7350         * src/muscle-tab.c (muscle_boundary_grow): Be in charge of quotation,
7351         instead of leaving this to the caller.
7352
7353 2012-07-26  Akim Demaille  <akim@lrde.epita.fr>
7354
7355         muscles: make private functions static
7356         * src/muscle-tab.h, src/muscle-tab.c (muscle_boundary_grow)
7357         (muscle_location_grow): Now static.
7358
7359 2012-07-26  Akim Demaille  <akim@lrde.epita.fr>
7360
7361         muscles: rename private functions/macros
7362         * src/muscle-tab.c (MUSCLE_COMMON_DECODE, muscle_string_decode)
7363         (muscle_location_decode): Not related to muscles, rename as...
7364         (COMMON_DECODE, string_decode, location_decode): these.
7365
7366 2012-07-26  Akim Demaille  <akim@lrde.epita.fr>
7367
7368         obstack_escape: escape M4 characters
7369         * src/muscle-tab.h (MUSCLE_OBSTACK_SGROW): This is not related to
7370         muscles, so move to, and rename as...
7371         * src/system.h (obstack_escape): this.
7372         Adjust dependencies.
7373
7374 2012-07-26  Akim Demaille  <akim@lrde.epita.fr>
7375
7376         remove dead macro
7377         * src/system.h (DEFAULT_TMPDIR): Remove, unused.
7378
7379 2012-07-26  Akim Demaille  <akim@lrde.epita.fr>
7380
7381         maint: style changes
7382         * src/scan-code.l: Remove useless braces.
7383         Formatting changes.
7384         Prefer NULL to 0.
7385         * src/muscle-tab.c, src/system.h: Formatting changes.
7386
7387 2012-07-24  Akim Demaille  <akim@lrde.epita.fr>
7388
7389         doc: avoid problems with case insensitive file systems
7390         makeinfo --html generates index.html, and the node "Index" will result
7391         in Index.html.  On case insensitive file systems, such as on Mac OS X
7392         by default, this results in a single, invalid, file (Texinfo 4.13).
7393         See http://lists.gnu.org/archive/html/bug-texinfo/2012-07/msg00032.html
7394
7395         * doc/bison.texi (Index): Rename as...
7396         (Index of Terms): this.
7397
7398 2012-07-24  Stefano Lattarini  <stefano.lattarini@gmail.com>  (tiny change)
7399
7400         configure: fix botched quoting
7401         * configure.ac: In the AC_SUBST call on 'VALGRIND_PREBISON'.  Without
7402         this change, when running ./configure, I see:
7403
7404             ...
7405             checking for valgrind... valgrind
7406             ./configure: line 35221: -q: command not found
7407             checking for Java compiler... gcj -C -fsource=1.3 -ftarget=1.4
7408             ...
7409
7410 2012-07-24  Akim Demaille  <akim@lrde.epita.fr>
7411
7412         regen
7413
7414 2012-07-24  Akim Demaille  <akim@lrde.epita.fr>
7415
7416         yystype, yyltype: remove.
7417         * data/c.m4: here.
7418         * NEWS: Doc it.
7419
7420 2012-07-22  Akim Demaille  <akim@lrde.epita.fr>
7421
7422         regen
7423
7424 2012-07-22  Akim Demaille  <akim@lrde.epita.fr>
7425
7426         YYFAIL: remove.
7427         * data/lalr1.java, data/yacc.c, src/scan-code.l: Remove YYFAIL support.
7428         * NEWS, TODO: Update.
7429
7430 2012-07-22  Akim Demaille  <akim@lrde.epita.fr>
7431
7432         todo: update.
7433         * TODO: obsolete items.
7434
7435 2012-07-22  Akim Demaille  <akim@lrde.epita.fr>
7436
7437         regen.
7438
7439 2012-07-22  Akim Demaille  <akim@lrde.epita.fr>
7440
7441         space changes.
7442         * data/bison.m4 (b4_symbol_action): Remove spurious eol in the output.
7443
7444 2012-07-22  Akim Demaille  <akim@lrde.epita.fr>
7445
7446         parser: fix %printer usage.
7447         * src/parse-gram.y: Instead of stderr, using yyo.
7448
7449 2012-07-22  Akim Demaille  <akim@lrde.epita.fr>
7450
7451         parser: factor the handling of code_props
7452         * src/parse-gram.y: Now that %printer and %destructor are treated
7453         equally, let...
7454         (code_props_type): handle them.
7455
7456 2012-07-22  Akim Demaille  <akim@lrde.epita.fr>
7457
7458         parser: factor handling of type tags
7459         * src/parse-gram.y: Now that <*> and <> are processed like regular
7460         tags, let...
7461         (tag): handle them.
7462
7463 2012-07-22  Akim Demaille  <akim@lrde.epita.fr>
7464
7465         regen.
7466
7467 2012-07-22  Akim Demaille  <akim@lrde.epita.fr>
7468
7469         simplify the handling of <> and <*>'s code_props.
7470         Currently they are treated in separated variables, contrary to other
7471         <TYPE> code_props.  This duplicates code (and messages for translators)
7472         uselessly, as demonstrated by the fact that thanks to this patch, now
7473         useless <*> and <> code_props are reported like the others.
7474
7475         * src/parse-gram.y (generic_symlist_item): Treat "<*>" and "<>" as regular
7476         type tags.
7477         * src/symlist.h, src/symlist.c (symbol_list_default_tagged_new)
7478         (symbol_list_default_tagless_new,SYMLIST_DEFAULT_TAGGED)
7479         (SYMLIST_DEFAULT_TAGLESS): Remove.
7480         * src/symtab.h, src/symtab.c (default_tagged_code_props)
7481         (default_tagless_code_props, default_tagged_code_props_set)
7482         (default_tagless_code_props_set): Remove.
7483         (symbol_code_props_get): Default to <*> or <>'s code_props.
7484
7485         * tests/actions.at: Complete expected errors: there are new warnings.
7486         * tests/input.at: Likewise.
7487         (Useless printers or destructors): Extend.
7488
7489 2012-07-22  Akim Demaille  <akim@lrde.epita.fr>
7490
7491         allow modification on retrieved code_props.
7492         The logic to compute the %printer or %destructor to used (i.e., a
7493         code_props) is implemented twice: one, of course, in
7494         symbol_code_props_get, and another time in symbol_check_defined to
7495         record the fact that a code_props is used (so that we can reported
7496         unused ones).  Let the former use the latter.
7497
7498         I would probably use "mutable" in C++ and keep these guys const,
7499         but this is C.  And casting away constness triggers warnings.
7500
7501         * src/scan-code.h, src/scan-code.l (code_props_none): Is not const.
7502         * src/symtab.h, src/symtab.c (symbol_code_props_get): The symbol
7503         is not const.
7504         (symbol_check_defined): Use it.
7505
7506 2012-07-22  Akim Demaille  <akim@lrde.epita.fr>
7507
7508         maint: regen.
7509
7510 2012-07-22  Akim Demaille  <akim@lrde.epita.fr>
7511
7512         maint: fix bison's own header guards.
7513         Because I'm using a VPATH build with an absolute srcdir, I have
7514         GRAM__USERS_AKIM_SRC_GNU_BISON_SRC_PARSE_GRAM_H.  Before, I was using
7515         a relative srcdir, and had GRAM_______SRC_PARSE_GRAM_H (coming from
7516         ../../).  Let it be GRAM_SRC_PARSE_GRAM_H.
7517
7518         * tests/bison.in: Do not depend on the value of $top_srcdir for
7519         Bison itself.
7520         If we were to use relative paths from .c to .y, we would not have
7521         this problem.
7522
7523 2012-07-22  Akim Demaille  <akim@lrde.epita.fr>
7524
7525         maint: add missing const.
7526         * src/symtab.h, src/symtab.c (symbol_print): here.
7527
7528 2012-07-22  Akim Demaille  <akim@lrde.epita.fr>
7529
7530         style changes.
7531         * src/parse-gram.y, src/symtab.c: Space changes.
7532         * src/symtab.h: Comment changes.
7533
7534 2012-07-22  Akim Demaille  <akim@lrde.epita.fr>
7535
7536         autoconf: update.
7537         * submodules/autoconf: here.
7538         No significant changes for our use of m4sugar.m4.
7539
7540 2012-07-22  Akim Demaille  <akim@lrde.epita.fr>
7541
7542         output: no longer use b4_tokens.
7543         * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java, data/yacc.c:
7544         Since the previous commit, b4_tokens_define and the like no longer need
7545         b4_tokens.
7546         * src/output.c (token_definitions_output): Remove.
7547
7548 2012-07-22  Akim Demaille  <akim@lrde.epita.fr>
7549
7550         output: use the token list to define the yytokentype
7551         There are currently two systems used to pass information about tokens to
7552         m4: the original one, and another, which is used for instance for
7553         printers and destructors, variants etc.  Move to using only the latter.
7554
7555         * data/bison.m4 (b4_symbol_map, b4_token_visible_if)
7556         (b4_token_has_definition, b4_any_token_visible_if, b4_token_format): New.
7557         * data/c++.m4, data/c.m4, data/glr.c, data/java.m4: Adjust to use them.
7558
7559 2012-07-20  Akim Demaille  <akim@lrde.epita.fr>
7560
7561         tests: fix VPATH issue
7562         * examples/test: With an absolute VPATH build, "../" is incorrect.
7563
7564 2012-07-20  Akim Demaille  <akim@lrde.epita.fr>
7565
7566         news: fix typo.
7567         * NEWS: here.
7568         Reported by Ben Pfaff.
7569
7570 2012-07-19  Akim Demaille  <akim@lrde.epita.fr>
7571
7572         Merge remote-tracking branch 'origin/maint'
7573         * origin/maint:
7574           maint: update gnu-web-doc-update.
7575           maint: post-release administrivia
7576           version 2.6
7577           maint: prepare for release 2.6
7578           maint: post-release administrivia
7579           version 2.5.91
7580           maint: prepare NEWS.
7581           maint: fix spaces.
7582           tests: adjust to case where the C compiler is actually a C++ compiler
7583           tests: fix dependencies
7584           doc: fix Texinfo command
7585           maint: Valgrind on OS X.
7586           tests: be sure that backups are safe.
7587           maint: dead comment.
7588           tests: refactor for legibility.
7589           tests: refactor the bison invocations.
7590           maint: fix syntax-check ignore patterns.
7591           gnulib: update
7592           gnulib: update.
7593           gnulib: update
7594
7595 2012-07-19  Akim Demaille  <akim@lrde.epita.fr>
7596
7597         maint: update gnu-web-doc-update.
7598         * gnulib: here.
7599
7600 2012-07-19  Akim Demaille  <akim@lrde.epita.fr>
7601
7602         maint: post-release administrivia
7603         * NEWS: Add header line for next release.
7604         * .prev-version: Record previous version.
7605         * cfg.mk (old_NEWS_hash): Auto-update.
7606
7607 2012-07-19  Akim Demaille  <akim@lrde.epita.fr>
7608
7609         version 2.6
7610         * NEWS: Record release date.
7611
7612 2012-07-19  Akim Demaille  <akim@lrde.epita.fr>
7613
7614         maint: prepare for release 2.6
7615         * NEWS: here.
7616
7617 2012-07-18  Akim Demaille  <akim@lrde.epita.fr>
7618
7619         maint: post-release administrivia
7620         * NEWS: Add header line for next release.
7621         * .prev-version: Record previous version.
7622         * cfg.mk (old_NEWS_hash): Auto-update.
7623
7624 2012-07-18  Akim Demaille  <akim@lrde.epita.fr>
7625
7626         version 2.5.91
7627         * NEWS: Record release date.
7628
7629 2012-07-18  Akim Demaille  <akim@lrde.epita.fr>
7630
7631         maint: prepare NEWS.
7632
7633 2012-07-18  Akim Demaille  <akim@lrde.epita.fr>
7634
7635         maint: fix spaces.
7636         * build-aux/Makefile.am: here.
7637
7638 2012-07-18  Akim Demaille  <akim@lrde.epita.fr>
7639
7640         tests: adjust to case where the C compiler is actually a C++ compiler
7641         * tests/atlocal.in (CC_IS_CXX): New.
7642         * tests/headers.at (Several parsers): Use it.
7643
7644 2012-07-18  Akim Demaille  <akim@lrde.epita.fr>
7645
7646         tests: fix dependencies
7647         * tests/Makefile.am: we need atconfig and atlocal to be up to date
7648         when calling testsuite.
7649
7650 2012-07-18  Akim Demaille  <akim@lrde.epita.fr>
7651
7652         doc: fix Texinfo command
7653         * doc/bison.texi: In parens, use @pxref.
7654
7655 2012-07-18  Akim Demaille  <akim@lrde.epita.fr>
7656
7657         maint: Valgrind on OS X.
7658         * configure.ac (VALGRIND_PREBISON): New.
7659         * tests/Makefile.am (maintainer-check-valgrind): Use it.
7660         * etc/darwin11.4.0.supp: New.
7661         * configure.ac, etc/Makefile.am: Use it.
7662         * configure.ac: Disable Valgrind on Mac OS X.
7663         * README-hacking: Explain why.
7664
7665 2012-07-17  Akim Demaille  <akim@lrde.epita.fr>
7666
7667         tests: be sure that backups are safe.
7668         * tests/local.at (at_save_special_files): here.
7669
7670 2012-07-17  Akim Demaille  <akim@lrde.epita.fr>
7671
7672         maint: dead comment.
7673         * etc/README: here.
7674
7675 2012-07-17  Akim Demaille  <akim@lrde.epita.fr>
7676
7677         tests: refactor for legibility.
7678         * tests/local.at (AT_BISON_CHECK_WARNINGS, AT_BISON_CHECK_WARNINGS_):
7679         New.
7680
7681 2012-07-17  Akim Demaille  <akim@lrde.epita.fr>
7682
7683         tests: refactor the bison invocations.
7684         * tests/local.at (m4_null_if, AT_BISON_CHECK_): New.
7685
7686 2012-07-17  Akim Demaille  <akim@lrde.epita.fr>
7687
7688         maint: fix syntax-check ignore patterns.
7689         * cfg.mk: here.
7690
7691 2012-07-17  Akim Demaille  <akim@lrde.epita.fr>
7692
7693         gnulib: update
7694
7695 2012-07-16  Akim Demaille  <akim@lrde.epita.fr>
7696
7697         gnulib: update.
7698         * gnulib: Update so that gitlog-to-changelog support --srcdir.
7699         * Makefile.am: Use it.
7700
7701 2012-07-10  Akim Demaille  <akim@lrde.epita.fr>
7702
7703         gnulib: update
7704         * bootstrap, build-aux/.gitignore, gnulib, m4/.gitignore: update.
7705
7706 2012-07-06  Akim Demaille  <akim@lrde.epita.fr>
7707
7708         maint: minor fixes
7709         * NEWS: restore missing entry.
7710         * cfg.mk: Adjust to *.texinfo -> *.texi.
7711         * src/symtab.c: Spaces fixes.
7712
7713 2012-07-06  Akim Demaille  <akim@lrde.epita.fr>
7714
7715         tests: address g++-4.8 warnings.
7716         list.yy: In function 'yy::parser::symbol_type yylex()':
7717         list.yy:107:29: error: typedef 'token' locally defined but not used
7718           [-Werror=unused-local-typedefs]
7719            typedef yy::parser::token token;
7720                                      ^
7721
7722         * tests/c++.at (AT_CHECK_VARIANTS): here.
7723
7724 2012-07-06  Akim Demaille  <akim@lrde.epita.fr>
7725
7726         Merge remote-tracking branch 'origin/maint'
7727         * origin/maint:
7728           maint: update release instructions
7729           maint: post-release administrivia
7730           version 2.5.90
7731           build: fix gen-ChangeLog call.
7732           gnulib: update.
7733           tests: fix SKIP_IF for Java.
7734           api.prefix: incompatible with %name-prefix.
7735           api.prefix: strengthen the tests and fix push-parsers.
7736           skeletons: style changes.
7737           NEWS: minor changes.
7738           api.prefix: improve the documentation for YYDEBUG.
7739           gnulib: update.
7740
7741 2012-07-06  Akim Demaille  <akim@lrde.epita.fr>
7742
7743         maint: update release instructions
7744         * README-hacking: here.
7745
7746 2012-07-05  Akim Demaille  <akim@lrde.epita.fr>
7747
7748         maint: post-release administrivia
7749         * NEWS: Add header line for next release.
7750         * .prev-version: Record previous version.
7751         * cfg.mk (old_NEWS_hash): Auto-update.
7752
7753 2012-07-05  Akim Demaille  <akim@lrde.epita.fr>
7754
7755         version 2.5.90
7756         * NEWS: Record release date.
7757
7758 2012-07-05  Akim Demaille  <akim@lrde.epita.fr>
7759
7760         build: fix gen-ChangeLog call.
7761         * Makefile.am: Be sure to catch errors, and fix option name
7762
7763 2012-07-05  Akim Demaille  <akim@lrde.epita.fr>
7764
7765         gnulib: update.
7766         * gnulib/build-aux/do-release-commit-and-tag: Fix.
7767
7768 2012-07-05  Akim Demaille  <akim@lrde.epita.fr>
7769
7770         tests: fix SKIP_IF for Java.
7771         * tests/local.at (AT_JAVA_COMPILE): here.
7772
7773 2012-07-05  Akim Demaille  <akim@lrde.epita.fr>
7774
7775         api.prefix: incompatible with %name-prefix.
7776         * data/bison.m4: Make it incompatible.
7777         * tests/input.at: Check that it is.
7778
7779 2012-07-05  Akim Demaille  <akim@lrde.epita.fr>
7780
7781         api.prefix: strengthen the tests and fix push-parsers.
7782         * tests/calc.at: Check api.prefix in addition to %name-prefix.
7783         * tests/headers.at: Check push parsers and pure interface.
7784         * tests/local.at: Use YYLTYPE renamed.
7785         * data/yacc.c (b4_declare_yyparse_push_): Handle api.prefix.
7786         * doc/bison.texi: Style changes.
7787
7788 2012-07-05  Akim Demaille  <akim@lrde.epita.fr>
7789
7790         skeletons: style changes.
7791         * data/bison.m4: Define default values after having defined
7792         the support macros.
7793         Kill a dead comment.
7794
7795 2012-07-05  Akim Demaille  <akim@lrde.epita.fr>
7796
7797         NEWS: minor changes.
7798         * NEWS: style changes.
7799
7800 2012-07-05  Akim Demaille  <akim@lrde.epita.fr>
7801
7802         api.prefix: improve the documentation for YYDEBUG.
7803         * doc/bison.texi: Explain how api.prefix is applied to YYDEBUG.
7804
7805 2012-07-05  Akim Demaille  <akim@lrde.epita.fr>
7806
7807         gnulib: update.
7808         * bootstrap, gnulib: Update.
7809         * cfg.mk (syntax-check): Don't check "error" usage in bison.texi.
7810
7811 2012-07-04  Akim Demaille  <akim@lrde.epita.fr>
7812
7813         Merge remote-tracking branch 'origin/maint'
7814         * origin/maint:
7815           tests: headers.at: strengthen.
7816           glr.cc: do not override C++ definitions by C macros.
7817           YYLLOC_DEFAULT: factor, and don't export it in headers.
7818           api.prefix: do not use #define to handle YYSTYPE_IS_TRIVIAL etc.
7819           tests: portability fixes.
7820           c++: fewer #includes in the headers.
7821           glr.cc: formatting changes.
7822           tests: more logs.
7823           api.prefix: also rename YYDEBUG.
7824
7825 2012-07-04  Akim Demaille  <akim@lrde.epita.fr>
7826
7827         tests: headers.at: strengthen.
7828         * tests/headers.at (Several headers): Be stricter when checking
7829         the exported macros.
7830
7831 2012-07-04  Akim Demaille  <akim@lrde.epita.fr>
7832
7833         glr.cc: do not override C++ definitions by C macros.
7834         * data/glr.c: here.
7835         * data/glr.cc: Fix overquotation.
7836         * tests/headers.at: Comment changes.
7837
7838 2012-07-04  Akim Demaille  <akim@lrde.epita.fr>
7839
7840         YYLLOC_DEFAULT: factor, and don't export it in headers.
7841         * data/c++.m4, data/c.m4 (b4_yylloc_default_define): New.
7842         * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c: Use it.
7843         * data/glr.cc: Do not define YYLLOC_DEFAULT in the header file,
7844         but in the implementation one.
7845
7846 2012-07-04  Akim Demaille  <akim@lrde.epita.fr>
7847
7848         api.prefix: do not use #define to handle YYSTYPE_IS_TRIVIAL etc.
7849         The following mixture is insane:
7850
7851           #define YYSTYPE_IS_TRIVIAL PREFIX_STYPE_IS_TRIVIAL
7852           #if (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)
7853
7854         since, of course YYSTYPE_IS_TRIVIAL is defined.  Instead we could
7855         define YYSTYPE_IS_TRIVIAL as PREFIX_STYPE_IS_TRIVIAL only when the
7856         later is defined, but let's avoid stacking CPP on top of M4: rather, use
7857
7858           #if (defined PREFIX_STYPE_IS_TRIVIAL && PREFIX_STYPE_IS_TRIVIAL)
7859
7860         * data/glr.c, data/yacc.c: Use YYSTYPE_IS_TRIVIAL, YYSTYPE_IS_DECLARED,
7861         YYLTYPE_IS_TRIVIAL and YYLTYPE_IS_DECLARED under their api.prefix-renamed
7862         name.
7863
7864 2012-07-04  Akim Demaille  <akim@lrde.epita.fr>
7865
7866         tests: portability fixes.
7867         Reported by Hydra.
7868
7869         * tests/headers.at (Several headers): Be sure to include config.h
7870         in the files to compile.
7871
7872 2012-07-04  Akim Demaille  <akim@lrde.epita.fr>
7873
7874         c++: fewer #includes in the headers.
7875         * data/lalr1.cc: Define YY_NULL in the *.cc file, it is not needed
7876         in the header.
7877         * data/location.cc: iosfwd suffices.
7878
7879 2012-07-04  Akim Demaille  <akim@lrde.epita.fr>
7880
7881         glr.cc: formatting changes.
7882         * data/glr.cc: here.
7883
7884 2012-07-04  Akim Demaille  <akim@lrde.epita.fr>
7885
7886         tests: more logs.
7887         * tests/headers.at (Several parsers): Here.
7888
7889 2012-07-04  Akim Demaille  <akim@lrde.epita.fr>
7890
7891         api.prefix: also rename YYDEBUG.
7892         The testsuite in master has shown weird errors for the "Mulitple
7893         Parsers" tests: the caller of p5.parse() received some apparently
7894         random value, while tracing p5.parse() showed that the function was
7895         consistently returning 0.
7896
7897         It happens when mixing several parser headers, some generated without
7898         %debug, others with.  In particular the C++ parser was generated with
7899         %debug, i.e., with:
7900
7901           #ifndef YYDEBUG
7902           # define YYDEBUG 1
7903           #endif
7904
7905         and compiled separatedly.  Yet, its header was included after the one
7906         of another parser, this time without %debug, i.e., with
7907
7908           #ifndef YYDEBUG
7909           # define YYDEBUG 0
7910           #endif
7911
7912         in its header.  As a result, the parser was compiled with YYDEBUG set,
7913         but its header was used without.  Since the layout of the objects are
7914         then completely different, boom.
7915
7916         Therefore, do not change the value of YYDEBUG.  Rather, use it as a
7917         default value for <API.PREFIX>DEBUG.
7918
7919         * data/c.m4 (b4_YYDEBUG_define): New.
7920         (b4_declare_yydebug): Rename as...
7921         (b4_yydebug_declare): this, for consistency.
7922         * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c: Use it.
7923         * NEWS: Document it.
7924
7925 2012-07-02  Akim Demaille  <akim@lrde.epita.fr>
7926
7927         formatting changes.
7928         * data/lalr1.cc: here.
7929
7930 2012-07-02  Akim Demaille  <akim@lrde.epita.fr>
7931
7932         NEWS: spell fixes.
7933         * NEWS: here.
7934         Reported by Stefano Lattarini.
7935
7936 2012-07-02  Akim Demaille  <akim@lrde.epita.fr>
7937
7938         Merge remote-tracking branch 'origin/maint'
7939         * origin/maint:
7940           NEWS: spell check.
7941           api.prefix.
7942
7943 2012-07-02  Akim Demaille  <akim@lrde.epita.fr>
7944
7945         NEWS: spell check.
7946         * NEWS: here.
7947
7948 2012-06-29  Akim Demaille  <akim@lrde.epita.fr>
7949
7950         api.prefix.
7951         * data/c.m4 (b4_api_prefix, b4_api_PREFIX): New.
7952         (b4_prefix, b4_union_name, b4_token_enums, b4_declare_yylstype): Use them.
7953         * data/glr.c, data/yacc.c, data/glr.cc, data/lalr1.cc: Use them to change
7954         the prefix of exported preprocessor symbols.
7955         * src/getargs.c (usage): Ditto.
7956         * tests/headers.at (Several parsers): New.
7957         * tests/local.at (AT_API_PREFIX): New.
7958         AT_YYSTYPE, AT_YYLTYPE): Adjust.
7959         * doc/bison.texi (Multiple Parsers): Move documentation of %name-prefix to...
7960         (Table of Symbols): here.
7961         (Multiple Parsers): Document api.prefix.
7962         (%define Summary): Point to it.
7963         Use @code for variable names.
7964         (Bison Options): -p/--name-prefix are obsoleted.
7965         * NEWS: Announce api.prefix.
7966
7967 2012-06-29  Victor Santet  <victor.santet@epita.fr>
7968
7969         warnings: display warnings categories
7970         * src/complain.c (error_message): Call 'warnings_print_categories'.
7971         * src/gram.c (grammar_rules_useless_report): Display itself warning
7972         category.
7973         * tests/actions.at, tests/conflicts.at, tests/existing.at,
7974         tests/input.at, tests/named-refs.at, tests/output.at, tests/reduce.at,
7975         tests/regression.at, tests/skeletons.at: Adjust.
7976         * NEWS: Document this.
7977
7978 2012-06-29  Victor Santet  <victor.santet@epita.fr>
7979
7980         warnings: be ready to print warnings categories
7981         A function to print warnings categories, like -Wyacc, -Wother, etc.
7982
7983         * src/complain.h, src/complain.c (print_warning_categories): New function.
7984         * src/output.c (ARRAY_CARDINALITY): Move it to file 'src/system.h'.
7985         * src/complain.h (enum warnings): New value, 'silent', "complain"
7986         must not display the warning type.
7987
7988 2012-06-29  Akim Demaille  <akim@lrde.epita.fr>
7989
7990         maint: prepare forthcoming changes
7991         * src/gram.c (rule_rhs_print): Do not print new line anymore.
7992         (rule_print): Make it static.
7993         * src/closure.c, src/derives.c, src/gram.c: Adjust.
7994
7995 2012-06-29  Victor Santet  <victor.santet@epita.fr>
7996
7997         style changes
7998         * src/complain.c, src/reader.c, src/reduce.c, src/main.c:
7999         Fix indentation.
8000         Simplify a bit.
8001
8002 2012-06-28  Akim Demaille  <akim@lrde.epita.fr>
8003
8004         regen.
8005
8006 2012-06-28  Victor Santet  <victor.santet@epita.fr>
8007
8008         warnings: factoring: complaints
8009         * src/complain.c (error_message): Accept warning categories (an integer) as
8010         argument.
8011         Location is a 'const location *' instead of 'location *'.
8012         (ERROR_MESSAGE): Delete it.
8013         * src/complain.c, src/complain.h (complains): New function.
8014         (complain, complain_at, complain_at_indent): Generic functions for
8015         complaints. Call 'complains'.
8016         (warn_at, warn_at_indent, warn, yacc_at, midrule_value_at)
8017         (fatal_at, fatal): Delete them. Adjust dependencies.
8018         * src/complain.h (enum warnings): New fields 'complaint' and 'fatal'.
8019         * bootstrap.conf (XGETTEXT_OPTIONS): Adjust.
8020
8021 2012-06-28  Victor Santet  <victor.santet@epita.fr>
8022
8023         warnings: move them to complain.c.
8024         * src/getargs.h, src/getargs.c (warnings, warnings_flags): Move to...
8025         * src/complain.h, src/complain.c: Here.
8026
8027 2012-06-28  Victor Santet  <victor.santet@epita.fr>
8028
8029         warnings: rename the categories
8030         Forthcoming changes will use the warning categories much more often,
8031         so shortening them will improve readability.
8032
8033         * src/complain.c, src/complain.h, src/conflicts.c,
8034         * src/getargs.c, src/getargs.h, src/gram.c (enum warnings):
8035         s/warnings_/W/g.
8036
8037 2012-06-28  Akim Demaille  <akim@lrde.epita.fr>
8038
8039         fix merge.
8040         * data/bison.m4: Use b4_error_verbose_if after it was defined.
8041
8042 2012-06-28  Akim Demaille  <akim@lrde.epita.fr>
8043
8044         Merge remote-tracking branch 'origin/maint'
8045         * origin/maint:
8046           tests: use the generalized default yylex.
8047           tests: AT_YYERROR_DEFINE: prepare for list of ints.
8048           skeletons: no longer define YYLSP_NEEDED.
8049           c++: do not export YYTOKEN_TABLE and YYERROR_VERBOSE.
8050
8051 2012-06-28  Akim Demaille  <akim@lrde.epita.fr>
8052
8053         tests: use the generalized default yylex.
8054         * tests/actions.at, tests/glr-regression.at, tests/regression.at: here.
8055
8056 2012-06-28  Akim Demaille  <akim@lrde.epita.fr>
8057
8058         tests: AT_YYERROR_DEFINE: prepare for list of ints.
8059         * tests/local.at (AT_YYERROR_DEFINE): Don't add quotes, check their
8060         presence to detect char/int types.
8061         * tests/actions.at, tests/conflicts.at, tests/glr-regression.at,
8062         * tests/push.at, tests/regression.at: Adjust.
8063
8064 2012-06-27  Akim Demaille  <akim@lrde.epita.fr>
8065
8066         skeletons: no longer define YYLSP_NEEDED.
8067         * data/c.m4, data/glr.cc: here.
8068         * NEWS, TODO: Adjust.
8069
8070 2012-06-27  Akim Demaille  <akim@lrde.epita.fr>
8071
8072         c++: do not export YYTOKEN_TABLE and YYERROR_VERBOSE.
8073         * src/output.c (prepare_symbols): Do not define b4_token_table.
8074         (prepare): Define b4_token_table_flag.
8075         * data/bison.m4 (b4_token_table_if): New.
8076         Arm it when error-verbose.
8077         * data/glr.c, data/yacc.c (YYTOKEN_TABLE): Remove.
8078         Use m4.
8079         * data/lalr1.cc: Likewise.
8080         (YYERROR_VERBOSE): Remove.
8081         * NEWS, doc/bison.texi: Document this.
8082
8083 2012-06-26  Akim Demaille  <akim@lrde.epita.fr>
8084
8085         Merge remote-tracking branch 'origin/maint'
8086         * origin/maint:
8087           maint: use *.texi.
8088
8089 2012-06-26  Akim Demaille  <akim@lrde.epita.fr>
8090
8091         maint: use *.texi.
8092         This is more consistent with the other packages, and Automake-NG
8093         supports only *.texi.
8094
8095         * doc/bison.texinfo: Rename as...
8096         * doc/bison.texi: this.
8097         * doc/Makefile.am, examples/calc++/Makefile.am: Adjust.
8098
8099 2012-06-26  Akim Demaille  <akim@lrde.epita.fr>
8100
8101         Merge remote-tracking branch 'origin/maint'
8102         * origin/maint:
8103           tests: do not output m4 set up.
8104           tests: use the generic yyerror function.
8105           tests: use assert instead of plain abort.
8106           tests: improve the generic yylex implementation.
8107           tests: generalize the compilation macros.
8108           tests: fix confusion between api.prefix and name-prefix.
8109           maint: gitignores.
8110           yacc: work around the ylwrap limitation.
8111
8112 2012-06-26  Victor Santet  <victor.santet@epita.fr>
8113
8114         warnings: raise warning for useless printers or destructors
8115         * src/scan-code.h (code_props): Add field 'is_used'.
8116         (CODE_PROPS_NONE_INIT): Adjust.
8117         * src/scan-code.l (code_props_plain_init, code_props_symbol_action_init)
8118         (code_props_rule_action_init): Instead of implementing several
8119         times the initialization of the code_props structures,
8120         use code_props_none_init.
8121         * src/symtab.c (symbol_check_defined): If a symbol does not have a
8122         destructor (resp. printer) but has a type which has a destructor (resp.
8123         printer), then set field 'is_used' to true.
8124         (semantic_type_check_defined): If a type has a destructor (resp. printer)
8125         but all symbols of this type have already a destructor (resp. printer),
8126         then raise a warning.
8127         * tests/input.at (Useless printers or destructors): New.
8128
8129 2012-06-26  Akim Demaille  <akim@lrde.epita.fr>
8130
8131         tests: do not output m4 set up.
8132         * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
8133         Use a diversion to avoid outputting comments etc.
8134         Removes 17k lines from testsuite (10% of the number of lines).
8135
8136 2012-06-26  Akim Demaille  <akim@lrde.epita.fr>
8137
8138         tests: use the generic yyerror function.
8139         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Factor.
8140         Use AT_YYERROR_DEFINE.
8141         Therefore, instead of using stdout, use and check stderr.
8142         * tests/glr-regression.at (Uninitialized location when reporting ambiguity):
8143         Use AT_YYERROR_DEFINE.
8144
8145 2012-06-26  Akim Demaille  <akim@lrde.epita.fr>
8146
8147         tests: use assert instead of plain abort.
8148         * tests/actions.at, tests/calc.at, tests/conflicts.at,
8149         * tests/cxx-type.at, tests/glr-regression.at, tests/input.at,
8150         * tests/named-refs.at, tests/regression.at, tests/torture.at,
8151         * tests/local.at:
8152         Prefer assert to abort.
8153
8154 2012-06-26  Akim Demaille  <akim@lrde.epita.fr>
8155
8156         tests: improve the generic yylex implementation.
8157         * tests/local.at (AT_YYSTYPE, AT_YYLTYPE): New.
8158         (AT_YYLEX_FORMALS): Use them.
8159         (AT_YYLEX_DEFINE): Be independent of the location implementation.
8160
8161 2012-06-26  Akim Demaille  <akim@lrde.epita.fr>
8162
8163         tests: generalize the compilation macros.
8164         * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): If OUTPUT ends with ".o",
8165         then append the "natural" extension for the input file (.c or .cc).
8166         If there is no source, pass -c.
8167         * tests/headers.at, tests/input.at, tests/regression.at: Adjust.
8168
8169 2012-06-26  Akim Demaille  <akim@lrde.epita.fr>
8170
8171         tests: fix confusion between api.prefix and name-prefix.
8172         * tests/local.at (AT_NAME_PREFIX): Take api.prefix into account.
8173         (AT_API_PREFIX): Rename as...
8174         (AT_API_prefix): this.
8175         Do not take %name-prefix into account.
8176         Fix misuses.
8177
8178 2012-06-26  Akim Demaille  <akim@lrde.epita.fr>
8179
8180         maint: gitignores.
8181
8182 2012-06-25  Victor Santet  <victor.santet@epita.fr>
8183
8184         warnings: useless semantic types
8185         * src/symtab.h (symbol_list): Represent semantic types as structure
8186         'semantic_type'.
8187         * src/symlist.c (symbol_list_type_new): Allocate this structure.
8188         (symbol_list_code_props_set): Set this semantic type's status to used if it
8189         was not declared.
8190         * src/symtab.c (semantic_types_sorted): New.
8191         (semantic_type_new): Set the new semantic type's location appropriately.
8192         (symbol_check_defined): If a symbol has a type, then set this type's status
8193         to "declared".
8194         (semantic_type_check_defined, semantic_type_check_defined_processor): Same
8195         as symbol_check_defined and symbol_check_defined_processor, but for semantic
8196         types.
8197         (symbol_check_defined): Check semantic types usefulness.
8198         * src/symtab.h (semantic_type): New fields 'location' and 'status'.
8199         * src/symtab.h, src/symtab.c (semantic_type_new)
8200         (semantic_type_from_uniqstr, semantic_type_get): Accept a location as a
8201         supplementary argument.
8202         * tests/input.at (Unassociated types used for printer of destructor): New.
8203         * tests/c++.at (AT_CHECK_VARIANTS): Fix an error caught by this commit.
8204
8205 2012-06-25  Akim Demaille  <akim@lrde.epita.fr>
8206
8207         yacc: work around the ylwrap limitation.
8208         * data/yacc.c (b4_shared_declarations): Include the header guards.
8209         Do not include the header in the *.c file, duplicate it.
8210         * NEWS (Future Changes): Extend, and announce the forthcoming change
8211         about the use of the parser header.
8212
8213 2012-06-25  Akim Demaille  <akim@lrde.epita.fr>
8214
8215         fix for printers and destructors.
8216         The previous "code_props: factor more" patch sends has_%printer
8217         etc. to m4, instead of has_printer.
8218
8219         * src/output.c (prepare_symbol_definitions): Fix value of pname.
8220
8221 2012-06-25  Akim Demaille  <akim@lrde.epita.fr>
8222
8223         Merge remote-tracking branch 'origin/maint'
8224         * origin/maint:
8225           tests: more uniformity.
8226           tests: handle locations in a more generic way.
8227           tests: handle locations in the generic yyerror functions.
8228           tests: fix AT_CHECK_CALC.
8229           tests: improve infrastructure
8230           tests: factor.
8231           skeletons: minor style changes
8232           tests: AT_LANG.
8233           c skeletons: factor the declaration of yylloc and yylval.
8234           news: condemn YYPARSE_PARAM and YYLEX_PARAM.
8235           maint: regen.
8236
8237 2012-06-22  Akim Demaille  <akim@lrde.epita.fr>
8238
8239         code_props: factor more.
8240         * src/symtab.h, src/symtab.c (code_props_type_string): No longer static.
8241         * src/output.c (CODE_PROPS): Remove, we can now iterate on both the
8242         destructor and the printer.
8243         (SET_KEY2): New.
8244
8245 2012-06-22  Victor Santet  <victor.santet@epita.fr>
8246
8247         maint: factor the handling of %printer and %destructor
8248         There is too much code duplication between %printer and %destructor.
8249         We used to have two functions for each action: the first one for
8250         destructors, the second one for printers. Factor using a
8251         'code_props_type', and an array of code_props instead of two
8252         members.
8253
8254         * src/symlist.h, src/symlist.c (symbol_list_destructor_set)
8255         (symbol_list_printer_set): Fuse into...
8256         (symbol_list_code_props_set): this.
8257         * src/symtab.h, src/symtab.c (default_tagged_destructor)
8258         (default_tagged_printer): Fuse into...
8259         (default_tagged_code_props): this.
8260         (default_tagless_destructor, default_tagless_printer)
8261         (default_tagless_code_props): Likewise.
8262         (code_props_type_string): new.
8263         (symbol_destructor_set, symbol_destructor_get, semantic_type_destructor_set)
8264         (default_tagged_destructor_set, default_tagless_destructor_set)
8265         (symbol_printer_set, symbol_printer_get, semantic_type_printer_set)
8266         (default_tagged_printer_set, default_tagless_printer_set): Replace by...
8267         (symbol_code_props_set, symbol_code_props_get, semantic_type_code_props_set)
8268         (default_tagged_code_props_set, default_tagless_code_props_set): these.
8269         * src/parse-gram.y (grammar_declaration): Adjust.
8270         * src/output.c (CODE_PROP, grammar_declaration): Ditto.
8271         * src/reader.c (symbol_should_be_used): Ditto.
8272
8273 2012-06-22  Akim Demaille  <akim@lrde.epita.fr>
8274
8275         tests: more uniformity.
8276         * tests/local.at (AT_LEX_FORMALS, AT_LEX_ARGS, AT_LEX_PRE_FORMALS)
8277         (AT_LEX_PRE_ARGS): Rename as...
8278         (AT_YYLEX_FORMALS, AT_YYLEX_ARGS, AT_YYLEX_PRE_FORMALS)
8279         (AT_YYLEX_PRE_ARGS): these, for consistency.
8280         (AT_API_PREFIX): Take %name-prefix into account.
8281         (AT_YYLEX_PROTOTYPE): New.
8282         Use it.
8283         * tests/actions.at, tests/calc.at, tests/cxx-type.at: Adjust to
8284         use them.
8285
8286 2012-06-22  Akim Demaille  <akim@lrde.epita.fr>
8287
8288         tests: handle locations in a more generic way.
8289         * tests/local.at (AT_YYERROR_PROTOTYPE): New.
8290         Use it.
8291         * tests/cxx-type.at: Extensive revamp to use a more traditional
8292         quotation scheme, and to use the generic yyerror implementation.
8293         Prefer Autotest macros to CPP macros.
8294         * tests/java.at: .
8295
8296 2012-06-22  Akim Demaille  <akim@lrde.epita.fr>
8297
8298         tests: handle locations in the generic yyerror functions.
8299         * tests/local.at (AT_YYERROR_DECLARE_EXTERN, AT_YYERROR_DECLARE)
8300         (AT_YYERROR_DEFINE): Handle locations for C and C++.
8301         * tests/calc.at: Use it for C++ (as C has extra arguments which
8302         are not yet handled by AT_BISON_OPTION_PUSHDEFS).
8303         * tests/actions.at: Adjust.
8304
8305 2012-06-22  Akim Demaille  <akim@lrde.epita.fr>
8306
8307         tests: fix AT_CHECK_CALC.
8308         * tests/calc.at (AT_CHECK_CALC): Contrary to its documentation,
8309         the test was skipped if given a second argument.
8310         Unused feature, remove it.
8311
8312 2012-06-22  Akim Demaille  <akim@lrde.epita.fr>
8313
8314         tests: improve infrastructure
8315         * tests/local.at (AT_LANG): Use c++ instead of cxx for C++.
8316         Adjust dependencies.
8317         (AT_YYERROR_DECLARE_EXTERN, AT_YYERROR_DECLARE): Issue nothing
8318         for C++/Java.
8319         (AT_YYERROR_DEFINE): Use m4_case.
8320         (AT_JAVA_COMPILE): Use AT_SKIP_IF.
8321
8322 2012-06-21  Akim Demaille  <akim@lrde.epita.fr>
8323
8324         tests: factor.
8325         * tests/glr-regression.at, tests/output.at, tests/push.at,
8326         * tests/regression.at, tests/torture.at, tests/actions.at:
8327         Use AT_YYLEX_* and AT_YYERROR_*.
8328
8329 2012-06-21  Akim Demaille  <akim@lrde.epita.fr>
8330
8331         skeletons: minor style changes
8332         * data/glr.c, data/yacc.c: here.
8333
8334 2012-06-21  Akim Demaille  <akim@lrde.epita.fr>
8335
8336         tests: AT_LANG.
8337         * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
8338         Define/undefine AT_LANGE
8339         (AT_LANG_COMPILE): New.
8340         (AT_FULL_COMPILE): Use AT_LANG.
8341
8342 2012-06-21  Victor Santet  <victor.santet@epita.fr>
8343
8344         symtab: refactoring
8345         Prepares forthcoming changes.
8346
8347         * src/symtab.c (symbols_do): Accept the hash table and the sorted
8348         list as arguments. Adjust dependencies.
8349
8350 2012-06-21  Akim Demaille  <akim@lrde.epita.fr>
8351
8352         maint: address syntax-check issues.
8353         * examples/calc++/local.mk: Space changes.
8354         * src/files.c: Avoid unmarked_diagnostics.
8355         * src/output.c: Remove useless include.
8356
8357 2012-06-21  Akim Demaille  <akim@lrde.epita.fr>
8358
8359         c skeletons: factor the declaration of yylloc and yylval.
8360         There is one difference: now, even without --defines, we generate
8361         extern declarations for these variables.  The factoring is worth it.
8362         * data/c.m4 (b4_declare_yylstype): Declare them.
8363         * data/glr.c, data/yacc.c: Adjust.
8364
8365 2012-06-21  Akim Demaille  <akim@lrde.epita.fr>
8366
8367         news: condemn YYPARSE_PARAM and YYLEX_PARAM.
8368         * NEWS: here.
8369         (Bison 1.875): Add %parse-param and %lex-param.
8370         * doc/bison.texinfo: Spello.
8371
8372 2012-06-20  Akim Demaille  <akim@lrde.epita.fr>
8373
8374         fix warnings for useless %printer/%destructor
8375         The previous commit, which turns into a warning what used to be an
8376         error:
8377
8378             %printer {} foo;
8379             %%
8380             exp: '0';
8381
8382         has two shortcomings: the warning is way too long (foo is reported
8383         to be useless later), and besides, it also turns into a warning much
8384         more serious errors:
8385
8386            %printer {} foo;
8387            %%
8388            exp: foo;
8389
8390         Reduce the amount to warnings in the first case, restore the error in
8391         the second.
8392
8393         * src/symtab.h (status): Add a new inital state: undeclared.
8394         * src/symtab.c (symbol_new): Initialize to undeclared.
8395         (symbol_class_set): Simplify the logic of the code that neutralize
8396         the "redeclared" warning after the "redefined" one.
8397         (symbol_check_defined): "undeclared" is also an error.
8398         * src/reader.c (grammar_current_rule_symbol_append): Symbols appearing
8399         in a rule are "needed".
8400         * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
8401         An unknown symbol appearing in a %printer/%destructor is "used".
8402         * src/reduce.c (nonterminals_reduce): Do not report as "useless" symbols
8403         that are not used (e.g., those that for instance appeared only in a
8404         %printer).
8405         * tests/input.at (Undeclared symbols used for a printer or destructor):
8406         Improve the cover the cases described above.
8407
8408 2012-06-20  Akim Demaille  <akim@lrde.epita.fr>
8409
8410         gitignore: test-driver.
8411
8412 2012-06-20  Akim Demaille  <akim@lrde.epita.fr>
8413
8414         maint: style changes.
8415         * src/reduce.c (reduce_grammar_tables): Define variables with their
8416         initial value.
8417
8418 2012-06-20  Akim Demaille  <akim@lrde.epita.fr>
8419
8420         news: fixes.
8421         * NEWS: Fix spelling.
8422
8423 2012-06-20  Victor Santet  <victor.santet@epita.fr>
8424
8425         warnings: used but undeclared symbols are warnings
8426         We used to raise an error if a symbol appears only in a %printer or
8427         %destructor.  Make it a warning.
8428
8429         * src/symtab.h (status): New enum.
8430         (symbol): Replace the binary "declared" with the three-state "status".
8431         Adjust dependencies.
8432         * src/symtab.c (symbol_check_defined): Needed symbols are an error,
8433         whereas "used" are simply warnings.
8434         * src/symlist.c (symbol_list_destructor_set, symbol_list_printer): Set
8435         symbol status to 'used' when associated to destructors or printers.
8436         * input.at (Undeclared symbols used for a printer or destructor): New.
8437
8438 2012-06-20  Akim Demaille  <akim@lrde.epita.fr>
8439
8440         maint: regen.
8441         * Makefile.am (regen): New target.
8442
8443 2012-06-20  Akim Demaille  <akim@lrde.epita.fr>
8444
8445         regen.
8446
8447 2012-06-20  Akim Demaille  <akim@lrde.epita.fr>
8448
8449         maint: regen.
8450         * Makefile.am (regen): New target.
8451
8452 2012-06-19  Akim Demaille  <akim@lrde.epita.fr>
8453
8454         tests: enhance AT_YYERROR_DEFINE.
8455         * tests/local.at: Handle the fact that locations are no longer
8456         needed with lalr1.cc.
8457
8458 2012-06-19  Akim Demaille  <akim@lrde.epita.fr>
8459
8460         Merge remote-tracking branch 'origin/maint'
8461         * origin/maint:
8462           maint: formatting changes.
8463           tests: support api.prefix.
8464           tests: pacify font-lock-mode.
8465           tests: remove test covered elsewhere.
8466           tests: factor the declaration/definition of yyerror and yylex.
8467           regen.
8468           tests: portability issues.
8469           tests: call the parser from another compilation unit.
8470           glr.c, yacc.c: declare yydebug in the header.
8471           skeletons: use header guards.
8472           tests: improve AT_FULL_COMPILE.
8473           tests: reorder.
8474           tests: strengthen the test on generated headers inclusion
8475           yacc.c: instead of duplicating y.tab.h inside y.tac.c, include it.
8476           yacc.c: factor.
8477
8478 2012-06-19  Akim Demaille  <akim@lrde.epita.fr>
8479
8480         maint: formatting changes.
8481         * NEWS: Fix indentation of code snippets.
8482         Untabify.
8483
8484 2012-06-17  Akim Demaille  <akim@lrde.epita.fr>
8485
8486         tests: support api.prefix.
8487         * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
8488         Define AT_API_PREFIX.
8489         (AT_YYERROR_DEFINE, AT_YYERROR_DECLARE_EXTERN, AT_YYLEX_DECLARE_EXTERN)
8490         (AT_YYLEX_DEFINE): Use it.
8491         * tests/input.at, tests/regression.at, tests/torture.at: Add
8492         AT_BISON_OPTION_PUSHDEFS/POPDEFS.
8493
8494 2012-06-17  Akim Demaille  <akim@lrde.epita.fr>
8495
8496         tests: pacify font-lock-mode.
8497         * tests/local.at: here.
8498
8499 2012-06-17  Akim Demaille  <akim@lrde.epita.fr>
8500
8501         tests: remove test covered elsewhere.
8502         * tests/headers.at (%union and --defines): Remove, pretty useless and
8503         insignificant.
8504
8505 2012-06-17  Akim Demaille  <akim@lrde.epita.fr>
8506
8507         tests: factor the declaration/definition of yyerror and yylex.
8508         * tests/local.at (AT_YYERROR_DECLARE, AT_YYERROR_DECLARE_EXTERN)
8509         (AT_YYERROR_DEFINE, AT_YYLEX_DECLARE, AT_YYLEX_DECLARE_EXTERN)
8510         (AT_YYLEX_DEFINE): New.
8511         Must be used inside AT_BISON_OPTION_PUSHDEFS/POPDEFS pair.
8512         * tests/actions.at, tests/conflicts.at, tests/glr-regression.at,
8513         * tests/headers.at, tests/input.at, tests/named-refs.at,
8514         * tests/regression.at, tests/skeletons.at, tests/synclines.at,
8515         * tests/torture.at: Use them.
8516
8517 2012-06-17  Akim Demaille  <akim@lrde.epita.fr>
8518
8519         regen.
8520
8521 2012-06-17  Akim Demaille  <akim@lrde.epita.fr>
8522
8523         tests: portability issues.
8524         * tests/calc.at (AT_CALC_MAIN): Missing include reported by Hydra.
8525
8526 2012-06-15  Akim Demaille  <akim@lrde.epita.fr>
8527
8528         tests: call the parser from another compilation unit.
8529         In order to improve the testing of %defines, which exports the
8530         interface of the generated parser, change the calc.at tests so that
8531         when %defines is passed, main will be in another compilation unit.  It
8532         loads the generated header.
8533
8534         * tests/calc.at (AT_CALC_MAIN): New.
8535         Includes the definition of the global variables.
8536         Therefore, now declare them from the %requires section of the parser.
8537         Adjust to yydebug and yyparse being renamed by %name-prefix.
8538
8539 2012-06-15  Akim Demaille  <akim@lrde.epita.fr>
8540
8541         glr.c, yacc.c: declare yydebug in the header.
8542         * data/c.m4 (b4_declare_yydebug): New.
8543         * data/glr.c, data/yacc.c (b4_shared_declarations): Use it.
8544         Remove the corresponding code from the parser body.
8545         * NEWS: Doc this.
8546
8547 2012-06-15  Akim Demaille  <akim@lrde.epita.fr>
8548
8549         skeletons: use header guards.
8550         * data/glr.c, data/glr.cc, data/yacc.c: here.
8551         * NEWS: Document it.
8552
8553 2012-06-15  Akim Demaille  <akim@lrde.epita.fr>
8554
8555         tests: improve AT_FULL_COMPILE.
8556         * tests/local.at: Accept a third argument.
8557         Simplify quotation pattern.
8558         Calls for better refactoring, but will suffice for a while.
8559
8560 2012-06-15  Akim Demaille  <akim@lrde.epita.fr>
8561
8562         tests: reorder.
8563         * tests/calc.at (power): Move its definition, as a preparation for
8564         forthcoming changes.
8565         And space changes.
8566
8567 2012-06-15  Akim Demaille  <akim@lrde.epita.fr>
8568
8569         tests: strengthen the test on generated headers inclusion
8570         * tests/headers.at (AT_TEST_CPP_GUARD_H): Accept Bison directives.
8571         (Invalid CPP headers): Check glr.
8572
8573 2012-06-15  Akim Demaille  <akim@lrde.epita.fr>
8574
8575         yacc.c: instead of duplicating y.tab.h inside y.tac.c, include it.
8576         This is already what glr.c and lalr1.cc do.
8577
8578         * data/yacc.c: here.
8579
8580 2012-06-15  Akim Demaille  <akim@lrde.epita.fr>
8581
8582         maint: xfdopen, and scope reduction.
8583         * src/files.h, src/files.c (xfdopen): New.
8584         * src/output.c (output_skeleton): Use it.
8585         Reduce the scope of argv.
8586
8587 2012-06-15  Akim Demaille  <akim@lrde.epita.fr>
8588
8589         maint: space changes
8590         * configure.ac, src/complain.c: space changes.
8591
8592 2012-06-13  Akim Demaille  <akim@lrde.epita.fr>
8593
8594         yacc.c: factor.
8595         yacc.c used to include two almost identical sections: one for the *.h
8596         file, and another for the *.c file.  The main difference is that in
8597         the *.c file we used the yy* names (as %name-prefix is handled by
8598         "#define yy* <prefix>*" before), while the *.hh used <prefix>* names.
8599         Keep only the later.  If this is troublesome, b4_shared_declarations
8600         can easily take the desired prefix as argument.
8601
8602         * data/yacc.c (b4_shared_declarations): New.
8603         Use it to factor duplicated declarations.
8604
8605 2012-06-13  Stefano Lattarini  <stefano.lattarini@gmail.com>  (tiny change)
8606
8607         cosmetics: prettify names for compiled object for bison
8608         * src/local.mk (src_bison_SHORTNAME): Define to "bison".
8609
8610 2012-06-13  Akim Demaille  <akim@lrde.epita.fr>
8611
8612         lalr1.cc: spello.
8613         * data/lalr1.cc: Reported by Gilles Espinasse.
8614
8615 2012-06-13  Akim Demaille  <akim@lrde.epita.fr>
8616
8617         Merge remote-tracking branch 'origin/maint'
8618         * origin/maint:
8619           skeletons: factor yacc.c and glr.c.
8620           glr.c: minor refactoring.
8621           tests: remove all the -On flags.
8622           maint: fix spello.
8623           maint: improve release procedure instructions.
8624           gnulib: update readme-release.
8625           maint: cfg.mk: manual title.
8626           maint: cfg.mk: simplify
8627           maint: post-release administrivia
8628
8629 2012-06-12  Akim Demaille  <akim@lrde.epita.fr>
8630
8631         skeletons: factor yacc.c and glr.c.
8632         yacc.c and glr.c share common declarations.  Their YYLTYPE are exactly
8633         equal, and their YYSTYPE are sufficiently alike to be fused (its
8634         declaration was protected by YYSTYPE_IS_DECLARED in yacc.c, but not in
8635         glr.c).  Besides, yacc.c duplicated the definitions of YYLTYPE and
8636         YYSTYPE (*.h/*.c).
8637
8638         * data/c.m4 (b4_declare_yylstype): New.
8639         * data/yacc.c, data/glr.c: Use it.
8640
8641 2012-06-12  Akim Demaille  <akim@lrde.epita.fr>
8642
8643         glr.c: minor refactoring.
8644         * data/glr.c (b4_shared_declarations): Move from the generated file
8645         section, to the M4 prologue.
8646
8647 2012-06-12  Akim Demaille  <akim@lrde.epita.fr>
8648
8649         tests: remove all the -On flags.
8650         * tests/atlocal.in: Here.
8651         Reported by Gilles Espinasse.
8652
8653 2012-06-12  Akim Demaille  <akim@lrde.epita.fr>
8654
8655         maint: fix spello.
8656         * README-hacking: Here.
8657         * THANKS: Reported by Gilles Espinasse.
8658
8659 2012-06-12  Akim Demaille  <akim@lrde.epita.fr>
8660
8661         maint: improve release procedure instructions.
8662         * gnulib: Update, in particular (README-release).
8663         * bootstrap.conf: don't require gendocs, provided by gnu-web-doc-update,
8664         provided by readme-release.
8665         * README-hacking: Update accordingly.
8666
8667 2012-06-07  Akim Demaille  <akim@lrde.epita.fr>
8668
8669         gnulib: update readme-release.
8670         * gnulib (readme-release): Now includes the modules it promotes.
8671         * bootstrap.conf: Simplify accordingly.
8672
8673 2012-06-07  Akim Demaille  <akim@lrde.epita.fr>
8674
8675         maint: cfg.mk: manual title.
8676         * cfg.mk (manuel_title): New.
8677
8678 2012-06-07  Akim Demaille  <akim@lrde.epita.fr>
8679
8680         maint: cfg.mk: simplify
8681         * cfg.mk: Remove bits provided by maint.mk.
8682
8683 2012-06-07  Akim Demaille  <akim@lrde.epita.fr>
8684
8685         maint: post-release administrivia
8686         * NEWS: Add header line for next release.
8687         * .prev-version: Record previous version.
8688         * cfg.mk (old_NEWS_hash): Auto-update.
8689
8690 2012-06-05  Akim Demaille  <akim@lrde.epita.fr>
8691
8692         maint: an envvar equal to "00" is 0.
8693         * src/output.c (prepare): here.
8694         Reported by Paul Eggert.
8695
8696 2012-06-05  Akim Demaille  <akim@lrde.epita.fr>
8697
8698         maint: don't use mbsr?chr.
8699         Basically, revert ba60c39547a445dee3e07920931b4d7a81843868's move to
8700         mbs* functions, which was prompted by -DGNULIB_POSIXCHECK.  See
8701         <http://lists.gnu.org/archive/html/bison-patches/2012-05/msg00052.html>
8702         and following.
8703
8704         * bootstrap.conf: No longer ask for them.
8705         * src/files.c, src/getargs.c, src/location.c,
8706         * src/parse-gram.c, src/parse-gram.y, src/scan-gram.l,
8707         * src/symtab.c: s/mbs(r?chr)/str$1/g.
8708
8709 2012-06-05  Akim Demaille  <akim@lrde.epita.fr>
8710
8711         maint: use xconcat-filename.
8712         * bootstrap.conf (gnulib_modules): Request it.
8713         * src/output.h, src/output.c (compute_pkgdatadir): Rename as...
8714         (pkgdatadir): this.
8715         Adjust dependencies.
8716         * src/output.c (output_skeleton): Reduce the scope of "in".
8717         Use xconcatenated_filename to simplify the construction of the
8718         qualified paths to m4sugar.m4, bison.m4, and the selected skeleton.
8719         There are a few minor differences: the new code uses strchr instead of
8720         mbschr (but this was not really justified), and the new code does not
8721         garantee a single slash even if $BISON_PKGDATADIR ends with several
8722         (which was considered more accurate).  See the discussion at
8723         <http://lists.gnu.org/archive/html/bison-patches/2012-05/msg00052.html>.
8724
8725 2012-06-05  Akim Demaille  <akim@lrde.epita.fr>
8726
8727         maint: minor simplification
8728         * src/output.c (prepare): Assign use_push_for_pull_flag's value at its
8729         declaration.
8730
8731 2012-06-05  Akim Demaille  <akim@lrde.epita.fr>
8732
8733         Merge remote-tracking branch 'origin/maint'
8734         * origin/maint:
8735           version 2.5.1
8736           NEWS: prepare for 2.5.1.
8737           maint: update release procedure
8738           maint: fix comment typos
8739           maint: post-release administrivia
8740
8741 2012-06-05  Akim Demaille  <akim@lrde.epita.fr>
8742
8743         version 2.5.1
8744         * NEWS: Record release date.
8745
8746 2012-06-05  Akim Demaille  <akim@lrde.epita.fr>
8747
8748         NEWS: prepare for 2.5.1.
8749         * NEWS: Be compliant with do-release-commit-and-tag.
8750
8751 2012-06-05  Akim Demaille  <akim@lrde.epita.fr>
8752
8753         maint: update release procedure
8754         * bootstrap.conf: Request do-release-commit-and-tag and readme-release.
8755         * README-hacking: Adjust.
8756
8757 2012-06-05  Jim Meyering  <meyering@redhat.com>
8758
8759         maint: fix comment typos
8760         Using http://github.com/lyda/misspell-check, massage its
8761         output into sed commands to perform the suggested changes.
8762         Initially, I filtered out the THRU->Through changes, because
8763         that failed to retain capitalization in the grammar token.
8764         Instead, do this manually, beforehand:
8765
8766         sed -i s/THRU/THROUGH/ tests/existing.at
8767         git ls-files|misspellings -f -|perl -nl \
8768           -e '/^(.*?)\[(\d+)\]: (\w+) -> "(.*?)"$/ or next;' \
8769           -e '($file,$n,$l,$r)=($1,$2,$3,$4); $q="'\''"; $r=~s/$q/$q\\$q$q/g;'\
8770           -e 'print "sed -i $q${n}s!$l!$r!$q $file"'|bash
8771
8772 2012-05-24  Akim Demaille  <akim@lrde.epita.fr>
8773
8774         build: regen.
8775
8776 2012-05-24  Akim Demaille  <akim@lrde.epita.fr>
8777
8778         Merge tag 'v2.5.1_rc2'
8779         Bison 2.5.1_rc2.
8780
8781         * tag 'v2.5.1_rc2': (34 commits)
8782           Bison 2.5.1_rc2.
8783           doc: fixes.
8784           build: fix ChangeLog generation.
8785           c++: compute the header guards.
8786           skeletons: remove support for unused directive.
8787           lalr1.cc: improve Doxygen documentation.
8788           lalr1.cc: extract stack.hh.
8789           news: convert to double quotes.
8790           space changes.
8791           build: do not prototype flex-generated functions.
8792           build: fix ChangeLog generation.
8793           Bison 2.5.1_rc1.
8794           tests: save/restore Autotest special files when checking XML support.
8795           tests: AT_SAVE_SPECIAL_FILES / AT_RESTORE_SPECIAL_FILES.
8796           tests: honor TESTSUITEFLAGS in all the check targets.
8797           build: do not enable c++ warnings on 0 when nullptr is not supported.
8798           maint: update gnulib.
8799           build: config.in.h.
8800           build: move silent rules.
8801           glr.c: reduce variable scopes.
8802           maint: maintainer-release-check.
8803           maint: shush a syntax-check.
8804           maint: prefer "commit message" to "log entry".
8805           command line: fix minor leaks.
8806           maint: we no longer maintain the ChangeLog.
8807           maint: fix the generation of the synclines for bison's parser.
8808           maint: regen.
8809           maint: import the xmemdup0 gnulib module.
8810           maint: remove left-over gnulib modules.
8811           maint: ignore files imported by autopoint.
8812           build: AC_PROG_LEX: use more readable variable names.
8813           maint: regen src/parse-gram.[ch]
8814           maint: simplify parse-gram.y
8815           maint: s/strncpy/memcpy/, when equivalent
8816
8817 2012-05-23  Akim Demaille  <akim@lrde.epita.fr>
8818
8819         maint: post-release administrivia
8820         * NEWS: Add header line for next release.
8821         * .prev-version: Record previous version.
8822         * cfg.mk (old_NEWS_hash): Auto-update.
8823
8824 2012-05-23  Akim Demaille  <akim@lrde.epita.fr>
8825
8826         Bison 2.5.1_rc2.
8827         * NEWS: Update.
8828
8829 2012-05-23  Akim Demaille  <akim@lrde.epita.fr>
8830
8831         doc: fixes.
8832         * doc/bison.texinfo: Fix errors spotted by syntax-check.
8833
8834 2012-05-23  Akim Demaille  <akim@lrde.epita.fr>
8835
8836         build: fix ChangeLog generation.
8837         * gnulib: Update to get newest gitlog-to-changelog.
8838         * bootstrap: Update.
8839         * Makefile.am (gen-ChangeLog): Fix for Bison's git log style.
8840
8841 2012-05-21  Akim Demaille  <akim@lrde.epita.fr>
8842
8843         c++: compute the header guards.
8844         This is a frequent request.  Recently pointed out by Wei Song,
8845         <http://lists.gnu.org/archive/html/help-bison/2012-05/msg00002.html>.
8846
8847         * data/c.m4 (b4_tocpp, b4_cpp_guard, b4_cpp_guard_open)
8848         (b4_cpp_guard_close): New.
8849         * data/lalr1.cc, data/location.cc, data/stack.hh: Use them.
8850         * TODO (Header Guards): Move to...
8851         * NEWS: here.
8852         Formatting changes.
8853
8854 2012-05-21  Akim Demaille  <akim@lrde.epita.fr>
8855
8856         skeletons: remove support for unused directive.
8857         * src/scan-skel.l (@dir_prefix@): Remove support, has never been
8858         used, not even in the commit that introduced it,
8859         2b81e969ea04c1a6502928ba7e847ec8ff7dcb2f.
8860
8861 2012-05-21  Akim Demaille  <akim@lrde.epita.fr>
8862
8863         lalr1.cc: improve Doxygen documentation.
8864         * data/location.cc: Qualify file names with directory name.
8865
8866 2012-05-21  Akim Demaille  <akim@lrde.epita.fr>
8867
8868         lalr1.cc: extract stack.hh.
8869         See commit 51bacae6b58fd5c6cce861f00440dc917384625e.
8870         * data/stack.hh: New, extracted from...
8871         * data/lalr1.cc: here.
8872         * data/Makefile.am: Adjust.
8873
8874 2012-05-21  Akim Demaille  <akim@lrde.epita.fr>
8875
8876         news: convert to double quotes.
8877         * NEWS: Convert from `quoted' to "quoted".
8878         Reported by Stefano Lattarini.
8879         http://lists.gnu.org/archive/html/bison-patches/2012-05/msg00039.html
8880
8881 2012-05-21  Akim Demaille  <akim@lrde.epita.fr>
8882
8883         space changes.
8884         * src/flex-scanner.h: Indent nested cpp directives.
8885
8886 2012-05-21  Akim Demaille  <akim@lrde.epita.fr>
8887
8888         build: do not prototype flex-generated functions.
8889         Some versions of Flex, possibly modified by the distribution package
8890         maintainers, have incompatible signatures.  Since newer versions of
8891         Flex prototype their functions, avoid the conflicts in that case.
8892         Reported by Stefano Lattarini.
8893         <http://lists.gnu.org/archive/html/bug-bison/2012-05/msg00012.html>.
8894
8895         * src/flex-scanner.h (FLEX_VERSION_GT): New.
8896         Use it to issue prototypes for flex-generated functions only for
8897         versions up to 2.5.31, in accordance with the comment.
8898         See commit dc9701e848f27ae64b6ddcf809580998667d60f2.
8899         Use it to define yylex_destroy when needed.
8900
8901 2012-05-16  Akim Demaille  <akim@lrde.epita.fr>
8902
8903         build: fix ChangeLog generation.
8904         * Makefile.am (gen-ChangeLog): Fix for VPATH builds.
8905
8906 2012-05-14  Akim Demaille  <akim@lrde.epita.fr>
8907
8908         Bison 2.5.1_rc1.
8909         * NEWS: Update.
8910         * src/parse-gram.c, src/parse-gram.h: Regen.
8911
8912 2012-05-11  Akim Demaille  <akim@lrde.epita.fr>
8913
8914         tests: save/restore Autotest special files when checking XML support.
8915         Currently the test 248, "parse-gram.y: LALR = IELR", fails
8916         BISON_TEST_XML is set.
8917
8918         * tests/local.at (AT_BISON_CHECK_XML): Belt: Save/restore files.
8919         * tests/regression.at (parse-gram.y: LALR = IELR): Suspenders: Don't
8920         rely on expout.
8921         Each one of these changes suffices.
8922
8923 2012-05-11  Akim Demaille  <akim@lrde.epita.fr>
8924
8925         tests: AT_SAVE_SPECIAL_FILES / AT_RESTORE_SPECIAL_FILES.
8926         Some of our macros play with expout and other Autotest special files,
8927         which may break their callers (e.g., currently TESTSUITEFLAGS='248
8928         BISON_TEST_XML=1' fails).
8929
8930         There is already some support for this.  Expand it to be ready to use
8931         it elsewhere.
8932
8933         * tests/local.at (AT_RESTORE_SPECIAL_FILES, AT_SAVE_SPECIAL_FILES)
8934         (at_save_special_files, at_restore_special_files): New.
8935         (AT_BISON_CHECK_NO_XML): Use them.
8936
8937 2012-05-11  Akim Demaille  <akim@lrde.epita.fr>
8938
8939         tests: honor TESTSUITEFLAGS in all the check targets.
8940         * tests/Makefile.am (installcheck-local): Simplify.
8941         (maintainer-check-posix, maintainer-check-valgrind): Honor
8942         $(TESTSUITEFLAGS).
8943
8944 2012-05-11  Akim Demaille  <akim@lrde.epita.fr>
8945
8946         build: do not enable c++ warnings on 0 when nullptr is not supported.
8947         * configure.ac (WARN_CXXFLAGS): Enable -Wzero-as-null-pointer-constant
8948         only when nullptr is supported..
8949
8950 2012-05-11  Akim Demaille  <akim@lrde.epita.fr>
8951
8952         maint: update gnulib.
8953         * bootstrap, gnulib: Update.
8954
8955 2012-05-09  Akim Demaille  <akim@lrde.epita.fr>
8956
8957         build: config.in.h.
8958         Historically we used config.hin (where everybody else used
8959         config.h.in) to please DOS.  Now that we use gnulib, there are already
8960         tons of files with several dots, especially *.in.h.
8961
8962         * configure.ac: Rename config.hin as config.in.h.
8963
8964 2012-05-09  Akim Demaille  <akim@lrde.epita.fr>
8965
8966         build: move silent rules.
8967         * tests/Makefile.am: In the generation of the test suite.
8968
8969 2012-05-09  Akim Demaille  <demaille@gostai.com>
8970
8971         glr.c: reduce variable scopes.
8972         * data/glr.c: Where appropriate, fuse variable declarations followed
8973         by assignments by variable declarations with a value.
8974         Where appropriate, introduce new scopes to limit variable spans.
8975
8976 2012-05-08  Akim Demaille  <akim@lrde.epita.fr>
8977
8978         maint: maintainer-release-check.
8979         * tests/Makefile.am (maintainer-release-check): New.
8980         * Makefile.am (MAINTAINER_CHECKS): New.
8981         Support maintainer-release-check.
8982         * README-hacking: Document it, and syntax-check too.
8983
8984 2012-05-08  Akim Demaille  <akim@lrde.epita.fr>
8985
8986         maint: shush a syntax-check.
8987         * cfg.mk: lib/timevar is not planned to be gnulib'ed, as it comes
8988         from GCC.
8989
8990 2012-05-08  Akim Demaille  <akim@lrde.epita.fr>
8991
8992         maint: prefer "commit message" to "log entry".
8993         * README-hacking: here.
8994         Suggested by Stefano Lattarini.
8995
8996 2012-05-08  Akim Demaille  <akim@lrde.epita.fr>
8997
8998         command line: fix minor leaks.
8999         * src/getargs.c (getargs): Free pointers before allocating them new
9000         content.
9001
9002 2012-05-08  Akim Demaille  <akim@lrde.epita.fr>
9003
9004         maint: we no longer maintain the ChangeLog.
9005         * .gitattributes: No need to merge it.
9006         * README-hacking: Update release instructions.
9007
9008 2012-05-06  Akim Demaille  <akim@lrde.epita.fr>
9009
9010         maint: fix the generation of the synclines for bison's parser.
9011         * tests/bison.in: Import from master the changes that make
9012         this script generate synclines that are independant of the
9013         builddir/srcdir user's set up.
9014
9015 2012-05-06  Akim Demaille  <akim@lrde.epita.fr>
9016
9017         maint: regen.
9018         * src/parse-gram.c, src/parse-gram.h: Regen.
9019
9020 2012-05-06  Akim Demaille  <akim@lrde.epita.fr>
9021
9022         maint: import the xmemdup0 gnulib module.
9023         * bootstrap.conf: Require this module.
9024         * src/parse-gram.y: Include xmemdup0.h.
9025
9026 2012-05-06  Akim Demaille  <akim@lrde.epita.fr>
9027
9028         maint: remove left-over gnulib modules.
9029         * bootstrap.conf (gnulib_modules): Remove pipe-posix.
9030         * lib/.gitignore, m4/.gitignore: Remove files that we no longer use.
9031
9032 2012-05-06  Akim Demaille  <akim@lrde.epita.fr>
9033
9034         maint: ignore files imported by autopoint.
9035         * m4/.gitignore: here.
9036
9037 2012-05-06  Akim Demaille  <akim@lrde.epita.fr>
9038
9039         build: AC_PROG_LEX: use more readable variable names.
9040         * m4/flex.m4 (AC_PROG_LEX): Prefer LEX_IS_FLEX to FLEX.
9041         Prefer true/false to yes/no for such variables.
9042         * configure.ac: Adjust.
9043
9044 2012-05-06  Jim Meyering  <meyering@redhat.com>
9045
9046         maint: regen src/parse-gram.[ch]
9047
9048 2012-05-06  Jim Meyering  <meyering@redhat.com>
9049             Akim Demaille  <akim@lrde.epita.fr>
9050
9051         maint: simplify parse-gram.y
9052         * src/parse-gram.y (add_param): Use xmemdup0 in place of
9053         xmalloc+memcpy, and strspn in place of an open-coded loop.
9054
9055 2012-05-06  Jim Meyering  <meyering@redhat.com>
9056
9057         maint: s/strncpy/memcpy/, when equivalent
9058         * src/output.c (output_skeleton): Use memcpy, not strncpy,
9059         since the source is known to fit in the destination buffer.
9060         * src/parse-gram.y (%skeleton): Likewise.
9061
9062 2012-05-04  Akim Demaille  <akim@lrde.epita.fr>
9063
9064         glr.c: formatting changes.
9065         * data/glr.c: Fix indentation.
9066
9067 2012-05-04  Akim Demaille  <akim@lrde.epita.fr>
9068
9069         Merge remote-tracking branch 'origin/master'
9070         * origin/master:
9071           glr.c: untabify.
9072           glr.cc: untabify.
9073           glr.cc: formatting changes.
9074           glr.cc: remove unused signature.
9075           glr.cc: properly declare locations are const where appropriate.
9076           doc: fix @xref.
9077
9078 2012-05-04  Akim Demaille  <akim@lrde.epita.fr>
9079
9080         glr.c: untabify.
9081         * data/glr.c: here.
9082
9083 2012-05-04  Akim Demaille  <akim@lrde.epita.fr>
9084
9085         glr.cc: untabify.
9086         * data/glr.cc: here.
9087
9088 2012-05-04  Akim Demaille  <akim@lrde.epita.fr>
9089
9090         glr.cc: formatting changes.
9091         * data/glr.cc: Fit in 80 columns.
9092
9093 2012-05-04  Akim Demaille  <akim@lrde.epita.fr>
9094
9095         glr.cc: remove unused signature.
9096         * data/glr.cc (yydestruct_): Not used, remove.
9097         It is yydestruct which is used.
9098
9099 2012-05-04  Akim Demaille  <akim@lrde.epita.fr>
9100
9101         glr.cc: properly declare locations are const where appropriate.
9102         * data/glr.cc (yyerror): The location is const.
9103
9104 2012-05-04  Akim Demaille  <akim@lrde.epita.fr>
9105
9106         doc: fix @xref.
9107         * doc/bison.texinfo: here.
9108
9109 2012-05-04  Akim Demaille  <akim@lrde.epita.fr>
9110
9111         Merge remote-tracking branch 'origin/maint'
9112         * origin/maint: (22 commits)
9113           tests: ignore code coverage/profiling failure messages
9114           doc: fix some invalid @ref.
9115           build: fix previous commit.
9116           install-pdf: fix.
9117           NEWS: Update.
9118           %printer: support both yyo and yyoutput.
9119           doc: mfcalc: demonstrate %printer.
9120           tests: style changes.
9121           build: require Flex.
9122           build: flex.m4: check for Flex.
9123           build: flex.m4: quote properly.
9124           build: flex.m4.
9125           build: autoconf: update.
9126           glr: eliminate last bits of unwanted locations.
9127           NEWS: 2.6 will drop K&R.
9128           TODO: remove dead items.
9129           TODO: import from master.
9130           gnulib: update.
9131           maint: update NEWS.
9132           doc: fix index.
9133           doc: fix documentation of YYERROR.
9134           c++: more YY_NULL
9135
9136 2012-05-02  Akim Demaille  <akim@lrde.epita.fr>
9137
9138         tests: ignore code coverage/profiling failure messages
9139         The Hydra buildfarm provides code coverage analysis.  For some reason,
9140         in some test cases, code coverage data seem to be incompatible, and
9141         generate error messages at parser run-time.  Ignore these messages so
9142         that (i) these tests do pass, (ii) coverage results be provided by
9143         Hydra.
9144
9145         * tests/local.at (AT_PARSER_CHECK): Ignore messages for failed merges
9146         of code coverage/profiling results.
9147
9148 2012-04-16  Akim Demaille  <akim@lrde.epita.fr>
9149
9150         doc: fix some invalid @ref.
9151         * doc/bison.texinfo: Fix incorrect @ref uses.
9152
9153 2012-04-16  Akim Demaille  <akim@lrde.epita.fr>
9154
9155         build: fix previous commit.
9156         * bootstrap: Update from gnulib.
9157
9158 2012-04-16  Akim Demaille  <akim@lrde.epita.fr>
9159
9160         install-pdf: fix.
9161         * gnulib: Fix install-pdf in po/ and runtime-po/.
9162         Reported by Hans Aberg.
9163         Fixed by Joel E. Denny.
9164         http://lists.gnu.org/archive/html/bug-bison/2011-05/msg00008.html
9165
9166 2012-04-16  Akim Demaille  <akim@lrde.epita.fr>
9167
9168         NEWS: Update.
9169         * NEWS: Spell check.
9170         (%printer): is now documented.
9171
9172 2012-04-16  Akim Demaille  <akim@lrde.epita.fr>
9173
9174         %printer: support both yyo and yyoutput.
9175         lalr1.cc used to support yyo, but not yyoutput.  Support both,
9176         but document only yyoutput (at least until there is some consensus
9177         on this).
9178
9179         * data/c.m4 (yy_symbol_value_print): Also support yyo.
9180         * data/glr.cc  (yy_symbol_value_print_): Support both yyo and yyoutput.
9181         * data/lalr1.cc: Also support yyoutput.
9182         * doc/bison.texinfo: Explicitly use yyoutput in the examples.
9183         * examples/mfcalc/mfcalc.test: Test the -p option.
9184
9185 2012-04-16  Akim Demaille  <akim@lrde.epita.fr>
9186
9187         doc: mfcalc: demonstrate %printer.
9188         * doc/bison.texinfo (Printer Decl): New.
9189         Number mfcalc.y snippets so that they are output in
9190         the proper order.
9191         (The mfcalc Main): Use yydebug.
9192         (Debugging): Simplify the text.
9193         (Enabling Traces, Mfcalc Traces, The YYPRINT Macro): New.
9194         (Table of Symbols): Document YYPRINT and YYFPRINTF.
9195
9196 2012-04-16  Akim Demaille  <akim@lrde.epita.fr>
9197
9198         tests: style changes.
9199         * tests/input.at: Use "print" in %printer instead of "destroy".
9200         It is unused, so we don't care, yet it is less surprising.
9201         * tests/actions.at: Comment changes.
9202
9203 2012-04-16  Akim Demaille  <akim@lrde.epita.fr>
9204
9205         %printer: support both yyo and yyoutput.
9206         lalr1.cc used to support yyo, but not yyoutput.  Support both,
9207         but document only yyoutput (at least until there is some consensus
9208         on this).
9209
9210         * data/c.m4 (yy_symbol_value_print): Also support yyo.
9211         * data/glr.cc  (yy_symbol_value_print_): Support both yyo and yyoutput.
9212         * data/lalr1.cc: Also support yyoutput.
9213         * doc/bison.texinfo: Explicitly use yyoutput in the examples.
9214         * examples/mfcalc/mfcalc.test: Test the -p option.
9215
9216 2012-04-16  Akim Demaille  <akim@lrde.epita.fr>
9217
9218         doc: mfcalc: demonstrate %printer.
9219         * doc/bison.texinfo (Printer Decl): New.
9220         Number mfcalc.y snippets so that they are output in
9221         the proper order.
9222         (The mfcalc Main): Use yydebug.
9223         (Debugging): Simplify the text.
9224         (Enabling Traces, Mfcalc Traces, The YYPRINT Macro): New.
9225         (Table of Symbols): Document YYPRINT and YYFPRINTF.
9226
9227 2012-04-16  Akim Demaille  <akim@lrde.epita.fr>
9228
9229         tests: style changes.
9230         * tests/input.at: Use "print" in %printer instead of "destroy".
9231         It is unused, so we don't care, yet it is less surprising.
9232         * tests/actions.at: Comment changes.
9233
9234 2012-04-10  Akim Demaille  <akim@lrde.epita.fr>
9235
9236         build: require Flex.
9237         * configure.ac: Require Flex.
9238
9239 2012-04-10  Akim Demaille  <akim@lrde.epita.fr>
9240
9241         build: flex.m4: check for Flex.
9242         * m4/flex.m4 (_AC_PROG_LEX_YYTEXT_DECL): Check that $LEX
9243         supports some of the Flex options, and exclusive start conditions.
9244         Define FLEX to 'yes'/'', as AC_PROG_CC does for GCC.
9245
9246 2012-04-10  Akim Demaille  <akim@lrde.epita.fr>
9247
9248         build: flex.m4: quote properly.
9249         * m4/flex.m4: Use quotes more systematically.
9250
9251 2012-04-10  Akim Demaille  <akim@lrde.epita.fr>
9252
9253         build: flex.m4.
9254         * m4/flex.m4: New.
9255         An exact copy of what is in Autoconf currently.
9256
9257 2012-04-10  Akim Demaille  <akim@lrde.epita.fr>
9258
9259         build: autoconf: update.
9260         * submodules/autoconf: Update.
9261         There are no changes in data/m4sugar/foreach.m4, and the
9262         changes in data/m4sugar/m4sugar.m4 are minor.
9263
9264 2012-04-10  Akim Demaille  <akim@lrde.epita.fr>
9265
9266         glr: eliminate last bits of unwanted locations.
9267         * data/glr.c (YYLTYPE): Do not define when locations are
9268         not demanded.
9269         Adjust all dependencies.
9270
9271 2012-04-10  Akim Demaille  <akim@lrde.epita.fr>
9272
9273         NEWS: 2.6 will drop K&R.
9274         * NEWS: here.
9275         (glr.c): Fix a spello.
9276
9277 2012-04-09  Akim Demaille  <akim@lrde.epita.fr>
9278
9279         TODO: remove dead items.
9280         * TODO (Documentation, %printer, Java): Remove, already done (or just
9281         waiting for approval).
9282         (Fortran, BTYacc): Remove, there does not seem to be demand.
9283
9284 2012-04-09  Akim Demaille  <akim@lrde.epita.fr>
9285
9286         TODO: import from master.
9287         * TODO: Copy the current version.
9288
9289 2012-04-08  Akim Demaille  <akim@lrde.epita.fr>
9290
9291         tests: fix bison wrapper.
9292         * tests/bison.in (PERL): Fix.
9293
9294 2012-04-08  Akim Demaille  <akim@lrde.epita.fr>
9295
9296         doc: fix some invalid @ref.
9297         * doc/bison.texinfo: Fix incorrect @ref uses.
9298
9299 2012-04-08  Akim Demaille  <akim@lrde.epita.fr>
9300
9301         build: extexi: support out-of-order blocks.
9302         * examples/extexi (%file_output): Remove.
9303         (&process): Accept "FILE: BLOCK-NUM" requests.
9304
9305 2012-04-08  Akim Demaille  <akim@lrde.epita.fr>
9306
9307         build: look for Perl in configure.
9308         Bison uses "/usr/bin/perl" or "perl" in several places, and it does
9309         not appear to be a problem.  But, at least to make it simpler to
9310         change PERL on the make command line, check for perl in configure.
9311
9312         * configure.ac (PERL): New.
9313         * doc/Doxyfile.in, doc/local.mk, examples/local.mk,
9314         * tests/bison.in: Use it.
9315
9316 2012-04-08  Akim Demaille  <akim@lrde.epita.fr>
9317
9318         maint: rewrite extexi in Perl.
9319         * examples/extexi: Rewrite in Perl.
9320         * examples/local.mk (extract): Adjust.
9321
9322 2012-04-07  Akim Demaille  <akim@lrde.epita.fr>
9323
9324         build: simplify clean.
9325         * doc/local.mk (CLEANFILES): Since the previous commit,
9326         there a no longer such files.
9327         * Makefile.in (CLEANFILES): Initialize here.
9328
9329 2012-04-07  Akim Demaille  <akim@lrde.epita.fr>
9330
9331         gnulib: update.
9332         * bootstrap.conf (bootstrap_sync): True again.
9333         It was disabled while waiting for changes to be integrated
9334         in gnulib's bootstrap, which was done long ago.
9335         * bootstrap, gnulib: Update.
9336
9337 2012-04-04  Akim Demaille  <akim@lrde.epita.fr>
9338
9339         maint: update NEWS.
9340         * NEWS: Fix entry about __attribute__.
9341         Reorder by "decreasing" order of importance.
9342
9343 2012-04-04  Akim Demaille  <akim@lrde.epita.fr>
9344
9345         doc: fix index.
9346         http://lists.gnu.org/archive/html/bison-patches/2012-04/msg00006.html
9347
9348         * doc/bison.texinfo: Avoid using @def* variant with more
9349         than the defined entity as main entity, as it results in
9350         an incorrect index.  For instance, don't document
9351         {return YYERROR;}, which results in a single index entry
9352         "return YYERROR;", but rather as typed function whose
9353         return type is "type", and whose argument list is ";".
9354
9355 2012-04-04  Akim Demaille  <akim@lrde.epita.fr>
9356
9357         doc: fix documentation of YYERROR.
9358         * doc/bison.texinfo (Table of Symbols): Fix the documentation
9359         of YYERROR by copying that from "Action Features".
9360
9361 2012-04-01  Akim Demaille  <akim@lrde.epita.fr>
9362
9363         build: fix distcheck issues.
9364         For some reason it seems that texi2dvi -o no longer forces --clean
9365         mode, so we have stray TeX compilation files staying in top_builddir
9366         since TeX is run from there.
9367
9368         While at it, upgrade the generation of the (completely obsolete)
9369         reference card.  Target PDF.
9370
9371         * doc/local.mk (TEXI2DVI): Pass --build-dir.
9372         (CLEANDIRS): More accurate.
9373         (doc/refcard.dvi): Replace with...
9374         (doc/refcard.pdf): this.
9375         Adjust dependencies.
9376
9377 2012-04-01  Akim Demaille  <akim@lrde.epita.fr>
9378
9379         build: don't rely on $< in non-pattern rules.
9380         * doc/local.mk, tests/local.mk: here.
9381         Reported by Stefano Lattarini.
9382
9383 2012-04-01  Akim Demaille  <akim@lrde.epita.fr>
9384
9385         doc: upgrade Doxyfile.
9386         * doc/Doxyfile.in: Run doxygen -u.
9387         Prompted by Tim Landscheidt.
9388
9389 2012-04-01  Akim Demaille  <akim@lrde.epita.fr>
9390
9391         doc: help Doxygen find our files.
9392         * doc/Doxyfile.in (INCLUDE_PATH): here.
9393
9394 2012-04-01  Tim Landscheidt  <tim@tim-landscheidt.de>
9395
9396         Fix Doxygen generation and clean-up.
9397         * doc/Doxyfile.in: Amend OUTPUT_DIRECTORY.
9398         * doc/local.mk (html-local): Amend working directory.
9399         (CLEANDIRS): Fix "html", remove "latex".
9400
9401 2012-04-01  Tim Landscheidt  <tim@tim-landscheidt.de>
9402
9403         Fix Doxygen comment.
9404         * src/InadequacyList.h: s#</t>#</tt>#.
9405
9406 2012-04-01  Akim Demaille  <akim@lrde.epita.fr>
9407
9408         c++: more YY_NULL
9409         Caught by maintainer-check-g++.
9410         * data/glr.c, data/lalr1.cc, data/yacc.c, tests/cxx-type.at,
9411         * tests/glr-regression.at, tests/push.at:
9412         When simple to do, avoid expliciting the null ptr.
9413         Otherwise use YY_NULL.
9414
9415 2012-04-01  Akim Demaille  <akim@lrde.epita.fr>
9416
9417         c++: more YY_NULL
9418         Caught by maintainer-check-g++.
9419         * data/glr.c, data/lalr1.cc, data/yacc.c, tests/cxx-type.at,
9420         * tests/glr-regression.at, tests/push.at:
9421         When simple to do, avoid expliciting the null ptr.
9422         Otherwise use YY_NULL.
9423
9424 2012-04-01  Akim Demaille  <akim@lrde.epita.fr>
9425
9426         Merge remote-tracking branch 'origin/maint'
9427         * origin/maint:
9428           bump to 2012 in skeletons.
9429           build: remove ancient Autoconf tests.
9430           doc: c++: complete the location documentation.
9431           c++: locations: provide convenience constructors.
9432           c++: locations: remove useless "inline".
9433           glr: do not use locations when they are not requested
9434           c++: use nullptr for C++11.
9435           build: simplify and improve the compiler warnings for tests.
9436           gnulib: update.
9437           maint: formatting changes.
9438           NEWS: update.
9439           Java: Fix syntax error handling without error token.
9440           tests: beware of -pedantic on large #line numbers.
9441           tests: when using the C++ compiler, use its flags too.
9442
9443 2012-04-01  Akim Demaille  <akim@lrde.epita.fr>
9444
9445         bump to 2012 in skeletons.
9446         * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
9447         * data/location.cc, data/yacc.c: Bump copyright year ranges.
9448
9449 2012-04-01  Akim Demaille  <akim@lrde.epita.fr>
9450
9451         build: remove ancient Autoconf tests.
9452         lib/subpipe.c was removed in 47fa574761319b0a422691223c9b8a9a72f36aa2.
9453
9454         * m4/subpipe.m4: Remove.
9455         * configure.ac (BISON_PREREQ_SUBPIPE): Remove.
9456
9457 2012-03-31  Akim Demaille  <akim@lrde.epita.fr>
9458
9459         doc: c++: complete the location documentation.
9460         * data/location.cc (position::initialize, location::initialize):
9461         Also accept line and column, with default values.
9462         * doc/bison.texinfo (C++ position, C++ location): New nodes.
9463         Describe more thoroughly these classes.
9464         Fix several Texinfo misuses.
9465
9466 2012-03-31  Akim Demaille  <demaille@gostai.com>
9467
9468         c++: locations: provide convenience constructors.
9469         * data/location.cc (position::position): Accept file, line and
9470         column as arguments with default values.
9471         Always qualify initial line and column literals as unsigned.
9472         (location::location): Provide convenience constructors.
9473
9474 2012-03-31  Akim Demaille  <akim@lrde.epita.fr>
9475
9476         c++: locations: remove useless "inline".
9477         * data/location.cc: "inline" is implicit when defining
9478         methods in the class definition.
9479
9480 2012-03-31  Akim Demaille  <akim@lrde.epita.fr>
9481
9482         glr: do not use locations when they are not requested
9483         When the test suite runs with -O2 and warnings enabled, G++
9484         complains of locations being used, but not initialized.
9485         The simplest is to not use locations.
9486
9487         * data/glr.c (b4_locuser_formals, b4_locuser_args): New.
9488         Use them when locations should not be used.
9489         Use b4_locations_if where appropriate.
9490         (yyuserAction): Modify the order to the arguments to make
9491         it more alike the other routines, and to make use of
9492         b4_locuser_args simpler.
9493
9494 2012-03-31  Akim Demaille  <akim@lrde.epita.fr>
9495
9496         c++: use nullptr for C++11.
9497         C++11 introduces "nullptr" which plays the role of C's NULL, in
9498         replacement of "0".  Fix the C++ skeletons to avoid warnings about
9499         uses of "0" in place of "nullptr", and improve C skeletons to also use
9500         this "nullptr" when compiled with a C++11 compiler.
9501
9502         * configure.ac: More C++ warnings.
9503         * NEWS (2.5.1): Document this.
9504         * data/c++.m4, data/c.m4 (b4_null_define): New.
9505         (b4_null): Use YY_NULL instead of 0.
9506         * data/glr.c, data/lalr1.cc, data/location.cc, data/yacc.c:
9507         Call b4_null_define/b4_null where appropriate.
9508         Use YY_NULL instead of NULL.
9509         * data/location.cc (initialize): Accept a default argument,
9510         YY_NULL.
9511         * tests/actions.at, tests/calc.at: Adjust.
9512
9513         * data/glr.c, lib/libiberty.h, src/system.h (__attribute__):
9514         Do not disable it when __STRICT_ANSI__ is defined, as, for
9515         instance, it disables the __attribute__((unused)) which
9516         protects us from some compiler warnings.
9517         This was already done elsewhere in Bison, in 2001, see
9518         4a0d89369599a2cea01f4fbdf791f426a02cb5a3.
9519         * tests/regression.at: Adjust output.
9520
9521 2012-03-30  Akim Demaille  <akim@lrde.epita.fr>
9522
9523         build: simplify and improve the compiler warnings for tests.
9524         * configure.ac (warn_common, warn_c, warn_cxx): New.
9525         Use them to compute independently the options supported
9526         by the C and C++ compilers.
9527         Don't AC_SUBST the variables passed to gl_WARN_ADD: it
9528         does it for us.
9529         (WARN_CFLAGS_TEST, WARN_CXXFLAGS_TEST): Don't aggregate
9530         $WARN_CFLAGS and $WARN_CXXFLAGS in them now, leave it
9531         to atlocal.in.
9532         (O0CFLAGS, O0CXXFLAGS): Move their definition to...
9533         * tests/atlocal.in: here.
9534         Be more systematic between C and C++.
9535         Reorder to factor between variables.
9536         Propagate all of the variables when --compile-c-with-cxx.
9537
9538 2012-03-30  Akim Demaille  <akim@lrde.epita.fr>
9539
9540         gnulib: update.
9541
9542 2012-03-30  Akim Demaille  <akim@lrde.epita.fr>
9543
9544         maint: formatting changes.
9545         * src/system.h: Indent CPP directives using cppi.
9546
9547 2012-03-27  Akim Demaille  <akim@lrde.epita.fr>
9548
9549         NEWS: update.
9550         * NEWS: Java fixes, more about the doc changes, liby issues.
9551
9552 2012-03-27  Tim Landscheidt  <tim@tim-landscheidt.de>
9553
9554         Java: Fix syntax error handling without error token.
9555         * data/lalr1.java (YYParser::parse): Here.
9556         * tests/java.at: Add test case.
9557
9558 2012-03-24  Akim Demaille  <akim@lrde.epita.fr>
9559
9560         tests: beware of -pedantic on large #line numbers.
9561         * tests/local.at (AT_TEST_TABLES_AND_PARSE): Don't pass -pedantic
9562         when compiling large canonical-LR parsers.
9563         Reported by Tys Lefering.
9564         http://lists.gnu.org/archive/html/bug-bison/2012-03/msg00025.html
9565
9566 2012-03-24  Akim Demaille  <akim@lrde.epita.fr>
9567
9568         tests: when using the C++ compiler, use its flags too.
9569         * tests/local.at: Go for colors.
9570         (--compile-c-with-cxx): New option.
9571         We used to pass "CC=$CXX" as command line argument,
9572         but it was not possible to adjust CFLAGS accordingly
9573         in atlocal, since it is loaded before assignments on
9574         the command line are honored (so that the command line
9575         takes precedence).
9576         * tests/atlocal.in: Implement it.
9577         * tests/local.mk: Use it.
9578
9579 2012-03-24  Akim Demaille  <akim@lrde.epita.fr>
9580
9581         tests: style changes in the Makefile.
9582         * tests/local.mk: Prefer passing variable assignment by
9583         the command line, instead of the environment, so that it
9584         is reported in the logs.
9585         Prefer single quotes for shell literal strings.
9586
9587 2012-03-24  Akim Demaille  <akim@lrde.epita.fr>
9588
9589         tests: beware of -pedantic on large #line numbers.
9590         * tests/local.at (AT_TEST_TABLES_AND_PARSE): Don't pass -pedantic
9591         when compiling large canonical-LR parsers.
9592         Reported by Tys Lefering.
9593         http://lists.gnu.org/archive/html/bug-bison/2012-03/msg00025.html
9594
9595 2012-03-24  Akim Demaille  <akim@lrde.epita.fr>
9596
9597         tests: when using the C++ compiler, use its flags too.
9598         * tests/local.at: Go for colors.
9599         (--compile-c-with-cxx): New option.
9600         We used to pass "CC=$CXX" as command line argument,
9601         but it was not possible to adjust CFLAGS accordingly
9602         in atlocal, since it is loaded before assignments on
9603         the command line are honored (so that the command line
9604         takes precedence).
9605         * tests/atlocal.in: Implement it.
9606         * tests/local.mk: Use it.
9607
9608 2012-03-24  Akim Demaille  <akim@lrde.epita.fr>
9609
9610         tests: fix dependencies.
9611         * tests/local.mk (check_SCRIPTS): Add atlocal and atconfig so
9612         that they are properly updated before running tests.
9613         (RUN_TESTSUITE_deps): New.
9614         Use it to factor the dependencies of "*-check" targets,
9615         especially those that don't bounce to the regular
9616         "check-local" target, since then they don't benefit from the
9617         proper dependencies (such as atlocal).
9618
9619 2012-03-19  Akim Demaille  <akim@lrde.epita.fr>
9620
9621         Merge remote-tracking branch 'fsf/maint'
9622         * fsf/maint: (404 commits)
9623           doc: update the --verbose report format.
9624           doc: spell check.
9625           doc: stmt, not stmnt.
9626           doc: save width.
9627           doc: reformat grammar snippets.
9628           doc: use only @example, not @smallexample.
9629           doc: style changes.
9630           doc: minor fixes to "Understanding" section
9631           tests: minor fixes/simplifications
9632           tests: be robust to quote style.
9633           maint: update gnulib.
9634           tests: be robust to POSIXLY_CORRECT being defined.
9635           doc: fix environment issues.
9636           regen.
9637           tests: fix regressions.
9638           glr: fix ambiguity reports.
9639           doc: stylistic improvements.
9640           maint: address sc_prohibit_doubled_word.
9641           maint: address sc_prohibit_always-defined_macros.
9642           maint: address sc_bindtextdomain, sc_program_name and sc_prohibit_HAVE_MBRTOWC.
9643           ...
9644
9645 2012-03-19  Akim Demaille  <akim@lrde.epita.fr>
9646
9647         doc: spell fix.
9648         * doc/bison.texinfo: here.
9649         Reported by Tim Landscheidt.
9650
9651 2012-03-19  Akim Demaille  <akim@lrde.epita.fr>
9652
9653         doc: update the --verbose report format.
9654         * doc/bison.texinfo (Understanding): Adjust to match the
9655         current format.
9656
9657 2012-03-19  Akim Demaille  <akim@lrde.epita.fr>
9658
9659         doc: spell check.
9660         * doc/bison.texinfo: here.
9661
9662 2012-03-19  Akim Demaille  <akim@lrde.epita.fr>
9663
9664         doc: stmt, not stmnt.
9665         * doc/bison.texinfo: s/stmnt/stmt/g.  This is a
9666         much more common abbreviation for "statement".
9667
9668 2012-03-19  Akim Demaille  <akim@lrde.epita.fr>
9669
9670         doc: save width.
9671         * doc/bison.texinfo (Language and Grammar): Use the same
9672         layout for an example in all the versions, i.e., keep
9673         as general case what used to be used only for Info.
9674
9675 2012-03-19  Akim Demaille  <akim@lrde.epita.fr>
9676
9677         doc: reformat grammar snippets.
9678         * doc/bison.texinfo: Convert the grammar examples to
9679         use a narrower style.  This helps fitting into the
9680         @smallbook constraints.
9681         http://lists.gnu.org/archive/html/bison-patches/2012-03/msg00011.html
9682
9683 2012-03-19  Akim Demaille  <akim@lrde.epita.fr>
9684
9685         doc: use only @example, not @smallexample.
9686         * doc/bison.texinfo: Convert all @smallexamples into @examples.
9687         Adjust layout where needed.
9688
9689 2012-03-19  Akim Demaille  <akim@lrde.epita.fr>
9690
9691         doc: style changes.
9692         * doc/bison.texinfo: Avoid line width issues with TeX.
9693         Upgrade ancient messages.
9694         Move some comments to better looking places.
9695         Add more @group.
9696         (Mfcalc Symbol Table): Reduce variable scopes.
9697         Prefer size_t for sizes.
9698         Prefer declarations with an initial value.
9699         Fix a @group environment.
9700
9701 2012-03-19  Paul Eggert  <eggert@cs.ucla.edu>
9702
9703         doc: minor fixes to "Understanding" section
9704         * doc/bison.texinfo (Understanding): Minor wording fixes and
9705         improvements.  Fixes problems reported in
9706         <https://savannah.gnu.org/patch/?4306>.
9707
9708 2012-03-19  Akim Demaille  <akim@lrde.epita.fr>
9709
9710         doc: update the --verbose report format.
9711         * doc/bison.texinfo (Understanding): Adjust to match the
9712         current format.
9713
9714 2012-03-19  Akim Demaille  <akim@lrde.epita.fr>
9715
9716         doc: spell check.
9717         * doc/bison.texinfo: here.
9718
9719 2012-03-19  Akim Demaille  <akim@lrde.epita.fr>
9720
9721         doc: stmt, not stmnt.
9722         * doc/bison.texinfo: s/stmnt/stmt/g.  This is a
9723         much more common abbreviation for "statement".
9724
9725 2012-03-19  Akim Demaille  <akim@lrde.epita.fr>
9726
9727         doc: save width.
9728         * doc/bison.texinfo (Language and Grammar): Use the same
9729         layout for an example in all the versions, i.e., keep
9730         as general case what used to be used only for Info.
9731
9732 2012-03-19  Akim Demaille  <akim@lrde.epita.fr>
9733
9734         doc: reformat grammar snippets.
9735         * doc/bison.texinfo: Convert the grammar examples to
9736         use a narrower style.  This helps fitting into the
9737         @smallbook constraints.
9738         http://lists.gnu.org/archive/html/bison-patches/2012-03/msg00011.html
9739
9740 2012-03-19  Akim Demaille  <akim@lrde.epita.fr>
9741
9742         doc: use only @example, not @smallexample.
9743         * doc/bison.texinfo: Convert all @smallexamples into @examples.
9744         Adjust layout where needed.
9745
9746 2012-03-19  Akim Demaille  <akim@lrde.epita.fr>
9747
9748         doc: style changes.
9749         * doc/bison.texinfo: Avoid line width issues with TeX.
9750         Upgrade ancient messages.
9751         Move some comments to better looking places.
9752         Add more @group.
9753         (Mfcalc Symbol Table): Reduce variable scopes.
9754         Prefer size_t for sizes.
9755         Prefer declarations with an initial value.
9756         Fix a @group environment.
9757
9758 2012-03-19  Akim Demaille  <akim@lrde.epita.fr>
9759
9760         c.m4: better newline control with b4_parse_param_use.
9761         * data/c.m4: Use m4_ifvaln instead of m4_ifval where
9762         applicable.
9763         (b4_parse_param_use): Switch order between two nested
9764         "if"s to avoid useless empty lines.
9765         Adjust callers to avoid useless lines.
9766
9767 2012-03-19  Akim Demaille  <akim@lrde.epita.fr>
9768
9769         glr.c: remove (broken) support for YYPRINT.
9770         YYPRINT uses yytoknum which glr does not define.  Since YYPRINT
9771         is considered obsolete, and did not work, don't fix its support,
9772         remove it from glr.c.
9773
9774         * data/c.m4 (yy_symbol_value_print): Use YYPRINT only for yacc.c.
9775         * TODO: Done.
9776
9777 2012-03-17  Paul Eggert  <eggert@cs.ucla.edu>
9778
9779         doc: minor fixes to "Understanding" section
9780         * doc/bison.texinfo (Understanding): Minor wording fixes and
9781         improvements.  Fixes problems reported in
9782         <https://savannah.gnu.org/patch/?4306>.
9783
9784 2012-03-15  Akim Demaille  <akim@lrde.epita.fr>
9785
9786         TODO: update.
9787
9788 2012-03-15  Akim Demaille  <akim@lrde.epita.fr>
9789
9790         gnulib: update.
9791
9792 2012-03-13  Akim Demaille  <demaille@gostai.com>
9793
9794         tests: minor fixes/simplifications
9795         * tests/local.at (AT_BISON_CHECK_NO_XML): Simplify sed programs,
9796         quotation, and default value assignments.
9797         Ensure a proper value to the numeric variables.
9798         Reported by Lie Yan.
9799         http://lists.gnu.org/archive/html/bug-bison/2012-03/msg00000.html
9800
9801 2012-03-13  Akim Demaille  <akim@lrde.epita.fr>
9802
9803         maint: fix distcheck.
9804         * examples/local.mk (MAINTAINERCLEANFILES): Complete, and rename as...
9805         (CLEANFILES): this,
9806         * examples/calc++/local.mk, examples/mfcalc/local.mk,
9807         * examples/rpcalc/local.mk (CLEANFILES): Add the generated files.
9808
9809 2012-03-13  Akim Demaille  <demaille@gostai.com>
9810
9811         tests: minor fixes/simplifications
9812         * tests/local.at (AT_BISON_CHECK_NO_XML): Simplify sed programs,
9813         quotation, and default value assignments.
9814         Ensure a proper value to the numeric variables.
9815         Reported by Lie Yan.
9816         http://lists.gnu.org/archive/html/bug-bison/2012-03/msg00000.html
9817
9818 2012-03-09  Akim Demaille  <demaille@gostai.com>
9819
9820         tests: be robust to POSIXLY_CORRECT being defined.
9821         * tests/local.at (AT_BISON_CHECK_NO_XML): Check if
9822         POSIXLY_CORRECT is defined, not if it is defined to 1.
9823         Reported by Lie Yan.
9824         http://lists.gnu.org/archive/html/bug-bison/2012-03/msg00000.html
9825
9826 2012-03-09  Akim Demaille  <demaille@gostai.com>
9827
9828         tests: be robust to quote style.
9829         See <http://lists.gnu.org/archive/html/bug-bison/2012-01/msg00120.html>.
9830
9831         * src/main.c (main): Define the quoting style we use.
9832         * tests/atlocal.in: Use ASCII style quotes during the tests.
9833
9834 2012-03-09  Akim Demaille  <demaille@gostai.com>
9835
9836         maint: update gnulib.
9837         * gnulib: update.
9838         * src/scan-gram.l: Don't use the (former version of) STREQ.
9839
9840 2012-03-09  Akim Demaille  <demaille@gostai.com>
9841
9842         tests: remove quote magic from the bison test wrapper.
9843         Basically, revert 4c4d35394d1bdb4dc3392482ab002bc111a3378f.
9844
9845         * tests/bison.in: Leave bison's stderr as is.
9846
9847 2012-03-09  Akim Demaille  <demaille@gostai.com>
9848
9849         tests: be robust to quote style.
9850         See <http://lists.gnu.org/archive/html/bug-bison/2012-01/msg00120.html>.
9851
9852         * src/main.c (main): Define the quoting style we use.
9853         * tests/atlocal.in: Use ASCII style quotes during the tests.
9854
9855 2012-03-09  Akim Demaille  <demaille@gostai.com>
9856
9857         avoid direct strncmp calls.
9858         Before this change, bison would accept either .tab and _tab equivalently,
9859         whatever the current platform.  Besides, it was not obeying everywhere
9860         to the possible definition of TAB_EXT to something else than .tab.
9861
9862         For consistency, handle only TAB_EXT (".tab" on non DJGPP platforms).
9863         Support for "_tab" is neither documented, nor tested.
9864
9865         * src/system.h (STRNCMP_LIT): New.
9866         From Jim Meyering.
9867         (STRPREFIX_LIT): New.
9868         * src/files.c, src/getargs.c: Use it.
9869
9870 2012-03-06  Akim Demaille  <demaille@gostai.com>
9871
9872         tests: be robust to POSIXLY_CORRECT being defined.
9873         * tests/local.at (AT_BISON_CHECK_NO_XML): Check if
9874         POSIXLY_CORRECT is defined, not if it is defined to 1.
9875         Reported by Lie Yan.
9876         http://lists.gnu.org/archive/html/bug-bison/2012-03/msg00000.html
9877
9878 2012-02-24  Akim Demaille  <demaille@gostai.com>
9879
9880         build: comment changes.
9881         * Makefile.am, examples/calc++/local.mk, examples/local.mk,
9882         * examples/mfcalc/local.mk, examples/rpcalc/local.mk,
9883         * lib/local.mk, src/local.mk, tests/local.mk:
9884         Make the copyright licenses more uniform.
9885
9886 2012-02-24  Akim Demaille  <demaille@gostai.com>
9887
9888         build: fix more example extraction issues.
9889         * Makefile.am (dist_TESTS): New.
9890         (TESTS, EXTRA_DIST): Run and ship them.
9891         * examples/calc++/local.mk: examples/calc++/calc++.stamp no longer
9892                 exists, don't try to ship it.
9893         (.yy.stamp): New recipe.
9894         Use it.
9895         * examples/calc++/local.mk, examples/mfcalc/local.mk,
9896         * examples/rpcalc/local.mk:
9897         Don't ship the sources.
9898         Adjust the CPPFLAGS: there is nothing left in srcdir.
9899         (MAINTAINERCLEANFILES): Remove, now we are in builddir.
9900         (TESTS): Rename as...
9901         (dist_TESTS): this.
9902
9903 2012-02-24  Akim Demaille  <demaille@gostai.com>
9904
9905         maint: fix example extraction issues.
9906         calc++: don't rely on Automake to compile a C++ parser.
9907
9908         Basically, revert commit 609b3d8096fb0cc1fa4d908b6e1a860ced260bda,
9909         Automake 1.11.3 is not safe enough for C++ parser.
9910
9911         * examples/calc++/calc++-parser.hh: Remove.
9912         * examples/calc++/local.mk (examples/calc++/calc++-parser.stamp):
9913         New.
9914
9915         examples: factor the extractions into a single step
9916
9917         extexi had to be run in the extraction directory.  Now, it can be
9918         given the files with expected output directory.  This allows to
9919         use $(*_extracted) variables (before we had to list again their
9920         members, but limited to their base names).  In turn, this also
9921         allows fusing the extraction recipes into a single one.
9922
9923         Also, it is currently too hard (or requires too much duplication,
9924         since Make wants all the occurrences of the files to be prefixed with
9925         $(srcdir)/, which is something Automake cannot support for *_SOURCES)
9926         to work in the source tree.  So extract, and compile scanners and parsers
9927         in the build tree.
9928
9929         * examples/extexi (basename): New.
9930         (BEGIN): Now "file_wanted" maps base name to extracted file name.
9931         * examples/calc++/local.mk, examples/mfcalc/local.mk,
9932         * examples/rpcalc/local.mk: Fuse extraction rules into...
9933         * examples/local.mk: Here.
9934         (extract, extracted): New.
9935
9936 2012-02-23  Akim Demaille  <demaille@gostai.com>
9937
9938         maint: use STREQ/STRNEQ.
9939         * doc/bison.texinfo: Space change.
9940         * src/system.h (STREQ, STRNEQ): New.
9941         * src/files.c, src/ielr.c, src/lalr.c, src/muscle-tab.c,
9942         * src/output.c, src/print.c, src/print_graph.c,
9943         * src/reader.c, src/scan-skel.l, src/tables.c,
9944         * src/uniqstr.c:
9945         Use them.
9946         * src/scan-gram.l: Do not use streq.h, use system.h's STREQ.
9947         * cfg.mk: The documentation is an exception.
9948
9949 2012-02-23  Akim Demaille  <demaille@gostai.com>
9950
9951         doc: fix environment issues.
9952         * doc/bison.texinfo: Do not use @verbatim, in particular when
9953         we use @group inside.
9954         Use @quotation instead of @display for frequently asked questions,
9955         it looks much nicer.
9956
9957 2012-02-23  Akim Demaille  <demaille@gostai.com>
9958
9959         doc: fix environment issues.
9960         * doc/bison.texinfo: Do not use @verbatim, in particular when
9961         we use @group inside.
9962         Use @quotation instead of @display for frequently asked questions,
9963         it looks much nicer.
9964
9965 2012-02-23  Akim Demaille  <demaille@gostai.com>
9966
9967         regen.
9968         * src/parse-gram.h, src/parse-gram.c: regen.
9969
9970 2012-02-23  Akim Demaille  <demaille@gostai.com>
9971
9972         tests: fix regressions.
9973         Exit status 63 is documented for version-mismatch.
9974         * bootstrap.conf (gnulib_modules): Remove sysexits.
9975         * src/system.h (EX_MISMATCH): Define.
9976         * src/parse-gram.y (version_check): Use it instead of EX_CONFIG.
9977
9978         Missing includes.
9979         * tests/calc.at, tests/named-refs.at: Include assert.h.
9980
9981 2012-02-22  Akim Demaille  <demaille@gostai.com>
9982
9983         maint: gitignore.
9984         * examples/mfcalc/.gitignore, examples/rpcalc/.gitignore: Fix.
9985
9986 2012-02-21  Akim Demaille  <demaille@gostai.com>
9987
9988         regen.
9989         * src/parse-gram.c, src/parse-gram.h: regen.
9990
9991 2012-02-21  Akim Demaille  <demaille@gostai.com>
9992
9993         tests: fix regressions.
9994         Exit status 63 is documented for version-mismatch.
9995         * bootstrap.conf (gnulib_modules): Remove sysexits.
9996         * src/system.h (EX_MISMATCH): Define.
9997         * src/parse-gram.y (version_check): Use it instead of EX_CONFIG.
9998
9999         Missing includes.
10000         * tests/calc.at, tests/named-refs.at: Include assert.h.
10001
10002 2012-02-21  Akim Demaille  <demaille@gostai.com>
10003
10004         tests: post-process stderr to normalize quotes.
10005         * tests/bison.in: Save bison's stderr, and convert gettextized
10006         quotes to plain ASCII.
10007
10008 2012-02-21  Akim Demaille  <demaille@gostai.com>
10009
10010         glr: fix ambiguity reports.
10011         * tests/glr-regression.at (Ambiguity reports): New.
10012
10013 2012-02-21  Akim Demaille  <demaille@gostai.com>
10014
10015         glr: fix ambiguity reports.
10016         Fix a regression introduced in commit
10017         783aa653f4ca70a75919c8516b950494c612cbfe.
10018
10019         * tests/glr-regression.at (Ambiguity reports): New.
10020         * data/glr.c (yyreportTree): Fix an offset error.
10021
10022 2012-02-19  Akim Demaille  <demaille@gostai.com>
10023
10024         doc: stylistic improvements.
10025         * doc/bison.texinfo: Prefer "continue" to empty loop bodies.
10026         Add some @group/@end group to avoid poor page breaks.
10027
10028 2012-02-19  Akim Demaille  <demaille@gostai.com>
10029
10030         maint: address sc_prohibit_doubled_word.
10031         * data/yacc.c, doc/bison.texinfo: Reword to avoid having to
10032         disable that check.
10033         * cfg.mk: No longer skip this test.
10034
10035 2012-02-19  Akim Demaille  <demaille@gostai.com>
10036
10037         maint: address sc_prohibit_always-defined_macros.
10038         * cfg.mk: No longer skip it, except where EXIT_SUCCESS is used
10039         as a witness for stdlib.h.
10040         Skip this test when appropriate.
10041         * data/yacc.c: Drop a note about why EXIT_SUCCESS is defined here.
10042
10043 2012-02-19  Akim Demaille  <demaille@gostai.com>
10044
10045         maint: address sc_bindtextdomain, sc_program_name and sc_prohibit_HAVE_MBRTOWC.
10046         * bootstrap.conf (gnulib_modules): Require progname.
10047         * src/complain.c, src/getargs.c, src/getargs.h, src/main.c: Use it.
10048         * cfg.mk (exclude): New.
10049         Use it.
10050         Skip lib/main.c for bindtextdomain and set_program_name.
10051
10052 2012-02-19  Akim Demaille  <demaille@gostai.com>
10053
10054         maint: remove stray file.
10055         * config.hin: Remove.
10056
10057 2012-02-19  Akim Demaille  <demaille@gostai.com>
10058
10059         doc: stylistic improvements.
10060         * doc/bison.texinfo: Prefer "continue" to empty loop bodies.
10061         Add some @group/@end group to avoid poor page breaks.
10062
10063 2012-02-19  Akim Demaille  <demaille@gostai.com>
10064
10065         doc: check the rpcalc.
10066         * doc/bison.texinfo: Tag rpcalc.y snippets.
10067         Add missing includes.
10068         (Rpcalc Rules): Don't issue leading tabs.
10069         Complete an Info menu.
10070         Use @result.
10071         * examples/rpcalc/local.mk: New.
10072         * examples/rpcalc/rpcalc.test: New.
10073         * examples/local.mk: Use them.
10074         * examples/mfcalc/mfcalc.test: Remove dup test.
10075         * examples/test: Disable debug traces.
10076
10077 2012-02-19  Akim Demaille  <demaille@gostai.com>
10078
10079         regen.
10080         * src/parse-gram.c, src/parse-gram.h: Regen.
10081
10082 2012-02-19  Akim Demaille  <demaille@gostai.com>
10083
10084         maint: address sc_prohibit_doubled_word.
10085         * data/yacc.c, doc/bison.texinfo: Reword to avoid having to
10086         disable that check.
10087         * cfg.mk: No longer skip this test.
10088
10089 2012-02-19  Akim Demaille  <demaille@gostai.com>
10090
10091         maint: address sc_prohibit_always-defined_macros.
10092         * cfg.mk: No longer skip it, except where EXIT_SUCCESS is used
10093         as a witness for stdlib.h.
10094         Skip this test when appropriate.
10095         * data/yacc.c: Drop a note about why EXIT_SUCCESS is defined here.
10096
10097 2012-02-19  Akim Demaille  <demaille@gostai.com>
10098
10099         maint: address sc_bindtextdomain, sc_program_name and sc_prohibit_HAVE_MBRTOWC.
10100         * bootstrap.conf (gnulib_modules): Require progname.
10101         * src/complain.c, src/getargs.c, src/getargs.h, src/main.c: Use it.
10102         * cfg.mk (exclude): New.
10103         Use it.
10104         Skip lib/main.c for bindtextdomain and set_program_name.
10105
10106 2012-02-19  Akim Demaille  <demaille@gostai.com>
10107
10108         maint: remove stray file.
10109         * config.hin: Remove.
10110
10111 2012-02-19  Akim Demaille  <demaille@gostai.com>
10112
10113         bitset: fix an incorrect error message.
10114         * lib/bitset_stats.c: here.
10115         Reported by Stefano Lattarini.
10116
10117 2012-02-19  Akim Demaille  <demaille@gostai.com>
10118
10119         maint: address some syntax-issues remaining after cherry-picking from master.
10120         * cfg.mk: Skip bison generated files, 2.5 is generating trailing
10121         blanks.  This is already fixed in master.
10122         * tests/conflicts.at, tests/java.at: Fix white space issues.
10123
10124 2012-02-19  Akim Demaille  <demaille@gostai.com>
10125
10126         regen.
10127         * src/parse-gram.c, src/parse-gram.h: Regen.
10128
10129 2012-02-19  Akim Demaille  <demaille@gostai.com>
10130
10131         bitset: fix an incorrect error message.
10132         * lib/bitset_stats.c: here.
10133         Reported by Stefano Lattarini.
10134
10135 2012-02-19  Jim Meyering  <meyering@redhat.com>
10136
10137         maint: reenable sc_m4_quote_check
10138         * cfg.mk (local-checks-to-skip): Reenable sc_m4_quote_check.
10139         * m4/dmalloc.m4: Add quotes.
10140
10141 2012-02-19  Akim Demaille  <demaille@gostai.com>
10142
10143         maint: remove trailing empty lines.
10144         * cfg.mk: No longer skip sc_prohibit_empty_lines_at_EOF, except
10145         for parse-gram.h (generated).
10146         * examples/mfcalc/.gitignore, lib/.gitignore, m4/.gitignore,
10147         * po/.gitignore, runtime-po/.gitignore: Remove trailing/leading
10148         empty lines.
10149
10150 2012-02-19  Akim Demaille  <demaille@gostai.com>
10151
10152         maint: avoid "magic number exit".
10153         * cfg.mk (local-checks-to-skip): No longer skip it.
10154         * bootstrap.conf (gnulib_modules): Add sysexits.
10155         * doc/bison.texinfo, etc/bench.pl.in, src/parse-gram.y,
10156         * src/system.h, tests/calc.at, tests/named-refs.at: Use assert
10157         where appropriate instead of "if (...) exit".
10158         Use symbolic exit status elsewhere.
10159
10160 2012-02-19  Akim Demaille  <demaille@gostai.com>
10161
10162         maint: fix some syntax-check issues.
10163         * cfg.mk (local-checks-to-skip): Remove
10164         sc_prohibit_quotearg_without_use, sc_prohibit_strcmp,
10165         sc_unmarked_diagnostics, sc_useless_cpp_parens.
10166         (sc_unmarked_diagnostics): Skip DJGPP.
10167         * data/yacc.c, src/LR0.c, src/closure.c,
10168         * src/flex-scanner.h, src/gram.c, src/lalr.c,
10169         * src/print-xml.c, src/print.c, src/print_graph.c,
10170         * src/reader.c, src/reduce.c, src/tables.c:
10171         Don't use parens with cpp's defined.
10172         Remove useless includes.
10173
10174 2012-02-19  Akim Demaille  <demaille@gostai.com>
10175
10176         maint: address a couple of syntax-check errors.
10177         * cfg.mk (local-checks-to-skip): Remove sc_error_message_period
10178         and sc_error_message_uppercase.
10179         Address the uncovered issues.
10180         * po/POTFILES.in: Add missing files.
10181         * src/symtab.c: Remove useless includes.
10182         * lib/bitset_stats.c, src/files.c, tests/glr-regression.at: Use
10183         conformant error messages.
10184
10185 2012-02-19  Akim Demaille  <demaille@gostai.com>
10186
10187         maint: gnulib: upgrade.
10188
10189 2012-02-18  Akim Demaille  <demaille@gostai.com>
10190
10191         maint: remove trailing empty lines.
10192         * cfg.mk: No longer skip sc_prohibit_empty_lines_at_EOF, except
10193         for parse-gram.h (generated).
10194         * examples/mfcalc/.gitignore, lib/.gitignore, m4/.gitignore,
10195         * po/.gitignore, runtime-po/.gitignore: Remove trailing/leading
10196         empty lines.
10197
10198 2012-02-18  Akim Demaille  <demaille@gostai.com>
10199
10200         maint: regen.
10201         * src/parse-gram.c, src/parse-gram.h: regen.
10202
10203 2012-02-18  Akim Demaille  <demaille@gostai.com>
10204
10205         maint: avoid "magic number exit".
10206         * cfg.mk (local-checks-to-skip): No longer skip it.
10207         * bootstrap.conf (gnulib_modules): Add sysexits.
10208         * doc/bison.texinfo, etc/bench.pl.in, src/parse-gram.y,
10209         * src/system.h, tests/calc.at, tests/named-refs.at: Use assert
10210         where appropriate instead of "if (...) exit".
10211         Use symbolic exit status elsewhere.
10212
10213 2012-02-18  Akim Demaille  <demaille@gostai.com>
10214
10215         maint: fix some syntax-check issues.
10216         * cfg.mk (local-checks-to-skip): Remove
10217         sc_prohibit_quotearg_without_use, sc_prohibit_strcmp,
10218         sc_unmarked_diagnostics, sc_useless_cpp_parens.
10219         (sc_unmarked_diagnostics): Skip DJGPP.
10220         * data/yacc.c, src/LR0.c, src/closure.c,
10221         * src/flex-scanner.h, src/gram.c, src/lalr.c,
10222         * src/print-xml.c, src/print.c, src/print_graph.c,
10223         * src/reader.c, src/reduce.c, src/tables.c:
10224         Don't use parens with cpp's defined.
10225         Remove useless includes.
10226
10227 2012-02-18  Akim Demaille  <demaille@gostai.com>
10228
10229         maint: address a couple of syntax-check errors.
10230         * cfg.mk (local-checks-to-skip): Remove sc_error_message_period
10231         and sc_error_message_uppercase.
10232         Address the uncovered issues.
10233         * po/POTFILES.in: Add missing files.
10234         * src/symtab.c: Remove useless includes.
10235         * lib/bitset_stats.c, src/files.c, tests/glr-regression.at: Use
10236         conformant error messages.
10237
10238 2012-02-18  Akim Demaille  <demaille@gostai.com>
10239
10240         maint: gnulib: upgrade.
10241
10242 2012-02-17  Akim Demaille  <demaille@gostai.com>
10243
10244         doc: mfcalc: fix includes.
10245         * doc/bison.texinfo: math.h is needed early.
10246
10247 2012-02-17  Akim Demaille  <demaille@gostai.com>
10248
10249         examples: factor the test suite.
10250         * examples/mfcalc/test, examples/calc++/test: Extract the
10251         common bits into...
10252         * examples/test: here.
10253         (cwd): New.
10254         Use it to avoid a race on the temporary directory.
10255         Reported by Jim Meyering.
10256         * examples/mfcalc/test, examples/calc++/test: Rename into...
10257         * examples/mfcalc/mfcalc.test, examples/calc++/calc++.test: these.
10258         * examples/calc++/local.mk, examples/mfcalc/local.mk,
10259         * examples/local.mk: Adjust.
10260
10261 2012-02-17  Akim Demaille  <demaille@gostai.com>
10262
10263         examples: fix the test suites.
10264         * examples/calc++/test, examples/mfcalc/test (me): Be more
10265         meaningfull: include the example name.
10266         (prog): Factor.
10267         (run): Avoid printf, use echo.
10268         Add missing parens.
10269         (cleanup): New.
10270         Call it on trap.
10271         Remove the previous "rm" that did the cleanup.
10272         Move into a private directory to avoid concurrency issues.
10273         Reported by Jim Meyering.
10274
10275 2012-02-17  Jim Meyering  <meyering@redhat.com>
10276
10277         examples: link mfcalc with -lm for uses of pow, cos, atan, etc.
10278         * examples/mfcalc/local.mk (examples_mfcalc_mfcalc_LDADD): Define.
10279
10280 2012-02-16  Akim Demaille  <demaille@gostai.com>
10281
10282         mfcalc: extract and exercise.
10283         * examples/mfcalc/local.mk, examples/mfcalc/test: New,
10284         based on calc++'s ones.
10285         * examples/local.mk: Include mfcalc/local.mk.
10286
10287 2012-02-16  Akim Demaille  <demaille@gostai.com>
10288
10289         calc++: factor for other extracted tests.
10290         * Makefile.am (TESTS, check_PROGRAMS): Initialize here.
10291         * examples/local.mk (doc, extexi): Define here.
10292         * examples/calc++/local.mk: Adjust accordingly.
10293         * configure.ac: Ask for parallel-tests (for the way the logs
10294         are handled).
10295         * examples/calc++/test: As a consequence, always be verbose.
10296         ($prog): New.
10297         (run): Use it.
10298         Sort the tests in a more natural order (simplest first).
10299
10300 2012-02-16  Akim Demaille  <demaille@gostai.com>
10301
10302         doc: mfcalc: send errors to stderr.
10303         * doc/bison.texinfo (Mfcalc Lexer): New.
10304         (Mfcalc Main): Move the definition of main and yyerror here, for
10305         clarity.
10306         Let yyerror report on stderr.
10307
10308 2012-02-16  Akim Demaille  <demaille@gostai.com>
10309
10310         doc: fix mfcalc code.
10311         * doc/bison.texinfo (Multi-function Calc): Add missing includes.
10312         Fix the rendering of the result: use @result and remove the
10313         initial tabulation in the actual code.
10314         Fix stylistic issues: avoid the , operator.
10315         Add extexi mark-up.
10316         * examples/extexi: Also support @smallexample.
10317
10318 2012-02-16  Akim Demaille  <demaille@gostai.com>
10319
10320         tests: c++: stylistic changes.
10321         * tests/c++.at: Don't use void for incoming arguments.
10322         Prefer cstdlib to stdlib.h.
10323
10324 2012-02-16  Jim Meyering  <meyering@redhat.com>
10325
10326         tests: avoid c++ failure due to lack of getenv decl
10327         * tests/c++.at (Syntax error as exception): Avoid spurious failure
10328         at least when compiling with g++-4.7.x due to lack of declaration
10329         of getenv.  Include <stdlib.h>.
10330
10331 2012-02-15  Akim Demaille  <demaille@gostai.com>
10332
10333         maint: rely on Automake for parsers.
10334         * Makefile.am (AM_YFLAGS): Automake looks for "-d" alone.
10335         Move other options in here.
10336         (BISON): New.
10337         (YACC): Use it.
10338         (bison_SOURCES): Now that automake can see `-d' in AM_YFLAGS,
10339         we can rely on it to compile and ship the parser header
10340         files.
10341
10342         Based on commit 737406a32c201471699bfa0843d1f432f3ec29ab and
10343         commit 3d6ca339083c278d907c9f030f4ba6bc5ecb07f2.
10344
10345 2012-02-15  Akim Demaille  <demaille@gostai.com>
10346
10347         maint: trust Automake for parser headers.
10348         * examples/calc++/local.mk, src/local.mk: Now that automake
10349         can see `-d' in AM_YFLAGS, we can rely on it to compile
10350         and ship the parser header files.
10351
10352 2012-02-15  Akim Demaille  <demaille@gostai.com>
10353
10354         maint: help Automake reading Yacc flags.
10355         * Makefile.am (AM_YFLAGS): Automake looks for "-d" alone.
10356
10357 2012-02-15  Akim Demaille  <demaille@gostai.com>
10358
10359         calc++: rely on Automake.
10360         Rely on $(YACC) being the bison being built, and let Automake do the
10361         rest.  It turned out to be much more difficult than anticipated, for
10362         various reasons, including some bad behavior from Automake 1.11.2
10363         which (i) generates calc++-parser.h instead of calc++-parser.hh, and
10364         (ii) leaves an #include "y.tab.h" in the generated parser instead
10365         of #include "calc++-parser.h".
10366
10367         The authors of Automake appear to be aware of the problem,
10368         http://lists.gnu.org/archive/html/automake/2011-05/msg00008.html
10369         so a simple work around will suffice for the time being.
10370
10371         * examples/calc++/y.tab.h, examples/calc++/calc++-parser.hh: New.
10372         To work around Automake 1.11.2 issues.
10373         * examples/calc++/local.mk: Remove all the rules for compilation
10374         with bison, leave them to Automake.
10375         So provide it with "calc++-parse.yy" as a source file.
10376         (calc_sources_generated, calc_sources_extracted): Rename as.
10377         (calc_generated, calc_extracted): these.
10378         (calc_sources): New.
10379         Fix them.
10380
10381 2012-02-14  Akim Demaille  <demaille@gostai.com>
10382
10383         maint: tidy the Makefile a bit.
10384         * src/local.mk: Put yacc related variables together.
10385         (AUTOMAKE_OPTIONS): Move to...
10386         * Makefile.am: here.
10387         Remove an old Emacs mode request which disables Automake support.
10388         * src/local.mk (YACC, AM_YFLAGS): Move to...
10389         * Makefile.am: here, as they will be used by other local.mks.
10390
10391 2012-02-14  Akim Demaille  <demaille@gostai.com>
10392
10393         maint: de-recurse the handling of examples
10394         The directory was still using a local Makefile.am because it provides
10395         "scoped" Make variables: these examples are not meant to use the same
10396         CPPFLAGS etc.  If we were to use the same -I set, we'd pick up
10397         gnulib's stdio.h for instance, which we do not want for these simple
10398         examples.
10399
10400         Yet, as a result, the dependencies are less accurate, there is code
10401         duplication, etc.  This is especially perceptible when trying to
10402         extract more examples from the documentation, as will be done in
10403         forthcoming changes.
10404
10405         In order to make the tuning of CPPFLAGS easier, discard the predefined
10406         -I from Automake.
10407
10408         * examples/calc++/Makefile.am: Rename as...
10409         * examples/calc++/local.mk: this.
10410         Adjust the paths which are now rooted in top_srcdir/top_builddir.
10411         Handle BISON_CXX_WORKS here, instead of the too crude previous
10412         approach that completely discarded the whole directory.
10413         ($(BISON)): Remove now useless bouncing recipe.
10414         (calc___CPPFLAGS): New.
10415         Stay away from -Ilib.
10416         * Makefile.am, configure.ac, examples/local.mk,
10417         * examples/calc++/test: Adjust.
10418
10419         * configure.ac: Pass nostdinc to Automake.
10420         * src/local.mk, lib/local.mk (AM_CPPFLAGS): Move to...
10421         * Makefile.am: here.
10422
10423         * src/local.mk, examples/calc++/Makefile.am (BISON, BISON_IN): Factor
10424         to...
10425         * Makefile.am: here.
10426         * tests/local.mk: Use it.
10427
10428 2012-02-14  Akim Demaille  <demaille@gostai.com>
10429
10430         variant: fix the example.
10431         * examples/variant.yy: Adjust to "assert" being now
10432         "parse.assert".
10433
10434 2012-02-14  Akim Demaille  <demaille@gostai.com>
10435
10436         maint: more authors.
10437         * AUTHORS: here.
10438         Suggested by Tys Lefering.
10439
10440 2012-02-14  Akim Demaille  <demaille@gostai.com>
10441
10442         maint: add license headers.
10443         * examples/calc++/test, examples/variant.yy, AUTHORS, THANKS,
10444         * tests/atlocal.in, tests/bison.in: Add license headers.
10445         Reported by Tys Lefering.
10446
10447 2012-02-14  Akim Demaille  <demaille@gostai.com>
10448
10449         maint: remove obsolete file.
10450         * etc/make-ChangeLogs: Remove (used for rcs to cvs migration!).
10451         Reported by Tys Lefering.
10452
10453 2012-02-14  Akim Demaille  <demaille@gostai.com>
10454
10455         maint: more authors.
10456         * AUTHORS: here.
10457         Suggested by Tys Lefering.
10458
10459 2012-02-14  Akim Demaille  <demaille@gostai.com>
10460
10461         maint: add license headers.
10462         * examples/calc++/test, examples/variant.yy, AUTHORS, THANKS,
10463         * tests/atlocal.in, tests/bison.in: Add license headers.
10464         Reported by Tys Lefering.
10465
10466 2012-02-14  Akim Demaille  <demaille@gostai.com>
10467
10468         maint: remove obsolete file.
10469         * etc/make-ChangeLogs: Remove (used for rcs to cvs migration!).
10470         Reported by Tys Lefering.
10471
10472 2012-02-10  Akim Demaille  <demaille@gostai.com>
10473
10474         lalr1.cc: also handle syntax_error when calling yylex.
10475         * data/lalr1.cc (parse): Catch syntax_error around yylex and
10476         forward them to errlab1.
10477         * tests/c++.at (Syntax error as exception): Check support for
10478         syntax exceptions raised by the scanner.
10479         * NEWS, doc/bison.texinfo: Document it.
10480
10481 2012-02-10  Akim Demaille  <demaille@gostai.com>
10482
10483         tests: lalr1.cc: check syntax_error.
10484         * tests/c++.at (Syntax error as exception): New.
10485
10486 2012-02-10  Akim Demaille  <demaille@gostai.com>
10487
10488         tests: don't require locations uselessly.
10489         * tests/c++.at (Syntax error discarding no lookahead): Contrary to
10490         2.5, C++ parsers can work without locations.
10491
10492 2012-02-10  Akim Demaille  <demaille@gostai.com>
10493
10494         maint: more silent rules.
10495         * tests/local.mk (TESTSUITE_AT): Include plackage.m4.
10496         Adjust dependencies.
10497         Make testsuite.at its first argument.
10498         (package.m4): Be silent.
10499         (testsuite): Be silent.
10500         Use $<.
10501
10502 2012-02-10  Akim Demaille  <demaille@gostai.com>
10503
10504         skeletons: simplify the protections against "unused" warnings.
10505         * data/c.m4 (b4_parse_param_use): Also accept optional arguments
10506         to "use".
10507         Simplify callers.
10508         * data/glr.c (yyuserAction): Simplify use of b4_parse_param_use.
10509         (yy_reduce_print): Don't use b4_parse_param_use, as all the arguments
10510         _are_ used.
10511         * data/lalr1.cc (YY_SYMBOL_PRINT): Even when disabled, "use" the
10512         symbol argument.
10513         This neutralizes a warning in yypush_ when there are no symbols
10514         with a semantic values.
10515         (yy_destroy_): Remove useless "use" of yymsg.
10516
10517 2012-02-10  Akim Demaille  <demaille@gostai.com>
10518
10519         glr: formatting changes.
10520         * data/glr.c: Split long strings.
10521
10522 2012-02-08  Akim Demaille  <demaille@gostai.com>
10523
10524         use a more consistent quoting style.
10525         See <http://lists.gnu.org/archive/html/bug-bison/2012-01/msg00120.html>.
10526         Use quotearg as often as possible instead of leaving the choice of
10527         the quotes to the translators.  Use shorter messages.  Factor similar
10528         messages to a single format, to make localization easier.
10529
10530         * src/files.c, src/getargs.c, src/muscle-tab.c, src/reader.c
10531         * src/scan-code.l, src/scan-gram.l, src/symtab.c:
10532         Use quote() or quotearg_colon() on printf arguments instead of
10533         quotes in the format string.
10534         * data/bison.m4: Keep sync with the changes in muscle-tab.c.
10535
10536         * tests/skeletons.at, tests/input.at, tests/regression.at: Adjust
10537         expected messages.
10538
10539 2012-02-08  Akim Demaille  <demaille@gostai.com>
10540
10541         use a more consistent quoting style.
10542         See <http://lists.gnu.org/archive/html/bug-bison/2012-01/msg00120.html>.
10543         Use quotearg as often as possible instead of leaving the choice of
10544         the quotes to the translators.  Use shorter messages.  Factor similar
10545         messages to a single format, to make localization easier.
10546
10547         * src/files.c, src/getargs.c, src/muscle-tab.c, src/reader.c
10548         * src/scan-code.l, src/scan-gram.l, src/symtab.c:
10549         Use quote() or quotearg_colon() on printf arguments instead of
10550         quotes in the format string.
10551         * data/bison.m4: Keep sync with the changes in muscle-tab.c.
10552
10553         * tests/skeletons.at, tests/input.at, tests/regression.at: Adjust
10554         expected messages.
10555
10556 2012-01-31  Jim Meyering  <meyering@redhat.com>
10557
10558         maint: reenable sc_m4_quote_check
10559         * cfg.mk (local-checks-to-skip): Reenable sc_m4_quote_check.
10560         * m4/dmalloc.m4: Add quotes.
10561
10562 2012-01-31  Jim Meyering  <meyering@redhat.com>
10563
10564         maint: force "make syntax-check" to pass by skipping failing tests
10565         * cfg.mk (local-checks-to-skip): Skip all currently-failing tests.
10566         Remove changelog-check; it's long gone.
10567
10568 2012-01-31  Akim Demaille  <demaille@gostai.com>
10569
10570         maint: remove stray debug code.
10571         * src/Makefile.am (echo): Remove.
10572
10573 2012-01-31  Akim Demaille  <demaille@gostai.com>
10574
10575         maint: space changes.
10576         * src/Makefile.am: Use 2 leading spaces for variable definition
10577         spreading over several lines.
10578
10579 2012-01-31  Akim Demaille  <demaille@gostai.com>
10580
10581         maint: more silent-rules.
10582         * doc/local.mk, src/local.mk, examples/calc++/Makefile.am: Use
10583         $(AM_V_GEN) and $(AM_V_at) where appropriate.
10584
10585 2012-01-31  Jim Meyering  <meyering@redhat.com>
10586
10587         do not ignore errors like ENOSPC,EIO when writing to stdout
10588         Standard output was never explicitly closed, so we could not
10589         detect failure.  Thus, bison would ignore the errors of writing
10590         to a full file system and getting an I/O error on write, but only
10591         for standard output, e.g., for --print-localedir, --print-datadir,
10592         --help and some verbose output.
10593         Now, "bison --print-datadir > /dev/full" reports the write failure:
10594         bison: write error: No space left on device
10595         Before, it would exit 0 with no diagnostic, implying success.
10596         This is not an issue for "--output=-" or the other FILE-accepting
10597         command-line options, because unlike most other GNU programs,
10598         an output file argument of "-" is treated as the literal "./-",
10599         rather than standard output.
10600         * bootstrap.conf (gnulib_modules): Add closeout.
10601         * src/main.c: Include "closeout.h".
10602         Use atexit to ensure we close stdout.
10603         * .gitignore: Ignore new files pulled in via gnulib-tool.
10604
10605 2012-01-31  Akim Demaille  <demaille@gostai.com>
10606
10607         maint: more silent-rules.
10608         * doc/local.mk, src/local.mk, examples/calc++/Makefile.am: Use
10609         $(AM_V_GEN) and $(AM_V_at) where appropriate.
10610
10611 2012-01-29  Jim Meyering  <meyering@redhat.com>
10612
10613         do not ignore errors like ENOSPC,EIO when writing to stdout
10614         Standard output was never explicitly closed, so we could not
10615         detect failure.  Thus, bison would ignore the errors of writing
10616         to a full file system and getting an I/O error on write, but only
10617         for standard output, e.g., for --print-localedir, --print-datadir,
10618         --help and some verbose output.
10619         Now, "bison --print-datadir > /dev/full" reports the write failure:
10620         bison: write error: No space left on device
10621         Before, it would exit 0 with no diagnostic, implying success.
10622         This is not an issue for "--output=-" or the other FILE-accepting
10623         command-line options, because unlike most other GNU programs,
10624         an output file argument of "-" is treated as the literal "./-",
10625         rather than standard output.
10626         * bootstrap.conf (gnulib_modules): Add closeout.
10627         * src/main.c: Include "closeout.h".
10628         Use atexit to ensure we close stdout.
10629         * .gitignore: Ignore new files pulled in via gnulib-tool.
10630
10631 2012-01-26  Akim Demaille  <demaille@gostai.com>
10632
10633         tests: fix expected output.
10634         * tests/actions.at (YYBACKUP): here.
10635
10636 2012-01-26  Akim Demaille  <demaille@gostai.com>
10637
10638         tests: fix expected output.
10639         * tests/actions.at (YYBACKUP): here.
10640
10641 2012-01-26  Akim Demaille  <demaille@gostai.com>
10642
10643         maint: fix configure.ac
10644         Fix commit 1890a2a816dab86c23cc1d0af8fac3986335deb7.
10645
10646         * configure.ac: Fix variable assignment.
10647
10648 2012-01-26  Akim Demaille  <demaille@gostai.com>
10649
10650         yacc: fix YYBACKUP.
10651         Reported by David Kastrup:
10652         https://lists.gnu.org/archive/html/bug-bison/2011-10/msg00002.html.
10653
10654         * data/yacc.c (YYBACKUP): Accept rhs size.
10655         Restore the proper state value.
10656         * TODO (YYBACKUP): Make it...
10657         * tests/actions.at: a new test case.
10658         * NEWS, THANKS: Update.
10659
10660 2012-01-26  Akim Demaille  <demaille@gostai.com>
10661
10662         maint: update TODO.
10663         * TODO (Labeling the symbols): Remove, it's done ("Name references").
10664
10665 2012-01-26  Akim Demaille  <demaille@gostai.com>
10666
10667         maint: update THANKS.
10668         * THANKS: Update Tys's address, on his request.
10669
10670 2012-01-26  Akim Demaille  <demaille@gostai.com>
10671
10672         maint: fix --gcc-warnings support.
10673         * configure.ac: Use enable_gcc_warnings instead of enableval,
10674         which is valid only with AC_ARG_ENABLE.
10675
10676 2012-01-26  Akim Demaille  <demaille@gostai.com>
10677
10678         maint: silent-rules.
10679         * configure.ac: Ask for silent-rules support.
10680         Enable it by default.
10681
10682 2012-01-26  Akim Demaille  <demaille@gostai.com>
10683
10684         maint: remove trailing blanks.
10685         * src/scan-code.l: Here.
10686
10687 2012-01-26  Akim Demaille  <demaille@gostai.com>
10688
10689         yacc: fix YYBACKUP.
10690         Reported by David Kastrup:
10691         https://lists.gnu.org/archive/html/bug-bison/2011-10/msg00002.html.
10692
10693         * data/yacc.c (YYBACKUP): Accept rhs size.
10694         Restore the proper state value.
10695         * TODO (YYBACKUP): Make it...
10696         * tests/actions.at: a new test case.
10697         * NEWS, THANKS: Update.
10698
10699 2012-01-25  Akim Demaille  <demaille@gostai.com>
10700
10701         maint: update TODO.
10702         * TODO (Labeling the symbols): Remove, it's done ("Name references").
10703
10704 2012-01-25  Akim Demaille  <demaille@gostai.com>
10705
10706         maint: update THANKS.
10707         * THANKS: Update Tys's address, on his request.
10708
10709 2012-01-25  Akim Demaille  <demaille@gostai.com>
10710
10711         maint: fix --gcc-warnings support.
10712         * configure.ac: Use enable_gcc_warnings instead of enableval,
10713         which is valid only with AC_ARG_ENABLE.
10714
10715 2012-01-25  Akim Demaille  <demaille@gostai.com>
10716
10717         maint: silent-rules.
10718         * configure.ac: Ask for silent-rules support.
10719         Enable it by default.
10720
10721 2012-01-25  Paul Eggert  <eggert@cs.ucla.edu>
10722
10723         tests: port to Solaris 10 'diff -u'
10724         * tests/regression.at (parse-gram.y: LALR = IELR): Port to Solaris 10,
10725         where "diff -u X X" outputs "No differences encountered"
10726         instead of outputting nothing.  Reported by Tomohiro Suzuki in
10727         <http://lists.gnu.org/archive/html/bug-bison/2012-01/msg00101.html>.
10728
10729 2012-01-25  Jim Meyering  <meyering@redhat.com>
10730
10731         build: avoid possibly-replaced fprintf in liby-source, yyerror.c
10732         * lib/yyerror.c (yyerror): Use fputs and fputc rather than fprintf
10733         with a mere "%s\n" format.  Always return 0 now, on the assumption
10734         that the return value was never used anyway.
10735         Don't include <config.h> after all.  This avoids a problem
10736         reported by Thiru Ramakrishnan in
10737         http://lists.gnu.org/archive/html/help-bison/2011-11/msg00000.html
10738         * cfg.mk: Exempt lib/yyerror.c from the sc_require_config_h_first test.
10739         * THANKS: Update.
10740
10741 2012-01-24  Paul Eggert  <eggert@cs.ucla.edu>
10742
10743         tests: port to Solaris 10 'diff -u'
10744         * tests/regression.at (parse-gram.y: LALR = IELR): Port to Solaris 10,
10745         where "diff -u X X" outputs "No differences encountered"
10746         instead of outputting nothing.  Reported by Tomohiro Suzuki in
10747         <http://lists.gnu.org/archive/html/bug-bison/2012-01/msg00101.html>.
10748
10749 2012-01-24  Jim Meyering  <meyering@redhat.com>
10750
10751         maint: generate ChangeLog from git log
10752         * Makefile.am (gen-ChangeLog): New rule.
10753         (dist-hook): Depend on it.
10754         (EXTRA_DIST): Distribute the two ChangeLog-* files.
10755         * bootstrap.conf (gnulib_modules): Add gitlog-to-changelog.
10756         (bootstrap_post_import_hook): Ensure that ChangeLog exists.
10757         * build-aux/git-log-fix: New file.
10758         * ChangeLog-2012: Renamed ...
10759         * ChangeLog: ... from this.
10760         * ChangeLog-1998: Renamed ...
10761         * OChangeLog: ...from this
10762         * .gitignore: Add ChangeLog.
10763
10764 2012-01-24  Jim Meyering  <meyering@redhat.com>
10765
10766         change more quotes in source, and adjust tests to match
10767         Run this command to change each `%s' to '%s' in source directories:
10768           git grep -l '`%s'\' src djgpp data \
10769             |xargs perl -pi -e '$q="'\''";s/`%s$q/$q%s$q/g'
10770         * data/bison.m4: Affected per the above.
10771         * djgpp/subpipe.c: Likewise.
10772         * src/files.c: Likewise.
10773         * src/getargs.c: Likewise.
10774         * src/muscle-tab.c: Likewise.
10775         * src/reader.c: Likewise.
10776         * tests/glr-regression.at: Adjust to match.
10777         * tests/input.at: Likewise.
10778         * tests/push.at: Likewise.
10779         * tests/skeletons.at: Likewise.
10780
10781 2012-01-23  Jim Meyering  <meyering@redhat.com>
10782
10783         quote consistently and make tests pass with new quoting from gnulib
10784         Updating to gnulib pulled in new quote and quotarg modules,
10785         by which quoting is now done like 'this' rather than `this'.
10786         That change induces many "make check" test failures.  This change
10787         adapts code and tests so that "make check" passes once again.
10788         * src/scan-code.l: Quote like 'this', not like `this'.
10789         * src/scan-gram.l: Likewise.
10790         * src/symtab.c: Likewise.
10791         * tests/actions.at: Adjust tests to match.
10792         * tests/input.at: Likewise.
10793         * tests/named-refs.at: Likewise.
10794         * tests/output.at: Likewise.
10795         * tests/regression.at: Likewise.
10796         * lib/.gitignore: Regenerate.
10797         * m4/.gitignore: Likewise.
10798
10799 2012-01-23  Jim Meyering  <meyering@redhat.com>
10800
10801         build: avoid possibly-replaced fprintf in liby-source, yyerror.c
10802         * lib/yyerror.c (yyerror): Use fputs and fputc rather than fprintf
10803         with a mere "%s\n" format.  Always return 0 now, on the assumption
10804         that the return value was never used anyway.
10805         Don't include <config.h> after all.  This avoids a problem
10806         reported by Thiru Ramakrishnan in
10807         http://lists.gnu.org/archive/html/help-bison/2011-11/msg00000.html
10808         * cfg.mk: Exempt lib/yyerror.c from the sc_require_config_h_first test.
10809         * THANKS: Update.
10810
10811 2012-01-23  Jim Meyering  <meyering@redhat.com>
10812
10813         build: update gnulib and autoconf submodules to latest (cherry picked from commit 728415f885e5cb8e518c8576fa6e1f541e384130)
10814
10815 2012-01-23  Jim Meyering  <meyering@redhat.com>
10816
10817         build: manually update bootstrap from gnulib, and adapt
10818         Updating to the latest bootstrap from gnulib involves more of a
10819         change than usual, and updating to the latest gnulib would involve
10820         its own set of challenges with the upcoming quoting changes, so
10821         we update bootstrap manually and separately.
10822         * bootstrap: Update from gnulib.
10823         * lib/Makefile.am: Initialize more variables to empty, so that gnulib.mk
10824         can append to them with "+=".
10825         * bootstrap.conf (gnulib_mk_hook): Remove.  No longer honored.
10826         (gnulib_tool_option_extras): Generate gnulib.mk.
10827
10828 2012-01-23  Jim Meyering  <meyering@redhat.com>
10829
10830         maint: include <config.h> first
10831         * cfg.mk (exclude_file_name_regexp--sc_require_config_h_first):
10832         Exempt data/glr.c and data/yacc.c from the include-config.h-first
10833         requirement.
10834
10835 2012-01-23  Jim Meyering  <meyering@redhat.com>
10836
10837         build: include <config.h> from lib/yyerror.c
10838         * lib/yyerror.c: Include <config.h>.
10839
10840 2012-01-23  Jim Meyering  <meyering@redhat.com>
10841
10842         maint: list djgpp/subpipe.c in po/POTFILES.in
10843         * po/POTFILES.in: Add djgpp/subpipe.c.
10844
10845 2012-01-23  Jim Meyering  <meyering@redhat.com>
10846
10847         maint: placate the space-TAB syntax-check
10848         * cfg.mk (exclude_file_name_regexp--sc_space_tab): Exempt
10849         tests/input.at and tests/c++.at, since they appear to use
10850         SP-TAB sequences deliberately.
10851         * OChangeLog: Remove space-before-TAB.
10852
10853 2012-01-23  Jim Meyering  <meyering@redhat.com>
10854
10855         doc: correct typo: s/can not/cannot/
10856         * doc/bison.texinfo (Bug Reports): s/can not/cannot/
10857         And remove trailing blanks.
10858
10859 2012-01-23  Jim Meyering  <meyering@redhat.com>
10860
10861         build: generalize etc/prefix-gnulib-mk
10862         This script hard-coded "libbison" and lib/gnulib.mk.
10863         Adjust the script to require a --lib-name=$gnulib_name option
10864         and a FILE argument like lib/$gnulib_mk.
10865         Also add support for --help and --version.
10866         * etc/prefix-gnulib-mk: Generalize.
10867         * bootstrap.conf (bootstrap_post_import_hook): Update its invocation.
10868
10869 2012-01-22  Jim Meyering  <meyering@redhat.com>
10870
10871         maint: get gpl-3.0 from gnulib
10872         * bootstrap.conf (gnulib_modules): Add gpl-3.0.
10873         * doc/gpl-3.0.texi: Remove from version control, now that
10874         we get it via gnulib.
10875         * doc/.gitignore: Ignore it.
10876
10877 2012-01-20  Akim Demaille  <demaille@gostai.com>
10878
10879         maint: be more robust to gnulib's FOO_H variables.
10880         * configure.ac: Instead of listing gnulib's variables, look for
10881         them among AC_SUBST variables.
10882
10883 2012-01-20  Jim Meyering  <meyering@redhat.com>
10884
10885         maint: generate ChangeLog from git log
10886         * Makefile.am (gen-ChangeLog): New rule.
10887         (dist-hook): Depend on it.
10888         (EXTRA_DIST): Distribute the two ChangeLog-* files.
10889         * bootstrap.conf (gnulib_modules): Add gitlog-to-changelog.
10890         (bootstrap_post_import_hook): Ensure that ChangeLog exists.
10891         * build-aux/git-log-fix: New file.
10892         * ChangeLog-2012: Renamed ...
10893         * ChangeLog: ... from this.
10894         * ChangeLog-1998: Renamed ...
10895         * OChangeLog: ...from this
10896         * .gitignore: Add ChangeLog.
10897
10898 2012-01-19  Jim Meyering  <meyering@redhat.com>
10899
10900         change more quotes in source, and adjust tests to match
10901         Run this command to change each `%s' to '%s' in source directories:
10902           git grep -l '`%s'\' src djgpp data \
10903             |xargs perl -pi -e '$q="'\''";s/`%s$q/$q%s$q/g'
10904         * data/bison.m4: Affected per the above.
10905         * djgpp/subpipe.c: Likewise.
10906         * src/files.c: Likewise.
10907         * src/getargs.c: Likewise.
10908         * src/muscle-tab.c: Likewise.
10909         * src/reader.c: Likewise.
10910         * tests/glr-regression.at: Adjust to match.
10911         * tests/input.at: Likewise.
10912         * tests/push.at: Likewise.
10913         * tests/skeletons.at: Likewise.
10914
10915 2012-01-19  Jim Meyering  <meyering@redhat.com>
10916
10917         quote consistently and make tests pass with new quoting from gnulib
10918         Updating to gnulib pulled in new quote and quotarg modules,
10919         by which quoting is now done like 'this' rather than `this'.
10920         That change induces many "make check" test failures.  This change
10921         adapts code and tests so that "make check" passes once again.
10922         * src/scan-code.l: Quote like 'this', not like `this'.
10923         * src/scan-gram.l: Likewise.
10924         * src/symtab.c: Likewise.
10925         * tests/actions.at: Adjust tests to match.
10926         * tests/input.at: Likewise.
10927         * tests/named-refs.at: Likewise.
10928         * tests/output.at: Likewise.
10929         * tests/regression.at: Likewise.
10930         * lib/.gitignore: Regenerate.
10931         * m4/.gitignore: Likewise.
10932
10933 2012-01-19  Jim Meyering  <meyering@redhat.com>
10934
10935         build: update gnulib and autoconf submodules to latest
10936
10937 2012-01-19  Jim Meyering  <meyering@redhat.com>
10938
10939         build: manually update bootstrap from gnulib, and adapt
10940         Updating to the latest bootstrap from gnulib involves more of a
10941         change than usual, and updating to the latest gnulib would involve
10942         its own set of challenges with the upcoming quoting changes, so
10943         we update bootstrap manually and separately.
10944         * bootstrap: Update from gnulib.
10945         * Makefile.am: Initialize more variables to empty, so that gnulib.mk
10946         can append to them with "+=".
10947         * bootstrap.conf (gnulib_mk_hook): Remove.  No longer honored.
10948         (bootstrap_post_import_hook): Instead, run the same command,
10949         etc/prefix-gnulib-mk lib/$gnulib_mk, via slightly different API.
10950         Temporarily disable "bootstrap_sync=true".
10951         * etc/prefix-gnulib-mk: Don't prepend "lib/" to tokens like -I$(...
10952         or "\".
10953
10954 2012-01-19  Jim Meyering  <meyering@redhat.com>
10955
10956         maint: include <config.h> first
10957         * cfg.mk (exclude_file_name_regexp--sc_require_config_h_first):
10958         Exempt data/glr.c and data/yacc.c from the include-config.h-first
10959         requirement.
10960
10961 2012-01-19  Jim Meyering  <meyering@redhat.com>
10962
10963         build: include <config.h> from lib/yyerror.c
10964         * lib/yyerror.c: Include <config.h>.
10965
10966 2012-01-19  Jim Meyering  <meyering@redhat.com>
10967
10968         maint: list djgpp/subpipe.c in po/POTFILES.in
10969         * po/POTFILES.in: Add djgpp/subpipe.c.
10970
10971 2012-01-19  Jim Meyering  <meyering@redhat.com>
10972
10973         maint: placate the space-TAB syntax-check
10974         * cfg.mk (exclude_file_name_regexp--sc_space_tab): Exempt
10975         tests/input.at and tests/c++.at, since they appear to use
10976         SP-TAB sequences deliberately.
10977         * OChangeLog: Remove space-before-TAB.
10978
10979 2012-01-19  Jim Meyering  <meyering@redhat.com>
10980
10981         maint: remove final trailing space
10982         * src/scan-gram.l (%): Remove single space at end of line.
10983
10984 2012-01-19  Jim Meyering  <meyering@redhat.com>
10985
10986         maint: get gpl-3.0 from gnulib
10987         * bootstrap.conf (gnulib_modules): Add gpl-3.0.
10988         * doc/gpl-3.0.texi: Remove from version control, now that
10989         we get it via gnulib.
10990         * doc/.gitignore: Ignore it.
10991
10992 2012-01-19  Jim Meyering  <meyering@redhat.com>
10993
10994         doc: correct typo: s/can not/cannot/
10995         * doc/bison.texinfo (Bug Reports): s/can not/cannot/
10996         And remove trailing blanks.