1 2018-05-27 Akim Demaille <akim.demaille@gmail.com>
4 * NEWS: Record release date.
6 2018-05-27 Akim Demaille <akim.demaille@gmail.com>
8 bison: style: indentation fixes
9 * src/parse-gram.y: here.
11 2018-05-27 Akim Demaille <akim.demaille@gmail.com>
15 2018-05-27 Akim Demaille <akim.demaille@gmail.com>
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.
21 2018-05-27 Akim Demaille <akim.demaille@gmail.com>
23 C++: style: fix indentation
24 * data/variant.hh (b4_symbol_variant): De-indent, as the callers are
27 2018-05-27 Akim Demaille <akim.demaille@gmail.com>
31 2018-05-27 Akim Demaille <akim.demaille@gmail.com>
33 C++: style: prefer `unsigned` to `unsigned int`
36 2018-05-27 Akim Demaille <akim.demaille@gmail.com>
38 C++: style: space before paren
39 * data/c++.m4, data/lalr1.cc: here.
41 2018-05-27 Akim Demaille <akim.demaille@gmail.com>
43 C++: fix -Wdeprecated warnings
44 For instance on test 99:
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);
54 Reported by Derek Clegg.
55 https://lists.gnu.org/archive/html/bison-patches/2018-05/msg00036.html
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`)
62 2018-05-27 Akim Demaille <akim.demaille@gmail.com>
64 tests: fix -Wdeprecated warning
65 With recent compilers:
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]
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 > (); }
77 * tests/c++.at (Object): Add missing assignment operator.
79 2018-05-19 Akim Demaille <akim.demaille@gmail.com>
81 maint: update syntax-check exclusions
82 sc_two_space_separator_in_usage complains about bootstrap:
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
94 * cfg.mk: Exclude bootstrap from this check.
96 2018-05-19 Akim Demaille <akim.demaille@gmail.com>
99 * submodules/autoconf: Update to latest master.
100 No difference on the M4 files we use.
102 2018-05-19 Akim Demaille <akim.demaille@gmail.com>
106 2018-05-12 Akim Demaille <akim.demaille@gmail.com>
108 Update copyright years
109 Run `make update-copyright`.
111 2018-05-12 Nate Guerin <nathan.guerin@riseup.net>
113 Add a missing word in the documentation
114 Small patch adds the word 'to' to the documentation.
116 2018-05-12 Akim Demaille <akim.demaille@gmail.com>
118 Examples: improve C++ style
119 * examples/variant.yy: Prefer vector to list.
120 Remove useless inline.
122 2018-05-12 Akim Demaille <akim.demaille@gmail.com>
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.
129 Reported by Frank Heckenbach, https://savannah.gnu.org/patch/?9620.
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.
137 2018-05-10 Akim Demaille <akim.demaille@gmail.com>
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).
144 Reported several times, including:
147 http://lists.gnu.org/archive/html/bug-bison/2016-03/msg00002.html
148 - by Frank Heckenbach
149 https://savannah.gnu.org/patch/?9616
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.
155 * tests/c++.at (Syntax error as exception): Put the scanner in another
156 compilation unit to exercise the constructor of syntax_error.
158 2018-05-10 Akim Demaille <akim.demaille@gmail.com>
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.
164 2018-05-10 Akim Demaille <akim.demaille@gmail.com>
166 C++: remove useless `inline` on templates
167 Templates are implicitly `inline`.
169 * data/c++.m4, data/lalr1.cc: Remove `inline` from templates.
171 2018-05-08 Akim Demaille <akim.demaille@gmail.com>
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
180 2018-05-08 Akim Demaille <akim.demaille@gmail.com>
183 * README-hacking: Refill paragraphs.
185 2018-05-08 Akim Demaille <akim.demaille@gmail.com>
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.
192 2018-05-08 Akim Demaille <akim.demaille@gmail.com>
194 tests: we might need to find gnulib headers
195 315. calc.at:596: testing Calculator ...
199 bison/tests/calc.at:596: bison -fno-caret -o calc.c calc.y
200 ++ bison -fno-caret -o calc.c calc.y
202 bison/tests/calc.at:596: $BISON_C_WORKS
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
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>
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)
218 * tests/atlocal.in (CPPFLAGS): Find gnulib's headers.
220 2018-05-08 Akim Demaille <akim.demaille@gmail.com>
222 getargs: rename argument to avoid gnulib's renaming
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.
230 bison/src/getargs.c:67:12: note: did you mean 'rpl_option'?
232 * src/getargs.c: Don't use `option` as a documentation argument.
234 2017-09-22 Paul Eggert <eggert@cs.ucla.edu>
236 Capitalize "Polish" when it's a proper adjective
238 2017-09-17 Paul Eggert <eggert@cs.ucla.edu>
240 Adjust to recent Gnulib changes
242 2017-09-17 Paul Eggert <eggert@cs.ucla.edu>
246 2017-09-17 Paul Eggert <eggert@cs.ucla.edu>
250 2015-08-12 Akim Demaille <akim@lrde.epita.fr>
254 2015-08-12 Akim Demaille <akim@lrde.epita.fr>
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
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.
264 * data/lalr1.cc, data/yacc.c: Use @$ to initialize the error location.
265 * tests/actions.at: Check that case.
267 2015-08-12 Akim Demaille <akim@lrde.epita.fr>
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.
273 2015-08-12 Akim Demaille <akim@lrde.epita.fr>
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.
280 * data/lalr1.cc, data/location.cc, data/stack.hh: here.
282 2015-08-12 Akim Demaille <akim@lrde.epita.fr>
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".
288 * data/location.cc: Prefer {} for empty bodies.
290 2015-08-12 Akim Demaille <akim@lrde.epita.fr>
292 tests: beware of additional warnings from GCC 5
293 * tests/synclines.at (AT_SYNCLINES_COMPILE): Avoid warnings about
296 2015-08-12 Akim Demaille <akim@lrde.epita.fr>
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.
302 * configure.ac (warn_tests): Disable this warning.
304 2015-08-12 Akim Demaille <akim@lrde.epita.fr>
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.
313 2015-03-03 Akim Demaille <akim@lrde.epita.fr>
315 doc: improve html and pdf rendering
316 * doc/bison.texi: Help html conversion to understand where the
320 2015-03-03 Akim Demaille <akim@lrde.epita.fr>
322 doc: fixes in the C++ part
323 Reported by Askar Safin.
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
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.
332 2015-02-10 Akim Demaille <akim@lrde.epita.fr>
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:
337 input.y: In function ‘yyparse’:
341 input.y: In function 'yyparse':
343 Reported by Ferdinand Thiessen.
344 http://lists.gnu.org/archive/html/bug-bison/2015-02/msg00001.html
346 * tests/synclines.at (AT_SYNCLINES_COMPILE): Skip syncline tests when
347 we can't trust error messages issued about a function body.
349 2015-02-10 Akim Demaille <akim@lrde.epita.fr>
351 tests: java: avoid recent Java features
352 Tests 463 and 464 fail with Java 1.4 compilers.
354 Reported by Michael Felt.
355 <http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00091.html>
357 * tests/javapush.at: Use StringBuffer instead of StringBuilder.
359 2015-01-26 Akim Demaille <akim@lrde.epita.fr>
361 tests: c++: fix symbol lookup issue
362 Sun C 5.13 SunOS_sparc 2014/10/20 reports errors on tests 430-432.
364 Reported by Dennis Clarke.
365 <http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00087.html>
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.
372 2015-01-23 Akim Demaille <akim@lrde.epita.fr>
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.
379 2015-01-23 Akim Demaille <akim@lrde.epita.fr>
382 * NEWS: Record release date.
384 2015-01-23 Akim Demaille <akim@lrde.epita.fr>
388 2015-01-23 Akim Demaille <akim@lrde.epita.fr>
390 build: re-enable compiler warnings, and fix them
391 There are warnings (-Wextra) in generated C++ code:
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];
399 Reported by Alexandre Duret-Lutz.
401 It turns out that -Wall and -Wextra were disabled because of a stupid
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.
413 2015-01-22 Akim Demaille <akim@lrde.epita.fr>
415 tests: c++: fix a C++03 conformance issue
416 This fixes test 241 on xLC:
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.
424 report (std::ostream& yyo, int ival, float fval)
426 yyo << "ival: " << ival << ", fval: " << fval;
431 %printer { report (yyo, $$, $<fval>$); } <ival>;
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
437 Reported by Thomas Jahns.
438 http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00059.html
440 * tests/actions.at (Qualified $$ in actions): Don't use "static",
441 prefer anonymous namespace.
443 2015-01-20 Akim Demaille <akim@lrde.epita.fr>
446 * tests/conflicts.at: De-overquote.
448 2015-01-20 Akim Demaille <akim@lrde.epita.fr>
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.
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.
460 Reported by Thomas Jahns.
461 http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00059.html
463 * data/stack.hh (stack::stack): Reserve 200 slots.
464 * tests/c++.at: Remove traces of stack expansions.
466 2015-01-20 Akim Demaille <akim@lrde.epita.fr>
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
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
478 2015-01-20 Akim Demaille <akim@lrde.epita.fr>
480 tests: fix C++ conformance
481 Reported by Thomas Jahns.
482 http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00059.html
484 * tests/c++.at (Exception safety): Add missing include.
485 Don't use const_iterator for erase.
487 2015-01-18 Akim Demaille <akim@lrde.epita.fr>
489 build: fix some warnings
490 Reported by John Horigan.
491 http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00034.html
493 * src/graphviz.c, src/symtab.h: Address compiler warnings.
495 2015-01-16 Akim Demaille <akim@lrde.epita.fr>
497 build: avoid infinite recursions on include_next
498 On MacOS X 10.5 PPC with Apple's GCC 4.0.1:
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
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.
509 building in place enters into an infinite recursion on "#include_next":
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,
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
528 Using -I./lib instead of -Ilib fixes the problem.
531 <https://lists.gnu.org/archive/html/bison-patches/2014-01/msg00000.html>
533 * Makefile.am (AM_CPPFLAGS): Use -I./lib instead of -Ilib.
535 2015-01-16 Akim Demaille <akim@lrde.epita.fr>
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.
542 2015-01-15 Akim Demaille <akim@lrde.epita.fr>
544 gnulib: strtoul is considered obsolete and now useless
545 * bootstrap.conf: here.
547 2015-01-15 Akim Demaille <akim@lrde.epita.fr>
549 c++: avoid warnings when destructors don't use $$
552 2015-01-15 Akim Demaille <akim@lrde.epita.fr>
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.
559 2015-01-15 Akim Demaille <akim@lrde.epita.fr>
562 * NEWS: Record release date.
564 2015-01-15 Akim Demaille <akim@lrde.epita.fr>
568 2015-01-13 Akim Demaille <akim@lrde.epita.fr>
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.
574 2015-01-12 Akim Demaille <akim@lrde.epita.fr>
576 package: a bit of trouble shooting indications
577 * README-hacking: here.
579 2015-01-12 Akim Demaille <akim@lrde.epita.fr>
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>
585 * doc/bison.texi (Yacc Library): Document the call the setlocale.
587 2015-01-09 Akim Demaille <akim@lrde.epita.fr>
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.
594 Reported by Mike Sullivan.
595 <https://lists.gnu.org/archive/html/bug-bison/2013-12/msg00027.html>
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.
604 2015-01-09 Akim Demaille <akim@lrde.epita.fr>
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.
611 * data/c++.m4 (~basic_symbol): b4_symbol_foreach works on yysym:
613 * tests/c++.at (Variants): Check it.
615 2015-01-08 Akim Demaille <akim@lrde.epita.fr>
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.
622 2015-01-08 Akim Demaille <akim@lrde.epita.fr>
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
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.
634 * data/lalr1.cc (yyempty): Remove.
635 Rather, depend on yyla.empty ().
637 2015-01-08 Akim Demaille <akim@lrde.epita.fr>
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.
643 Reported by Antonio Silva Correia.
644 With an analysis and suggested patch from Michel d'Hooge.
645 <http://savannah.gnu.org/support/?108481>
647 * tests/c++.at (Variants): Strengthen the test to try syntax errors
648 with discarded lookahead.
650 2015-01-08 Akim Demaille <akim@lrde.epita.fr>
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
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
662 Reported by Antonio Silva Correia, with an analysis from Michel d'Hooge.
663 <http://savannah.gnu.org/support/?108481>
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.
669 2015-01-08 Akim Demaille <akim@lrde.epita.fr>
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.
676 2015-01-08 Akim Demaille <akim@lrde.epita.fr>
678 c++: comment and style changes
679 * data/c++.m4, data/lalr1.cc: More documentation.
681 * tests/c++.at (string_cast): Rename as...
682 (to_string): this C++11 name.
684 2015-01-07 Akim Demaille <akim@lrde.epita.fr>
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>
692 * data/variant.hh (yytname_): Replace with...
695 2015-01-05 Akim Demaille <akim@lrde.epita.fr>
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.
701 * data/location.cc: Fix.
702 * doc/bison.texi: Document.
703 * tests/c++.at: Check.
705 2015-01-05 Akim Demaille <akim@lrde.epita.fr>
707 build: do not clean figure sources in make clean
708 "make clean && make" fails in in-tree builds.
710 * doc/local.mk (CLEANDIRS): Replace with...
711 (CLEANFILES): this safer list of files to clean.
713 2015-01-05 Akim Demaille <akim@lrde.epita.fr>
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>
720 * configure.ac (CROSS_COMPILING): New.
721 * doc/local.mk: Use it.
723 2015-01-04 Akim Demaille <akim@lrde.epita.fr>
725 package: fix a reporter's name
726 * THANKS, build-aux/git-log-fix: s/Bernd Edligner/Bernd Edlinger/.
728 2015-01-04 Akim Demaille <akim@lrde.epita.fr>
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.
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.
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.
745 So replace the b4_union_name muscle by the api.value.union.name
746 %define variable, document, and check.
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.
758 2015-01-04 Akim Demaille <akim@lrde.epita.fr>
760 package: bump to 2015
765 2014-12-31 Akim Demaille <akim@lrde.epita.fr>
767 flex: don't trust YY_USER_INIT
768 Reported by Bernd Edlinger and others.
770 * src/scan-gram.l: here.
772 2014-12-31 Akim Demaille <akim@lrde.epita.fr>
774 yacc.c: fix broken union when api.value.type=union and %defines are used
775 Reported by Rich Wilson.
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.
783 This reveals another bug, this time in the case of glr.c parsers.
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.
788 2014-12-31 Akim Demaille <akim@lrde.epita.fr>
790 doc: fix missing xref
793 * doc/bison.texi (Printer Decl): here.
795 2014-12-29 Akim Demaille <akim@lrde.epita.fr>
799 2014-02-03 Akim Demaille <akim@lrde.epita.fr>
801 location: remove some ugly debugging code traces
802 * data/location.cc: here.
804 2014-02-03 Akim Demaille <akim@lrde.epita.fr>
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.
811 * src/muscle-tab.c, src/scan-skel.l: here.
813 2014-02-03 Akim Demaille <akim@lrde.epita.fr>
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:
873 2014-01-03 Paul Eggert <eggert@cs.ucla.edu>
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.
881 2013-12-09 Akim Demaille <akim@lrde.epita.fr>
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.
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.
893 2013-12-09 Akim Demaille <akim@lrde.epita.fr>
895 package: install README and the like in docdir
898 2013-12-09 Akim Demaille <akim@lrde.epita.fr>
900 diagnostics: fix the order of multiple declarations reports
909 /tmp/foo.yy:2.10-11: error: %printer redeclaration for FOO
912 /tmp/foo.yy:3.10-11: previous declaration
916 * src/symtab.c (locations_sort): New.
918 * tests/input.at (Invalid Aliases): Stress the order of diagnostics.
920 2013-12-09 Akim Demaille <akim@lrde.epita.fr>
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.
926 2013-12-05 Akim Demaille <akim@lrde.epita.fr>
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.
933 2013-12-05 Akim Demaille <akim@lrde.epita.fr>
936 * NEWS: Record release date.
938 2013-12-05 Akim Demaille <akim@lrde.epita.fr>
943 2013-12-04 Akim Demaille <akim@lrde.epita.fr>
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
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.
954 2013-12-04 Akim Demaille <akim@lrde.epita.fr>
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.
964 2013-12-04 Akim Demaille <akim@lrde.epita.fr>
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
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
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.
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.
986 2013-11-26 Akim Demaille <akim@lrde.epita.fr>
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.
992 2013-11-26 Akim Demaille <akim@lrde.epita.fr>
994 style: formatting changes
995 * src/print-xml.c: here.
997 2013-11-26 Akim Demaille <akim@lrde.epita.fr>
999 xml: also display %empty for empty right-hand sides
1000 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl: Display %empty where needed.
1002 2013-11-26 Akim Demaille <akim@lrde.epita.fr>
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
1010 2013-11-26 Akim Demaille <akim@lrde.epita.fr>
1012 news: YYERROR vs variants
1014 2013-11-18 Akim Demaille <akim@lrde.epita.fr>
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.
1021 2013-11-15 Akim Demaille <akim@lrde.epita.fr>
1023 lalr1.cc: formatting changes
1024 * data/lalr1.cc: Fix indentation.
1026 2013-11-15 Akim Demaille <akim@lrde.epita.fr>
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.
1034 However, when quitting yyparse, yylhs is also reclaimed by the C++
1035 compiler: the variable goes out of scope.
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.
1042 Reported by Paolo Simone Gasparello.
1043 <http://lists.gnu.org/archive/html/bug-bison/2013-10/msg00003.html>
1045 * data/lalr1.cc (yyparse): Reduce the scope of yylhs.
1046 * tests/c++.at: We now pass this test.
1048 2013-11-15 Akim Demaille <akim@lrde.epita.fr>
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.
1056 However, when quitting yyparse, yylhs is also reclaimed by the C++
1057 compiler: the variable goes out of scope.
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
1063 Reported by Paolo Simone Gasparello.
1064 <http://lists.gnu.org/archive/html/bug-bison/2013-10/msg00003.html>
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.
1074 2013-11-15 Akim Demaille <akim@lrde.epita.fr>
1076 tests: simplify useless obfuscation
1077 * tests/c++.at: $$ is not special for M4, there is no need to "escape"
1080 2013-11-14 Akim Demaille <akim@lrde.epita.fr>
1082 skeletons: use better names when computing a "goto"
1083 * data/glr.c (yyLRgotoState): Name the symbol argument yysym, instead
1085 * data/lalr1.cc (yy_lr_goto_state_): Likewise.
1086 * data/lalr1.java (yy_lr_goto_state_): New, modeled after the previous
1090 2013-11-12 Akim Demaille <akim@lrde.epita.fr>
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.
1097 2013-11-12 Akim Demaille <akim@lrde.epita.fr>
1100 * NEWS: Record release date.
1102 2013-11-12 Akim Demaille <akim@lrde.epita.fr>
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.
1108 * src/AnnotationList.c, src/muscle-tab.c: Adjust aver uses to resist
1111 2013-11-08 Akim Demaille <akim@lrde.epita.fr>
1113 parsers: rename YY_NULL as YY_NULLPTR to avoid conflicts with Flex
1114 Flex also defines YY_NULL (to 0). Avoid gratuitous conflicts.
1116 * data/c.m4 (b4_null_define): Rename YY_NULL as YY_NULLPTR.
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:
1124 2013-11-05 Akim Demaille <akim@lrde.epita.fr>
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%.
1131 2013-11-05 Akim Demaille <akim@lrde.epita.fr>
1133 build: restore maintainer-push-check
1134 * tests/local.mk: here.
1136 2013-11-05 Akim Demaille <akim@lrde.epita.fr>
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.
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
1147 2013-11-05 Akim Demaille <akim@lrde.epita.fr>
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.
1154 * data/glr.c: Use them.
1156 2013-11-05 Akim Demaille <akim@lrde.epita.fr>
1160 2013-10-24 Akim Demaille <akim@lrde.epita.fr>
1162 style: use /* ... */ comments
1163 * src/complain.c: Here.
1165 2013-10-24 Akim Demaille <akim@lrde.epita.fr>
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.
1170 * tests/local.at (AT_SKIP_IF_EXCEPTION_SUPPORT_IS_POOR): New.
1171 * tests/c++.at (Exception safety): Use it.
1173 2013-10-22 Akim Demaille <akim@lrde.epita.fr>
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.
1181 2013-10-22 Akim Demaille <akim@lrde.epita.fr>
1184 * src/scan-code.l: here.
1186 2013-10-22 Akim Demaille <akim@lrde.epita.fr>
1188 c++: fix generated doxygen comments
1189 * configure.ac: Enable -Wdocumentation if supported.
1190 * data/lalr1.cc: Fix comments.
1192 2013-10-22 Akim Demaille <akim@lrde.epita.fr>
1194 fix: uniqstr are already pointers
1195 * src/uniqstr.c (uniqstr_assert): Remove incorrect double indirection,
1196 and now useless cast.
1198 2013-10-22 Paul Eggert <eggert@cs.ucla.edu>
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.
1209 2013-10-22 Paul Eggert <eggert@cs.ucla.edu>
1211 maint: git now ignores rpcalc
1212 * examples/rpcalc/.gitignore: Ignore rpcalc.
1214 2013-10-22 Paul Eggert <eggert@cs.ucla.edu>
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.
1221 2013-10-22 Paul Eggert <eggert@cs.ucla.edu>
1223 maint: mention help2man, texinfo, apt-get
1224 * README-hacking: Add help2man, texinfo.
1225 Describe how to add packages if you're using Debian.
1227 2013-10-22 Paul Eggert <eggert@cs.ucla.edu>
1229 maint: git now ignores .log and .trs files
1230 * .gitignore: Add *.log, *.trs.
1232 2013-10-21 Akim Demaille <akim@lrde.epita.fr>
1234 tests: fix incorrect object construction
1235 Reported by Ken Moffat.
1236 http://lists.gnu.org/archive/html/bug-bison/2013-10/msg00009.html
1238 * tests/c++.at (Exception safety): Here.
1240 2013-10-16 Akim Demaille <akim@lrde.epita.fr>
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/
1247 * src/scan-gram.l: Do not try to be too smart when diagnosing invalid
1249 * tests/glr-regression.at (Predicates): New test.
1251 2013-10-16 Akim Demaille <akim@lrde.epita.fr>
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.
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.
1267 * tests/input.at (Symbols): Just check --yacc, not -Wyacc, that's the
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.
1277 * doc/bison.texi (Bison Options): Try to be clearer about how
1278 -W(no-)error and -W(no-)error=foo interact.
1280 2013-10-16 Akim Demaille <akim@lrde.epita.fr>
1283 * src/complain.h, src/complain.c: More documentation, more comments.
1285 2013-10-04 Andreas Schwab <schwab@linux-m68k.org>
1287 location: fix EOF check
1288 * location.c (location_caret): Use int, not char, for values from
1291 2013-09-19 Akim Demaille <akim@lrde.epita.fr>
1293 style: variant: remove empty line
1294 * data/variant.hh (b4_symbol_constructor_define_): Remove
1297 2013-09-19 Akim Demaille <akim@lrde.epita.fr>
1299 glr: more assertions
1300 * data/glr.c (yyaddDeferredAction, yyglrShiftDefer, yypdumpstack):
1303 2013-09-19 Akim Demaille <akim@lrde.epita.fr>
1306 * data/glr.c (yyglrReduce): Define yyflag with its value.
1308 2013-09-19 Akim Demaille <akim@lrde.epita.fr>
1310 glr: formatting changes
1313 2013-09-19 Akim Demaille <akim@lrde.epita.fr>
1315 glr: better use of tracing macros
1316 * data/glr.c (yydestroyGLRState): Use YY_SYMBOL_PRINT instead of
1319 2013-09-19 Akim Demaille <akim@lrde.epita.fr>
1321 examples: improve the output of the "variant" example
1322 * examples/variant.yy: Improve the printing of lists.
1324 2013-09-19 Akim Demaille <akim@lrde.epita.fr>
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
1331 2013-09-19 Akim Demaille <akim@lrde.epita.fr>
1333 tests: remove stray debugging traces
1334 * tests/atlocal.in: Remove traces.
1335 Be ready to remove conftest.dSYM generated on OS X.
1337 2013-09-04 Akim Demaille <akim@lrde.epita.fr>
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
1343 * tests/java.at: Ignore grep's output instead.
1345 2013-08-25 Paul Eggert <eggert@cs.ucla.edu>
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>.
1353 2013-08-25 Paul Eggert <eggert@cs.ucla.edu>
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.
1360 2013-08-24 Paul Eggert <eggert@cs.ucla.edu>
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>.
1369 2013-08-01 Akim Demaille <akim@lrde.epita.fr>
1371 tests: minor change to make it easier to test other skeletons
1372 * tests/c++.at (Variants): Pass the skeleton as argument.
1374 2013-08-01 Valentin Tolmer <valentin.tolmer@gmail.com>
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.
1380 2013-08-01 Akim Demaille <akim@lrde.epita.fr>
1382 build: ship the ASCII art figures
1383 We don't ship the *.txt files that are used to build the info
1385 Reported by Colin Daley.
1387 * doc/figs/example.txt: New.
1388 * doc/local.mk (bison.info): Depend on the txt files.
1391 2013-08-01 Akim Demaille <akim@lrde.epita.fr>
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).
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.
1405 2013-07-25 Akim Demaille <akim@lrde.epita.fr>
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.
1412 2013-07-25 Akim Demaille <akim@lrde.epita.fr>
1415 * NEWS: Record release date.
1417 2013-07-25 Akim Demaille <akim@lrde.epita.fr>
1421 2013-07-25 Akim Demaille <akim@lrde.epita.fr>
1424 * NEWS (3.0): Reorder.
1426 2013-07-25 Akim Demaille <akim@lrde.epita.fr>
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".
1434 2013-07-25 Akim Demaille <akim@lrde.epita.fr>
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
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
1445 <http://lists.gnu.org/archive/html/bison-patches/2012-10/msg00050.html>.
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
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);".
1461 2013-07-25 Akim Demaille <akim@lrde.epita.fr>
1465 2013-07-03 Akim Demaille <akim@lrde.epita.fr>
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
1473 Reported by Stefano Lattarini.
1474 http://lists.gnu.org/archive/html/bug-bison/2013-06/msg00001.html
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.
1480 2013-07-03 Akim Demaille <akim@lrde.epita.fr>
1482 tests: fix 'find' portability issues
1483 Reported by Stefano Lattarini.
1484 http://lists.gnu.org/archive/html/bug-bison/2013-06/msg00000.html
1486 * tests/output.at (AT_CHECK_OUTPUT): Use Perl instead.
1488 2013-06-24 Akim Demaille <akim@lrde.epita.fr>
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.
1495 2013-06-24 Akim Demaille <akim@lrde.epita.fr>
1498 * NEWS: Record release date.
1500 2013-06-24 Akim Demaille <akim@lrde.epita.fr>
1502 NEWS: prepare for 2.7.91
1503 * NEWS (2.7.91): Java push parsers.
1505 2013-06-24 Akim Demaille <akim@lrde.epita.fr>
1507 java: rename YYMORE as YYPUSH_MORE for consistency with C
1508 http://lists.gnu.org/archive/html/bison-patches/2013-06/msg00008.html
1510 * data/lalr1.java, doc/bison.texi, tests/javapush.at:
1511 s/YYMORE/YYPUSH_MORE.
1513 2013-06-21 Akim Demaille <akim@lrde.epita.fr>
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.
1519 2013-06-21 Akim Demaille <akim@lrde.epita.fr>
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
1526 Remove stray debugging "jj" file.
1528 2013-06-21 Akim Demaille <akim@lrde.epita.fr>
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.
1536 2013-06-14 Akim Demaille <akim@lrde.epita.fr>
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.
1543 2013-06-13 Dennis Heimbigner <dmh@unidata.ucar.edu>
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.
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()".
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.
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.
1573 2013-06-11 Akim Demaille <akim@lrde.epita.fr>
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.
1579 2013-06-05 Dennis Heimbigner <dmh@unidata.ucar.edu>
1581 style: comment changes in Java skeleton
1582 * data/lalr1.java: Here.
1584 2013-06-03 Akim Demaille <akim@lrde.epita.fr>
1586 tests: fix a G++ warning
1587 * tests/c++.at: Use YY_NULL instead of 0 for the null pointer.
1588 And formatting changes.
1590 2013-06-03 Akim Demaille <akim@lrde.epita.fr>
1592 build: fix a warning from clang
1593 * src/muscle-tab.c: Declare local functions static.
1595 2013-05-30 Akim Demaille <akim@lrde.epita.fr>
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.
1602 2013-05-30 Akim Demaille <akim@lrde.epita.fr>
1605 * NEWS: Record release date.
1607 2013-05-30 Akim Demaille <akim@lrde.epita.fr>
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.
1615 2013-05-30 Akim Demaille <akim@lrde.epita.fr>
1617 xml: use %empty in the text output
1618 * data/xslt/xml2text.xsl: here.
1620 2013-05-30 Akim Demaille <akim@lrde.epita.fr>
1622 build: locally disable new GCC warnings that fail on Flex generated code
1623 * configure.ac: here.
1625 2013-05-30 Akim Demaille <akim@lrde.epita.fr>
1628 * src/print-xml.c (num_escape_bufs): New.
1629 (print_xml): Be sure to release all the escape_bufs.
1631 2013-05-30 Akim Demaille <akim@lrde.epita.fr>
1635 2013-05-30 Akim Demaille <akim@lrde.epita.fr>
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.
1643 * src/parse-gram.y: here.
1645 2013-05-29 Akim Demaille <akim@lrde.epita.fr>
1647 Merge remote-tracking branch 'origin/maint'
1649 maint: post-release administrivia
1653 2013-05-29 Petr Machata <pmachata@redhat.com>
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
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).
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
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.
1678 2013-05-28 Akim Demaille <akim@lrde.epita.fr>
1682 2013-04-22 Akim Demaille <akim@lrde.epita.fr>
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.
1690 This is not consistent with the idea that multiple definitions are not
1691 allowed: discard any repeated directive.
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.
1699 2013-04-22 Akim Demaille <akim@lrde.epita.fr>
1701 tests: factor test for printer/desctructor redefined
1702 * tests/input.at (Default %printer and %destructor redeclared):
1703 Introduce AT_TEST to factor.
1705 2013-04-22 Akim Demaille <akim@lrde.epita.fr>
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
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.
1715 2013-04-22 Akim Demaille <akim@lrde.epita.fr>
1717 tests: factor duplicate expected warnings
1718 * tests/existing.at: Instead of "t ? abc : aBc", write "a(t?b:B)c".
1720 2013-04-19 Akim Demaille <akim@lrde.epita.fr>
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
1727 Reported by Efi Fogel.
1728 http://lists.gnu.org/archive/html/help-bison/2013-04/msg00018.html
1730 See also http://stackoverflow.com/questions/16101062 for the weird
1731 "-(unsigned)i" piece of code.
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.
1738 2013-04-18 Akim Demaille <akim@lrde.epita.fr>
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.
1753 2013-04-18 Akim Demaille <akim@lrde.epita.fr>
1757 2013-04-18 Akim Demaille <akim@lrde.epita.fr>
1759 parser: do not convert $ and @ in code values of %define variables
1760 * src/parse-gram.y (value: "{...}"): Just strip the braces, but pass
1763 2013-04-18 Akim Demaille <akim@lrde.epita.fr>
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.
1771 There is no (intended) changes of behavior here.
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.
1784 2013-04-18 Akim Demaille <akim@lrde.epita.fr>
1788 2013-04-18 Akim Demaille <akim@lrde.epita.fr>
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.
1794 2013-04-18 Akim Demaille <akim@lrde.epita.fr>
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.
1802 2013-04-16 Akim Demaille <akim@lrde.epita.fr>
1806 2013-04-16 Akim Demaille <akim@lrde.epita.fr>
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.
1817 2013-04-15 Akim Demaille <akim@lrde.epita.fr>
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.
1824 2013-04-15 Akim Demaille <akim@lrde.epita.fr>
1827 * NEWS: Record release date.
1829 2013-04-15 Akim Demaille <akim@lrde.epita.fr>
1833 2013-04-15 Akim Demaille <akim@lrde.epita.fr>
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
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.
1849 * tests/input.at (%define keyword variables): New.
1851 2013-04-15 Akim Demaille <akim@lrde.epita.fr>
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
1856 * src/getargs.c (getargs): Recognize {value} and "value" for -D and -F.
1858 2013-04-15 Akim Demaille <akim@lrde.epita.fr>
1860 muscle: minor refactoring
1861 * src/muscle-tab.c (muscle_percent_define_default): Reduce the scopes.
1863 2013-04-15 Akim Demaille <akim@lrde.epita.fr>
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.
1873 2013-04-15 Akim Demaille <akim@lrde.epita.fr>
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.
1881 2013-04-15 Akim Demaille <akim@lrde.epita.fr>
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.
1888 2013-04-15 Akim Demaille <akim@lrde.epita.fr>
1890 muscle: factor the computation of variable names
1891 * src/muscle-tab.c (muscle_name): New.
1893 Propagate "uniqstr" as value type instead of plain "char const *".
1895 2013-04-15 Akim Demaille <akim@lrde.epita.fr>
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.
1904 2013-04-15 Akim Demaille <akim@lrde.epita.fr>
1906 muscle: factor conditionals on defined %define variables
1907 * data/bison.m4 (b4_percent_define_ifdef_): New.
1908 Use it where appropriate.
1910 2013-04-11 Akim Demaille <akim@lrde.epita.fr>
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.
1920 2013-04-11 Akim Demaille <akim@lrde.epita.fr>
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
1926 * data/location.cc (position::columns, position::lines): Check for
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
1933 * tests/c++.at (C++ Locations): New tests.
1935 2013-04-11 Akim Demaille <akim@lrde.epita.fr>
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.
1943 * src/muscle-tab.h (muscle_grow): Make it private.
1944 * src/muscle-tab.c (muscle_grow): Accept a fourth argument: a required
1947 * tests/input.at (Multiple %code): New.
1949 2013-04-11 Akim Demaille <akim@lrde.epita.fr>
1952 * tests/actions.at: Fix incorrect "prototype".
1954 2013-04-10 Akim Demaille <akim@lrde.epita.fr>
1956 Merge remote-tracking branch '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
1964 skeletons: avoid empty switch constructs
1965 lalr1.cc: fix compiler warnings
1966 yacc.c: do not use __attribute__ unprotected
1967 tests: style changes
1969 2013-04-09 Akim Demaille <akim@lrde.epita.fr>
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
1975 * data/bison.m4 (b4_percent_define_get_kind): New.
1976 (b4_variant_flag): Check that api.value.type is defined as the 'variant'
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.
1987 * tests/types.at: Adjust
1989 2013-04-09 Akim Demaille <akim@lrde.epita.fr>
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.
1995 * data/bison.m4: Issue an error in this case.
1996 * tests/types.at (%yacc vs. %define api.value.type union): New, check this
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'.
2004 2013-04-09 Akim Demaille <akim@lrde.epita.fr>
2007 * doc/bison.texi (Destructor Decl, Printer Decl): Group series of %token
2010 2013-04-09 Akim Demaille <akim@lrde.epita.fr>
2012 doc: display locations in error as recommended by GNU Coding Standards
2013 * doc/bison.texi (Actions and Locations): here.
2015 2013-04-09 Akim Demaille <akim@lrde.epita.fr>
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.
2021 2013-04-09 Akim Demaille <akim@lrde.epita.fr>
2023 doc: move the section about "%union" where types are discussed
2024 * doc/bison.texi (Union Decl): Move to...
2025 (Defining Language Semantics): here.
2027 2013-04-09 Akim Demaille <akim@lrde.epita.fr>
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.
2033 2013-04-09 Akim Demaille <akim@lrde.epita.fr>
2035 value type: accept "->" in type tags
2036 Provide a means to dereference pointers when defining tags. One
2041 typedef struct ListElementType
2050 struct ListElementType* next;
2056 ListElementType* list;
2059 %token <list->value.charptrVal> STRING
2060 %token <list->value.intVal> INTEGER
2061 %token <list->value.floatVal> REAL
2062 %type <list> ElementList LiteralType
2064 * src/scan-code.l, src/scan-gram.l: Accept "->" in tags.
2065 * tests/types.at: Add more test cases to cover this case.
2067 2013-04-09 Akim Demaille <akim@lrde.epita.fr>
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
2074 2013-04-09 Akim Demaille <akim@lrde.epita.fr>
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):
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.
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.
2091 * doc/bison.texi (%define Summary): Document api.value.type.
2092 * NEWS: Advertise it, together with api.token.constructor.
2094 2013-04-09 Akim Demaille <akim@lrde.epita.fr>
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.
2100 2013-04-09 Akim Demaille <akim@lrde.epita.fr>
2102 variant: fix inconsistent quotation
2103 * data/variant.hh (b4_char_sizeof): De-overquote.
2104 (b4_value_type_declare): De-underquote.
2106 2013-04-09 Akim Demaille <akim@lrde.epita.fr>
2108 m4: style changes in error messages
2109 * data/bison.m4: Use $0 to denote the current macro's name.
2111 2013-04-08 Akim Demaille <akim@lrde.epita.fr>
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.
2117 2013-04-08 Akim Demaille <akim@lrde.epita.fr>
2119 maint: update copyright years
2120 Run "make update-copyright".
2122 2013-04-08 Akim Demaille <akim@lrde.epita.fr>
2124 build: fix VPATH issue
2125 * Makefile.am (update-b4-copyright, update-package-copyright-year): Fix
2128 2013-04-08 Akim Demaille <akim@lrde.epita.fr>
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.
2134 * configure.ac (warn_tests): New, to factor the warnings for both
2136 Add -fno-color-diagnostics to it.
2137 * tests/local.at (AT_TEST_TABLES_AND_PARSE): Do not remove glue
2138 together compiler flags.
2140 2013-04-08 Akim Demaille <akim@lrde.epita.fr>
2142 tests: please clang and use ".cc", not ".c", for C++ input
2143 When fed with foo.c, clang++ 3.2 answers:
2145 clang: error: treating 'c' input as 'c++' when in C++ mode,
2146 this behavior is deprecated
2148 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use *.cc and *.hh
2151 2013-04-08 Akim Demaille <akim@lrde.epita.fr>
2155 2013-04-08 Akim Demaille <akim@lrde.epita.fr>
2157 skeletons: avoid empty switch constructs
2158 Reported by Rob Conde.
2159 http://lists.gnu.org/archive/html/bug-bison/2013-03/msg00003.html
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.
2167 2013-04-08 Akim Demaille <akim@lrde.epita.fr>
2169 lalr1.cc: fix compiler warnings
2170 Reported by Rob Conde.
2171 http://lists.gnu.org/archive/html/bug-bison/2013-03/msg00003.html
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.
2177 * data/lalr1.cc: Use it instead of an assignment.
2178 (parser): Make this class uncopyable.
2180 2013-04-08 Akim Demaille <akim@lrde.epita.fr>
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
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.
2190 2013-04-05 Akim Demaille <akim@lrde.epita.fr>
2192 api.namespace: demonstrate and use {...} values instead of "..." values
2193 * tests/c++.at, tests/input.at: Use "%define api.namespace {foo}" instead
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.
2199 2013-04-05 Akim Demaille <akim@lrde.epita.fr>
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.
2208 * src/parse-gram.y, src/parse-gram.c (braceless): Instead of replacing
2209 the final brace by \n, just delete the brace.
2211 2013-04-04 Akim Demaille <akim@lrde.epita.fr>
2215 2013-04-04 Akim Demaille <akim@lrde.epita.fr>
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}).
2222 Suggested by Joel E. Denny.
2223 http://lists.gnu.org/archive/html/bison-patches/2013-03/msg00016.html
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.
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.
2236 Support values in braces in additions to keyword and string values.
2240 2013-04-04 Akim Demaille <akim@lrde.epita.fr>
2243 * src/muscle-tab.c (muscle_percent_define_ensure): Update obsolete
2246 2013-04-04 Akim Demaille <akim@lrde.epita.fr>
2250 2013-04-04 Akim Demaille <akim@lrde.epita.fr>
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.
2258 2013-04-04 Akim Demaille <akim@lrde.epita.fr>
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.
2265 2013-04-04 Akim Demaille <akim@lrde.epita.fr>
2268 * src/muscle-tab.c (muscle_lookup, muscle_entry_new): New.
2269 (muscle_insert, muscle_grow, muscle_find_const, muscle_find): Use them.
2271 2013-04-03 Akim Demaille <akim@lrde.epita.fr>
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.
2278 2013-04-03 Akim Demaille <akim@lrde.epita.fr>
2280 muscle: minor refactoring
2281 * src/muscle-tab.h (MUSCLE_INSERT_C_STRING): Use MUSCLE_INSERT_STRING.
2283 2013-03-06 Akim Demaille <akim@lrde.epita.fr>
2287 2013-03-06 Valentin Tolmer <nitnelave1@gmail.com>
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:
2297 being numbered as such: 'c' 'd' A B.
2299 * src/parse-gram.y (symbol.prec): Set the symbol number when reading the
2301 * tests/conflicts.at (Token declaration order: literals vs. identifiers):
2304 2013-03-04 Akim Demaille <akim@lrde.epita.fr>
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).
2310 2013-03-04 Akim Demaille <akim@lrde.epita.fr>
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
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.
2325 2013-03-04 Akim Demaille <akim@lrde.epita.fr>
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
2333 Basically, revert e8cd1ad655bcc704b06fb2f191dc3ac1df32b796.
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):
2341 2013-03-04 Akim Demaille <akim@lrde.epita.fr>
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.
2348 2013-02-23 Akim Demaille <akim@lrde.epita.fr>
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.
2354 * data/c++.m4 (b4_semantic_type_declare): Rename as...
2355 (b4_value_type_declare): this.
2356 * data/variant.hh: Likewise.
2358 2013-02-23 Akim Demaille <akim@lrde.epita.fr>
2363 2013-02-23 Akim Demaille <akim@lrde.epita.fr>
2365 style: space changes in the tests
2366 * tests/local.at: here.
2368 2013-02-22 Akim Demaille <akim@lrde.epita.fr>
2370 style: formatting changes in the doc
2371 * doc/bison.texi: Use @file where appropriate.
2373 2013-02-19 Akim Demaille <akim@lrde.epita.fr>
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.
2383 2013-02-19 Akim Demaille <akim@lrde.epita.fr>
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.
2391 2013-02-19 Akim Demaille <akim@lrde.epita.fr>
2395 2013-02-19 Akim Demaille <akim@lrde.epita.fr>
2399 2013-02-19 Akim Demaille <akim@lrde.epita.fr>
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.
2405 2013-02-19 Akim Demaille <akim@lrde.epita.fr>
2407 style: space changes
2408 * data/variant.hh: Be sure to leave a space before arguments in function
2411 2013-02-19 Akim Demaille <akim@lrde.epita.fr>
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.
2417 * data/variant.hh (variant::as_): New, factors the casts that avoid
2419 (as, build): Use them.
2421 2013-02-18 Akim Demaille <akim@lrde.epita.fr>
2426 2013-02-18 Akim Demaille <akim@lrde.epita.fr>
2428 diagnostics: factor and enhance messages about duplicate rule directives
2429 When reporting a duplicate directive on a rule, point to its first
2432 one.y:11.10-15: error: only one %empty allowed per rule
2435 one.y:11.3-8: previous declaration
2439 And consistently discard the second one.
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.
2446 2013-02-18 Akim Demaille <akim@lrde.epita.fr>
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:
2455 2013-02-18 Akim Demaille <akim@lrde.epita.fr>
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.
2468 2013-02-18 Akim Demaille <akim@lrde.epita.fr>
2470 style: no longer use backquotes in messages
2471 * src/getargs.c (usage): Use single quotes.
2473 2013-02-18 Akim Demaille <akim@lrde.epita.fr>
2475 doc: use %empty instead of /* empty */
2476 * doc/bison.texi: Change the comments into explicit %empty.
2478 2013-02-18 Akim Demaille <akim@lrde.epita.fr>
2480 doc: introduce %empty and -Wempty-rule
2481 * doc/bison.texi (Grammar Rules): Make it a @section which
2483 (Rules Syntax): this new subsection (with the previous contents of
2485 (Empty Rules): New subsection, extracted from the former
2488 (Recursion): New a subsection of "Grammar Rules".
2489 Complete a few index entries.
2490 (Bison Options): Document -Wempty-rule.
2492 2013-02-18 Akim Demaille <akim@lrde.epita.fr>
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.
2498 2013-02-18 Akim Demaille <akim@lrde.epita.fr>
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,
2504 * tests/actions.at (Implicitly empty rule): Check this feature.
2505 Also check that -Wno-empty-rule does disable this warning.
2507 2013-02-18 Akim Demaille <akim@lrde.epita.fr>
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
2515 * tests/actions.at (Implicitly empty rule): New.
2516 * tests/existing.at: Add expected warnings.
2518 2013-02-18 Akim Demaille <akim@lrde.epita.fr>
2521 * tests/actions.at, tests/input.at, tests/reduce.at,
2522 * tests/regression.at:
2525 2013-02-18 Akim Demaille <akim@lrde.epita.fr>
2529 2013-02-18 Akim Demaille <akim@lrde.epita.fr>
2532 Avoid that Bison's own use of "bison -Wall" trigger warnings.
2534 * src/parse-gram.y: Use %empty for every empty rule.
2536 2013-02-18 Akim Demaille <akim@lrde.epita.fr>
2538 grammar: introduce %empty
2539 Provide a means to explicitly denote empty right-hand sides of rules:
2548 Make sure that %empty is properly used.
2550 With help from Joel E. Denny and Gabriel Rassoul.
2551 http://lists.gnu.org/archive/html/bison-patches/2013-01/msg00142.html
2553 * src/reader.h, src/reader.c (grammar_current_rule_empty_set): New.
2554 * src/parse-gram.y (%empty): New token.
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.
2560 2013-02-16 Akim Demaille <akim@lrde.epita.fr>
2562 getargs: minor simplification
2563 * src/getargs.c (flag_argmatch): Simplify the handling of "none".
2565 2013-02-16 Akim Demaille <akim@lrde.epita.fr>
2567 style: move argument handling of -W into the diagnostics module
2568 This allows to reduce the number of public interfaces.
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.
2575 * src/getargs.h, src/getargs.c (warnings_args, warnings_types): Move to...
2576 * src/complain.c: here, now private.
2578 * src/complain.h (severity, warnings_flag): Move to...
2579 * src/complain.c: here, now private.
2581 2013-02-16 Akim Demaille <akim@lrde.epita.fr>
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.
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,
2595 * src/complain.h, src/complain.c (warning_bit): New enum.
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.
2608 * src/main.c (main): Call complain_init.
2609 * tests/input.at (Invalid options): Add more corner cases.
2611 2013-02-14 Akim Demaille <akim@lrde.epita.fr>
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.
2619 2013-02-14 Akim Demaille <akim@lrde.epita.fr>
2621 options: don't accept "error=" for -f and -r
2622 * src/getargs.c (warning_argmatch, warnings_argmatch, WARNINGS_ARGMATCH):
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.
2631 2013-02-14 Akim Demaille <akim@lrde.epita.fr>
2633 diagnostics: factor the list of warning names
2634 * src/getargs.h, src/getargs.c (warnings_args, warnings_types): Make
2636 * src/complain.h, src/complain.c (warnings_print_categories): Its
2637 only use outside complain.c was removed in a recent commit, so
2639 Simplify its implementation.
2640 Use warnings_args and warnings_types.
2641 * src/muscle-tab.c (muscle_percent_define_check_values): Make it
2644 2013-02-14 Akim Demaille <akim@lrde.epita.fr>
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.
2654 2013-02-14 Akim Demaille <akim@lrde.epita.fr>
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
2666 The "hidden" option --trace uses the same trick, but it does not need
2667 to be translated, nor to be described in --help.
2669 * src/getargs.c (warnings_args): Remove pseudo documentation.
2672 2013-02-11 Akim Demaille <akim@lrde.epita.fr>
2674 tests: enlarge the allowed duration for calc tests
2675 Hydra "often" fails on this test:
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
2682 * tests/calc.at: Give 200s instead of 100s.
2685 2013-02-11 Akim Demaille <akim@lrde.epita.fr>
2687 debug: improve the display of symbol lists
2688 * src/symtab.c (symbol_print): Remove useless quotes (the symbol already
2691 * src/symlist.c (symbol_list_syms_print): Likewise.
2694 2013-02-09 Akim Demaille <akim@lrde.epita.fr>
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.
2705 2013-02-08 Akim Demaille <akim@lrde.epita.fr>
2707 news: restructure, document variants for C++
2710 2013-02-08 Akim Demaille <akim@lrde.epita.fr>
2712 c++: api.token.constructor requires api.value.type=variant
2713 Eventually it should also support "union".
2715 * data/glr.cc: Move this check to...
2716 * data/c++.m4: here, as lalr1.cc is affected too.
2718 2013-02-05 Akim Demaille <akim@lrde.epita.fr>
2720 build: restore C90 compatibility
2721 * src/parse-gram.y, src/parse-gram.c: Don't use // comments.
2723 2013-02-05 Akim Demaille <akim@lrde.epita.fr>
2725 doc: use @group to improve page breaking
2726 * doc/bison.texi: here.
2728 2013-02-04 Akim Demaille <akim@lrde.epita.fr>
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).
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.
2742 2013-02-04 Akim Demaille <akim@lrde.epita.fr>
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)
2751 Use AT_LANG_DISPATCH instead of an ad hoc m4_case.
2753 2013-02-04 Akim Demaille <akim@lrde.epita.fr>
2757 2013-02-04 Akim Demaille <akim@lrde.epita.fr>
2759 style: space changes in the parser
2760 * src/parse-gram.y: Fix spaces.
2762 2013-02-04 Akim Demaille <akim@lrde.epita.fr>
2764 parser: use api.pure full
2765 * src/parse-gram.y: Use api.pure full instead of silly macro tricks.
2767 2013-02-04 Akim Demaille <akim@lrde.epita.fr>
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.
2775 2013-02-01 Theophile Ranquet <ranquet@lrde.epita.fr>
2777 variants: stylistic change
2778 * data/variant.hh (tname): Respect the GNU Coding Standards for this
2779 pointer's declaration.
2781 2013-02-01 Theophile Ranquet <ranquet@lrde.epita.fr>
2783 grammar: free the association tracking graph
2784 The graph introduced by Valentin wasn't free'd after use.
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.
2791 2013-02-01 Theophile Ranquet <ranquet@lrde.epita.fr>
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.
2799 2013-02-01 Theophile Ranquet <ranquet@lrde.epita.fr>
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'.
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
2814 In any case, this silences the warning, which will be greatly appreciated by
2815 anyone using variants with a compiler supporting -fstrict-aliasing.
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
2823 * examples/local.mk (NO_STRICT_ALIAS_CXXFLAGS): Remove from AM_CXXFLAGS.
2824 * doc/bison.texi: Don't mention type punning issues.
2826 2013-02-01 Theophile Ranquet <ranquet@lrde.epita.fr>
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
2835 2013-02-01 Akim Demaille <akim@lrde.epita.fr>
2839 2013-02-01 Akim Demaille <akim@lrde.epita.fr>
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.
2849 2013-02-01 Akim Demaille <akim@lrde.epita.fr>
2851 symlist: use the right stream
2852 * src/symlist.c (symbol_list_syms_print): Use "f", not stderr.
2854 2013-01-30 Akim Demaille <akim@lrde.epita.fr>
2856 tests: put two related tests together
2857 * tests/conflicts.at (Useless associativity warning): Move next
2858 to "Useless precedence warning".
2860 2013-01-30 Akim Demaille <akim@lrde.epita.fr>
2862 news: name contributors
2865 2013-01-30 Valentin Tolmer <nitnelave1@gmail.com>
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.
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
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).
2885 2013-01-30 Akim Demaille <akim@lrde.epita.fr>
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.
2891 * configure.ac (warn_tests): New, to factor the warnings for both
2893 Add -fno-color-diagnostics to it.
2894 * tests/local.at (AT_TEST_TABLES_AND_PARSE): Do not remove glue
2895 together compiler flags.
2897 2013-01-30 Akim Demaille <akim@lrde.epita.fr>
2899 build: please Clang++ 3.2+ on Flex scanners
2900 Clang++, with -Wall, rejects code generated by Flex (for C scanners):
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) ) {
2908 * configure.ac (WARN_NO_NULL_CONVERSION_CXXFLAGS): Compute it.
2909 * examples/calc++/local.mk (examples_calc___calc___CXXFLAGS): Use it.
2911 2013-01-30 Valentin Tolmer <nitnelave1@gmail.com>
2913 grammar: record used associativity and print useless ones
2914 Record which symbol associativity is used, and display useless ones.
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.
2922 Due to the new warning, many tests had to be updated.
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
2928 * doc/bison.texi (mfcalc example): Fix associativity to remove
2931 2013-01-29 Valentin Tolmer <nitnelave1@gmail.com>
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.
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.
2946 2013-01-29 Theophile Ranquet <ranquet@lrde.epita.fr>
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.
2955 * data/variant.hh (built): Remove.
2957 2013-01-29 Akim Demaille <akim@lrde.epita.fr>
2959 style: indentation fixes
2960 * src/parse-gram.y: here.
2962 2013-01-29 Akim Demaille <akim@lrde.epita.fr>
2964 maint: be sure to neutralize out-of-tree paths from our parser
2965 * tests/bison.in: Adjust to support fixed versions of ylwrap.
2967 2013-01-29 Theophile Ranquet <ranquet@lrde.epita.fr>
2969 m4: generate a basic_symbol constructor for each symbol type
2970 Recently, there was a slightly vicious bug hidden in the make_ functions:
2973 parser::make_TEXT (const ::std::string& v)
2975 return symbol_type (token::TOK_TEXT, v);
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.
2985 As a temporary solution, the symbol was built in two stages:
2987 symbol_type res (token::TOK_TEXT);
2988 res.value.build< ::std::string&> (v);
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
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
3001 * data/c++.m4 (basic_symbol): Invoke the macros here.
3003 2013-01-29 Theophile Ranquet <ranquet@lrde.epita.fr>
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).
3011 2013-01-29 Akim Demaille <akim@lrde.epita.fr>
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++.
3017 2013-01-29 Akim Demaille <akim@lrde.epita.fr>
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).
3027 2013-01-29 Akim Demaille <akim@lrde.epita.fr>
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
3036 * data/lalr1.cc: Adjust to these changes.
3037 Propagate "symbol_number_type".
3038 Invoke "type_get ()" instead of read "type" directly.
3040 2013-01-29 Akim Demaille <akim@lrde.epita.fr>
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.
3046 2013-01-29 Akim Demaille <akim@lrde.epita.fr>
3048 c++: improve the signature of yysyntax_error_
3049 * data/lalr1.cc: This function is const.
3050 It takes a symbol_number_type.
3052 2013-01-29 Akim Demaille <akim@lrde.epita.fr>
3055 * data/lalr1.cc: Formatting changes.
3058 2013-01-28 Akim Demaille <akim@lrde.epita.fr>
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.
3066 2013-01-28 Akim Demaille <akim@lrde.epita.fr>
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.
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.
3077 2013-01-28 Akim Demaille <akim@lrde.epita.fr>
3079 tests: please C90 compilers
3080 * tests/actions.at, tests/conflicts.at: Use /* ... */ comments.
3081 Let "main" return a value.
3083 2013-01-28 Akim Demaille <akim@lrde.epita.fr>
3086 * TODO: Remove fixed items.
3088 2013-01-28 Akim Demaille <akim@lrde.epita.fr>
3090 news: minor improvements
3091 * NEWS: Name some more contributors.
3092 Restructure slightly.
3094 2013-01-28 Akim Demaille <akim@lrde.epita.fr>
3096 tests: please clang and use ".cc", not ".c", for C++ input
3097 When fed with foo.c, clang++ 3.2 answers:
3099 clang: error: treating 'c' input as 'c++' when in C++ mode,
3100 this behavior is deprecated
3102 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use *.cc and *.hh
3105 2013-01-28 Akim Demaille <akim@lrde.epita.fr>
3107 tests: formatting changes
3108 * tests/local.at: Restore proper indentation.
3110 2013-01-28 Theophile Ranquet <ranquet@lrde.epita.fr>
3112 c++: better inline expansion
3113 Many 'inline' keywords were in the declarations. They rather belong in
3114 definitions, so move them.
3116 * data/c++.m4 (basic_symbol, by_type): Many inlines here.
3117 * data/lalr1.cc (yytranslate_, yy_destroy_, by_state, yypush_, yypop_): Inline
3119 (move): Move the definition outside the struct, where it belongs.
3121 2013-01-28 Akim Demaille <akim@lrde.epita.fr>
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.
3129 2013-01-28 Akim Demaille <akim@lrde.epita.fr>
3131 tests: remove useless %defines
3132 Many tests were using %defines because C++ skeletons used to require
3135 * tests/actions.at, tests/c++.at, tests/input.at, tests/regression.at:
3136 Remove useless %defines.
3138 2013-01-28 Akim Demaille <akim@lrde.epita.fr>
3140 c++: remove now-useless operators
3141 Now that symbols behaves properly, we can eliminate special routines
3142 that are no longer needed.
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".
3148 2013-01-28 Akim Demaille <akim@lrde.epita.fr>
3150 tests: enable support for --debug
3151 * tests/c++.at (Variants): Here.
3152 And remove useless clutter when api.token.constructor is enabled.
3154 2013-01-28 Akim Demaille <akim@lrde.epita.fr>
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
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.
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
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
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
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
3198 Conversely, be sure to delete yylhs.
3199 * tests/c++.at (C++ Variant-based Symbols): New "unit" test for
3202 2013-01-28 Akim Demaille <akim@lrde.epita.fr>
3204 c++: formatting and comment changes
3205 * data/c++.m4, data/lalr1.cc, data/stack.hh, data/variant.hh:
3209 2013-01-27 Valentin Tolmer <nitnelave1@gmail.com>
3211 tests: add token declaration order test
3212 * tests/conflicts.at: New test.
3214 2013-01-27 Akim Demaille <akim@lrde.epita.fr>
3218 2013-01-27 Valentin Tolmer <nitnelave1@gmail.com>
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).
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.
3229 2013-01-25 Akim Demaille <akim@lrde.epita.fr>
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.
3235 Fix the handling of %define with quotes.
3237 2013-01-25 Akim Demaille <akim@lrde.epita.fr>
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
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.
3250 * data/c.m4 (b4_yy_location_print_define): Use YYFPRINTF instead of
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
3256 * tests/local.at (AT_YYERROR_DECLARE, AT_YYERROR_DEFINE): Declare
3257 and define location_print and LOCATION_PRINT.
3259 * tests/actions.at, tests/existing.at, tests/glr-regression.at,
3260 * tests/input.at, tests/named-refs.at, tests/regression.at: Adjust
3262 Fix the expected line numbers (as the prologue's length has changed).
3264 2013-01-25 Akim Demaille <akim@lrde.epita.fr>
3266 c: minor simplification in the debug code
3267 * data/c.m4 (yy_symbol_print): Minor factoring.
3269 2013-01-25 Akim Demaille <akim@lrde.epita.fr>
3271 c++: display locations as C does
3272 See commit 3804aa260b956dd012adde3894767254422a5fcf.
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.
3280 2013-01-25 Akim Demaille <akim@lrde.epita.fr>
3282 tests: highlight empty right-hand sides
3283 * tests/actions.at, tests/c++.at, tests/headers.at,
3284 * tests/input.at: here.
3286 2013-01-25 Akim Demaille <akim@lrde.epita.fr>
3288 news: prepare for 2.8
3289 * NEWS: Restructure.
3292 2013-01-21 Akim Demaille <akim@lrde.epita.fr>
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...
3301 2013-01-21 Akim Demaille <akim@lrde.epita.fr>
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
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.
3312 2013-01-21 Akim Demaille <akim@lrde.epita.fr>
3314 tests: factor the definition of main
3315 With Théophile Ranquet.
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.
3325 2013-01-21 Akim Demaille <akim@lrde.epita.fr>
3327 tests: minor refactoring
3328 * tests/named-refs.at: Use AT_FULL_COMPILE where applicable.
3330 2013-01-21 Akim Demaille <akim@lrde.epita.fr>
3332 diagnostics: avoid useless caret stuttering
3333 * src/scan-code.l: When reporting a missing ending ';', don't display
3334 the guilty action twice.
3336 2013-01-21 Theophile Ranquet <ranquet@lrde.epita.fr>
3338 examples: please clang
3339 * doc/bison.texi (calc++-scanner.ll): Don't output useless yyinput function.
3341 2013-01-21 Theophile Ranquet <ranquet@lrde.epita.fr>
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)
3348 * tests/c++.at (C++ GLR parser identifier shadowing): Don't name unused
3349 argument, use YYUSE instead of a direct cast to void.
3351 2013-01-21 Theophile Ranquet <ranquet@lrde.epita.fr>
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:
3357 input.cc:547:16: error: expected ',' or '...' before '(' token
3358 #define yylval (yystackp->yyval)
3360 input.yy:29:39: note: in expansion of macro 'yylval'
3361 int yylex (yy::parser::semantic_type *yylval)
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.
3368 * etc/bench.pl.in: Rename yylval to yylvalp and yylloc to yyllocp in base
3371 2013-01-15 Theophile Ranquet <ranquet@lrde.epita.fr>
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.
3379 2013-01-15 Theophile Ranquet <ranquet@lrde.epita.fr>
3381 c++: m4 stylistic change
3382 * data/c++.m4 (syntax_error): Fix the indentation of 'inline'.
3384 2013-01-14 Theophile Ranquet <ranquet@lrde.epita.fr>
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.
3391 2013-01-14 Theophile Ranquet <ranquet@lrde.epita.fr>
3394 * NEWS: Fix a typo, use YYSTYPE rather than semantic_type.
3396 2013-01-12 Akim Demaille <akim@lrde.epita.fr>
3400 2013-01-12 Akim Demaille <akim@lrde.epita.fr>
3402 maint: update copyright years
3403 Suggested by Stefano Lattarini.
3404 Run "make update-copyright".
3406 2013-01-12 Akim Demaille <akim@lrde.epita.fr>
3408 build: fix VPATH issue
3409 * Makefile.am (update-b4-copyright, update-package-copyright-year): Fix
3412 2013-01-11 Theophile Ranquet <ranquet@lrde.epita.fr>
3414 carets: document default activation
3415 * NEWS: Announce it.
3416 * doc/bison.texi: Adjust.
3418 2013-01-11 Theophile Ranquet <ranquet@lrde.epita.fr>
3420 carets: show them in more tests
3421 * tests/input.at, tests/named-refs.at: Here.
3423 2013-01-11 Theophile Ranquet <ranquet@lrde.epita.fr>
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.
3431 2013-01-11 Theophile Ranquet <ranquet@lrde.epita.fr>
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.
3439 2013-01-11 Theophile Ranquet <ranquet@lrde.epita.fr>
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.
3447 2013-01-11 Akim Demaille <akim@lrde.epita.fr>
3449 glr.c: fix an unused argument issue
3450 * data/glr.c (yyuserAction): "Use" yyrhslen, as in variant mode, we might
3453 2013-01-11 Akim Demaille <akim@lrde.epita.fr>
3455 glr.c: style changes
3456 * data/glr.c (yyuserAction): Use a size_t for sizes.
3458 2013-01-11 Akim Demaille <akim@lrde.epita.fr>
3461 * data/c.m4 (b4_parse_param_use): Add missing space before paren.
3463 2013-01-11 Theophile Ranquet <ranquet@lrde.epita.fr>
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.
3469 2013-01-11 Theophile Ranquet <ranquet@lrde.epita.fr>
3471 glr.cc: fatal if using api.token.ctor without variants
3472 * data/glr.cc: Here.
3474 2013-01-11 Theophile Ranquet <ranquet@lrde.epita.fr>
3476 skel: correctly indent switch cases
3477 * data/bison.m4 (b4_type_action_): Here.
3479 2013-01-11 Theophile Ranquet <ranquet@lrde.epita.fr>
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.
3486 2013-01-11 Theophile Ranquet <ranquet@lrde.epita.fr>
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.
3493 2013-01-11 Theophile Ranquet <ranquet@lrde.epita.fr>
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.
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.
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.
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.
3520 Therefore, we need another means to factor the common code, one that
3521 ensures the order of the members.
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
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
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.
3540 2013-01-11 Theophile Ranquet <ranquet@lrde.epita.fr>
3542 bench: add %b directive to use a specific Bison
3544 $ bench.pl -v '%s lalr1.cc & %d variant & ( %b ~/old-bison/bin/bison
3545 | %b ~/new-bison/bin/bison )' -g list -i 10000
3547 * etc/bench.pl.in: Here.
3549 2013-01-09 Akim Demaille <akim@lrde.epita.fr>
3553 2013-01-04 Akim Demaille <akim@lrde.epita.fr>
3557 2012-12-31 Akim Demaille <akim@lrde.epita.fr>
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
3563 It is also more consistent with the rest of the document.
3565 2012-12-31 Akim Demaille <akim@lrde.epita.fr>
3567 doc: minor completion and fixes
3568 * doc/bison.texi (%define Summary): Provide more history to some
3571 2012-12-31 Akim Demaille <akim@lrde.epita.fr>
3573 java: stype is obsoleted by api.value.type
3574 This is consistent with the other %define variable names.
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
3580 * tests/java.at: Adjust.
3582 2012-12-31 Akim Demaille <akim@lrde.epita.fr>
3585 * doc/local.mk (bison.html): Fix dependencies.
3587 2012-12-31 Akim Demaille <akim@lrde.epita.fr>
3589 todo: remove erroneous task
3590 * tests/input.at: Check that there are no warnings about stray $ and @
3592 * TODO: Remove the correponding task.
3594 2012-12-31 Akim Demaille <akim@lrde.epita.fr>
3598 2012-12-28 Akim Demaille <akim@lrde.epita.fr>
3602 2012-12-28 Akim Demaille <akim@lrde.epita.fr>
3604 syncline: one line is enough
3605 So far we were issuing two lines for each syncline change:
3607 /* Line 356 of yacc.c */
3608 #line 1 "src/parse-gram.y"
3610 This is a lot of clutter, especially when reading diffs, as these
3611 lines change often. Fuse them into a single, shorter, line:
3613 #line 1 "src/parse-gram.y" /* yacc.c:356 */
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.
3621 2012-12-28 Akim Demaille <akim@lrde.epita.fr>
3625 2012-12-28 Akim Demaille <akim@lrde.epita.fr>
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.
3632 2012-12-28 Akim Demaille <akim@lrde.epita.fr>
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...
3639 Use a "rule*" instead of an index in "rules[]".
3641 2012-12-28 Akim Demaille <akim@lrde.epita.fr>
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.
3647 2012-12-27 Theophile Ranquet <ranquet@lrde.epita.fr>
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.
3655 2012-12-27 Theophile Ranquet <ranquet@lrde.epita.fr>
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>
3662 This partially reverts commit aa4180418fff518198e1b0f2c43fec6432210dc7.
3664 * src/scan-gram.l (unexpected_end): Here.
3665 * tests/input.at: Adjust for new order of error reports.
3667 2012-12-27 Akim Demaille <akim@lrde.epita.fr>
3669 tables: scope reduction
3670 * src/tables.c (default_goto): Make it easier to understand.
3672 2012-12-27 Akim Demaille <akim@lrde.epita.fr>
3676 2012-12-27 Akim Demaille <akim@lrde.epita.fr>
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.
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.
3690 * data/lalr1.cc, data/lalr1.java, data/yacc.c: Comment fixes.
3692 * data/lalr1.cc: Reorder a bit to factor some CPP directives.
3694 2012-12-27 Akim Demaille <akim@lrde.epita.fr>
3696 maint: which -> whose
3697 Apparently, I was confusing both.
3699 * data/bison.m4, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c:
3700 Use "whose" where appropriate.
3702 2012-12-26 Akim Demaille <akim@lrde.epita.fr>
3704 tables: scope reduction
3705 * src/tables.c (matching_state): here.
3707 2012-12-26 Akim Demaille <akim@lrde.epita.fr>
3709 tables: scope reduction
3710 * src/tables.c (token_actions): here.
3712 2012-12-26 Akim Demaille <akim@lrde.epita.fr>
3714 tables: scope reduction
3715 * src/tables.c (save_row): here.
3717 2012-12-26 Akim Demaille <akim@lrde.epita.fr>
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.
3724 2012-12-26 Akim Demaille <akim@lrde.epita.fr>
3726 tables: use size_t where appropriate
3727 These changes aim at making the code easier to understand.
3729 * src/tables.c (tally): This is a size, always >= 0, so make it
3732 2012-12-26 Akim Demaille <akim@lrde.epita.fr>
3734 tables: style changes
3735 * src/tables.c: Prefer < to >.
3736 Fix/complete some comments.
3737 Remove useless parens.
3739 2012-12-26 Akim Demaille <akim@lrde.epita.fr>
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.
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.
3751 squash! skeletons: no longer call yylex via a CPP macro
3753 2012-12-26 Akim Demaille <akim@lrde.epita.fr>
3755 YYLEX_PARAM: drop support
3756 * data/yacc.c, doc/bison.texi: Remove YYLEX_PARAM support.
3757 * NEWS: Document it.
3759 2012-12-26 Akim Demaille <akim@lrde.epita.fr>
3761 examples: minor improvements
3762 * examples/variant.yy: Don't use debug_stream(), obsoleted.
3765 2012-12-26 Akim Demaille <akim@lrde.epita.fr>
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_*.
3772 2012-12-26 Akim Demaille <akim@lrde.epita.fr>
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
3778 (b4_declare_yylstype): here.
3779 Separate the typedefs from the union/struct definitions.
3781 2012-12-26 Akim Demaille <akim@lrde.epita.fr>
3783 doc: update variant usage
3784 * doc/bison.texi, examples/variant.yy: Use "%define api.value.type variant",
3785 instead of "%define variant".
3787 2012-12-26 Akim Demaille <akim@lrde.epita.fr>
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.
3798 2012-12-23 Akim Demaille <akim@lrde.epita.fr>
3800 %define variables: support value changes in deprecation
3801 * src/muscle-tab.c (define_directive): Be robust to "assignment"
3803 (muscle_percent_variable_update): Upgrade "variant" to "api.value.type".
3804 Support such upgrade patterns.
3807 * data/bison.m4: Use api.value.type for variants.
3808 * tests/c++.at: Adjust tests.
3810 2012-12-23 Akim Demaille <akim@lrde.epita.fr>
3812 diagnostics: treat obsolete %define variable names as obsolete directives
3815 warning: deprecated %define variable name: 'namespace', use 'api.namespace' [-Wdeprecated]
3817 display (in -fno-caret mode):
3819 warning: deprecated directive: '%define namespace foo', use '%define api.namespace foo' [-Wdeprecated]
3821 and (in -fcaret mode):
3823 warning: deprecated directive, use '%define api.namespace toto' [-Wdeprecated]
3824 %define namespace toto
3827 This is in preparation of cases where not only the variable is
3828 renamed, but the values are too:
3830 warning: deprecated directive: '%define variant', use '%define api.value.type variant' [-Wdeprecated]
3832 * src/muscle-tab.c (define_directive): New.
3833 (muscle_percent_variable_update): Take the value as argument, and use it
3835 Loop with a pointer instead of an index.
3836 * tests/input.at (%define backward compatibility): Adjust.
3838 2012-12-23 Akim Demaille <akim@lrde.epita.fr>
3840 diagnostics: factor the deprecated directive message
3841 * src/complain.h, src/complain.c (deprecated_directive): New.
3842 * src/muscle-tab.c: Use it.
3844 2012-12-23 Akim Demaille <akim@lrde.epita.fr>
3846 variant: produce stable results
3847 Improve the output by ensuring a well defined order for type switches.
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.
3856 2012-12-23 Akim Demaille <akim@lrde.epita.fr>
3858 uniqstr: formatting changes
3859 * src/uniqstr.h: Sort functions by object type.
3861 2012-12-23 Akim Demaille <akim@lrde.epita.fr>
3863 skeletons: fix an error message
3864 * data/bison.m4 (b4_flag_if): Display the invalid value.
3866 2012-12-23 Akim Demaille <akim@lrde.epita.fr>
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.
3874 2012-12-23 Akim Demaille <akim@lrde.epita.fr>
3876 c++: comment changes
3877 * data/c++.m4, data/glr.cc, data/lalr1.cc: Convert some /* ... */
3880 2012-12-23 Akim Demaille <akim@lrde.epita.fr>
3882 c++: use // comments in the output
3883 This is mostly used for the license header, the synclines, and the
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_[];
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.
3900 2012-12-21 Akim Demaille <akim@lrde.epita.fr>
3902 maint: disable sc_prohibit_test_backticks
3905 Reported by Stefano Lattarini.
3907 2012-12-21 Akim Demaille <akim@lrde.epita.fr>
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).
3914 2012-12-21 Akim Demaille <akim@lrde.epita.fr>
3916 debug: no longer generate tabs
3917 * src/closure.c, src/derives.c, src/nullable.c, tests/sets.at: Use
3920 2012-12-21 Akim Demaille <akim@lrde.epita.fr>
3922 style changes: run cppi
3923 Run it in src/ for a start.
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.
3932 2012-12-21 Akim Demaille <akim@lrde.epita.fr>
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.
3938 2012-12-21 Akim Demaille <akim@lrde.epita.fr>
3940 tests: be robust to set -e.
3941 * examples/test (run): here.
3943 2012-12-19 Akim Demaille <akim@lrde.epita.fr>
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.
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.
3958 2012-12-19 Akim Demaille <akim@lrde.epita.fr>
3960 variant: more assertions
3961 Equip variants with more checking code. Provide a means to request
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.
3972 2012-12-19 Akim Demaille <akim@lrde.epita.fr>
3976 2012-12-19 Akim Demaille <akim@lrde.epita.fr>
3978 skeletons: fix output directives
3979 * data/lalr1.cc, data/location.cc, data/glr.cc: Use b4_output_begin.
3980 Broken during a merge.
3982 2012-12-19 Akim Demaille <akim@lrde.epita.fr>
3984 yacc.c: style changes
3985 * data/yacc.c (b4_lex_param): Provide arguments with a name.
3987 2012-12-19 Akim Demaille <akim@lrde.epita.fr>
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
3995 * data/glr.cc (b4_parse_param_wrap): New.
3998 2012-12-19 Akim Demaille <akim@lrde.epita.fr>
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.
4006 2012-12-19 Akim Demaille <akim@lrde.epita.fr>
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.
4012 2012-12-19 Akim Demaille <akim@lrde.epita.fr>
4014 %define variables: backward compatibility
4015 * src/muscle-tab.c (muscle_percent_variable_update): Accept lex_symbol.
4016 Reported by Roland Levillain.
4018 2012-12-16 Akim Demaille <akim@lrde.epita.fr>
4020 diagnostics: improve -fcaret for list of accepted values
4023 input.y:1.9-21: error: invalid value for %define variable 'api.push-pull': 'neither'
4024 %define api.push_pull "neither"
4026 input.y:1.9-21: accepted value: 'pull'
4027 %define api.push_pull "neither"
4029 input.y:1.9-21: accepted value: 'push'
4030 %define api.push_pull "neither"
4032 input.y:1.9-21: accepted value: 'both'
4033 %define api.push_pull "neither"
4038 input.y:1.9-21: error: invalid value for %define variable 'api.push-pull': 'neither'
4039 %define api.push_pull "neither"
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'
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.
4051 2012-12-16 Akim Demaille <akim@lrde.epita.fr>
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.
4057 2012-12-16 Akim Demaille <akim@lrde.epita.fr>
4059 tests: address syntax-check failures
4060 * cfg.mk: Ignore failures in timevar (uses GCC style configuration,
4062 * doc/local.mk: Space changes.
4063 * lib/main.c, tests/calc.at: Remove useless HAVE_ tests.
4065 2012-12-15 Akim Demaille <akim@lrde.epita.fr>
4067 remove duplicate definitions
4068 * src/system.h: here, inherited from a merge.
4070 2012-12-15 Akim Demaille <akim@lrde.epita.fr>
4072 tests: style changes
4073 * tests/glr-regression.at: Issue yyerror before yylex.
4075 2012-12-15 Akim Demaille <akim@lrde.epita.fr>
4077 doc: fix dependencies
4078 * doc/local.mk: here.
4080 2012-12-14 Akim Demaille <akim@lrde.epita.fr>
4083 * doc/bison.texi: Add a couple of missing @var and @code.
4085 2012-12-14 Theophile Ranquet <ranquet@lrde.epita.fr>
4087 doc: fix build dependencies
4088 Suggested by Nick Bowler
4089 <http://lists.gnu.org/archive/html/bug-automake/2012-12/msg00001.html>
4091 * doc/local.mk: Avoid overwriting Automake's rules.
4093 2012-12-14 Akim Demaille <akim@lrde.epita.fr>
4095 Merge branch 'origin/maint'
4097 maint: credit Wojciech Polak
4098 maint: post-release administrivia
4100 yacc.c: scope reduction
4101 tests: C90 compliance
4103 glr.c: scope reduction
4106 2012-12-14 Theophile Ranquet <ranquet@lrde.epita.fr>
4108 symtab: add missing initializations
4109 * src/symtab.c (semantic_type_new): Here.
4111 2012-12-14 Theophile Ranquet <ranquet@lrde.epita.fr>
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.
4118 2012-12-14 Theophile Ranquet <ranquet@lrde.epita.fr>
4120 tests: remove use of PARSE_PARAM
4121 * tests/header.at: Here.
4123 2012-12-13 Akim Demaille <akim@lrde.epita.fr>
4125 maint: credit Wojciech Polak
4126 * NEWS, THANKS: He is the author of XML support (including XSLTs).
4128 2012-12-12 Akim Demaille <akim@lrde.epita.fr>
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.
4135 2012-12-12 Akim Demaille <akim@lrde.epita.fr>
4138 * NEWS: Record release date.
4140 2012-12-12 Akim Demaille <akim@lrde.epita.fr>
4142 yacc.c: scope reduction
4143 * data/yacc.c (yysyntax_error): here.
4145 2012-12-12 Akim Demaille <akim@lrde.epita.fr>
4147 tests: C90 compliance
4148 * tests/synclines.at: here.
4150 2012-12-12 Akim Demaille <akim@lrde.epita.fr>
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
4156 Do not introduce variables after statements.
4157 Provide "main" with a return value.
4159 2012-12-12 Akim Demaille <akim@lrde.epita.fr>
4161 glr.c: scope reduction
4162 * data/glr.c (yyreportSyntaxError): Reduce the scope of yysize1 (now
4165 2012-12-12 Akim Demaille <akim@lrde.epita.fr>
4169 2012-12-10 Theophile Ranquet <ranquet@lrde.epita.fr>
4171 Merge remote-tracking branch '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
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
4188 build: keep -Wmissing-declarations and -Wmissing-prototypes for modern GCCs
4189 build: drop -Wcast-qual
4192 2012-12-09 Akim Demaille <akim@lrde.epita.fr>
4194 news: prepare for forthcoming release
4195 * NEWS: Fill paragraph.
4198 Remove line for 2.6.90.
4200 2012-12-09 Akim Demaille <akim@lrde.epita.fr>
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.
4207 2012-12-09 Akim Demaille <akim@lrde.epita.fr>
4209 error: use better locations for unused midrule values
4213 exp: {;} {$$;} { $$ = $1; }
4215 instead of reporting (with -fcaret -Wmidrule-value)
4217 midrule.y:2.6-8: warning: unset value: $$ [-Wmidrule-values]
4218 exp: {;} {$$;} { $$ = $1; }
4220 midrule.y:2.6-27: warning: unused value: $2 [-Wmidrule-values]
4221 exp: {;} {$$;} { $$ = $1; }
4222 ^^^^^^^^^^^^^^^^^^^^^^
4226 midrule.y:2.6-8: warning: unset value: $$
4227 exp: {;} {$$;} { $$ = $1; }
4229 midrule.y:2.10-14: warning: unused value: $2
4230 exp: {;} {$$;} { $$ = $1; }
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):
4239 * tests/input.at (Unused values with default %destructor): Ditto.
4240 (AT_CHECK_UNUSED_VALUES): Ditto.
4243 2012-12-09 Akim Demaille <akim@lrde.epita.fr>
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.
4261 2012-12-09 Akim Demaille <akim@lrde.epita.fr>
4263 tests: ignore more useless compiler warnings
4264 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore complains about
4265 using c++ to compile C.
4267 2012-12-09 Akim Demaille <akim@lrde.epita.fr>
4269 tests: be robust to C being compiled with a C++11 compiler
4270 * tests/glr-regression.at: Use YY_NULL instead of NULL.
4273 2012-12-09 Akim Demaille <akim@lrde.epita.fr>
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.
4286 2012-12-07 Akim Demaille <akim@lrde.epita.fr>
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.
4293 2012-12-07 Akim Demaille <akim@lrde.epita.fr>
4296 * NEWS: Record release date.
4298 2012-12-07 Akim Demaille <akim@lrde.epita.fr>
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).
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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4308 2012-12-07 Theophile Ranquet <ranquet@lrde.epita.fr>
4310 cpp: simplify the Flex version checking macro
4311 * src/flex-scanner,h (FLEX_VERSION): Consider YY_FLEX_SUBMINOR_VERSION
4314 2012-12-07 Theophile Ranquet <ranquet@lrde.epita.fr>
4316 news: improve the carets example and fix a typo
4319 2012-12-07 Theophile Ranquet <ranquet@lrde.epita.fr>
4321 cpp: improve the Flex version checking macro
4322 * src/flex-scanner.h (FLEX_VERSION): Here.
4324 2012-12-07 Theophile Ranquet <ranquet@lrde.epita.fr>
4326 carets: improve the code
4327 * src/location.c: Remove duplicate documentations.
4328 (caret_info): Stylistic change.
4329 (location_caret): Many reworks.
4331 2012-12-07 Akim Demaille <akim@lrde.epita.fr>
4334 * NEWS: There is no 2.6.6, remove its stub.
4336 2012-12-07 Akim Demaille <akim@lrde.epita.fr>
4338 build: keep -Wmissing-declarations and -Wmissing-prototypes for modern GCCs
4339 Fixes a -Werror failure of xalloc.h used in src.
4341 http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00006.html
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.
4347 2012-12-07 Akim Demaille <akim@lrde.epita.fr>
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.
4354 2012-12-07 Akim Demaille <akim@lrde.epita.fr>
4358 2012-12-06 Theophile Ranquet <ranquet@lrde.epita.fr>
4360 Merge remote-tracking branch '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
4369 getargs: add support for --flags/-f
4371 2012-12-06 Theophile Ranquet <ranquet@lrde.epita.fr>
4373 misc: pacify the Tiny C Compiler
4374 * src/graphviz.c (conclude_red): Remove a useless return.
4376 2012-12-05 Theophile Ranquet <ranquet@lrde.epita.fr>
4378 cpp: make the check of Flex version portable
4379 This was problematic with tcc 0.9.25
4381 * src/flex-scanner.h (FLEX_VERSION_GT): Rewrite and rename as...
4382 (FLEX_VERSION): This.
4384 2012-12-05 Theophile Ranquet <ranquet@lrde.epita.fr>
4386 misc: require getline
4387 * bootstrap.conf: Here, used by src/location.c.
4388 * src/getargs.c (long_options): Rename --flags to --feature.
4390 2012-12-05 Akim Demaille <akim@lrde.epita.fr>
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
4396 * data/location.cc (operator<<): Be templated on the type of
4398 * tests/headers.at (Several parsers): Adjust.
4400 2012-12-05 Theophile Ranquet <ranquet@lrde.epita.fr>
4402 doc: document carets
4403 * NEWS: Announce it.
4404 * doc/bison.texi (Bison Options): Here.
4406 2012-12-05 Theophile Ranquet <ranquet@lrde.epita.fr>
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.
4417 2012-12-05 Theophile Ranquet <ranquet@lrde.epita.fr>
4420 * src/locations.c (caret_info): New, persistant information useful
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.
4427 2012-12-05 Theophile Ranquet <ranquet@lrde.epita.fr>
4429 getargs: add support for --feature/-f
4430 Introduce -fdiagnostics-show-caret
4432 * src/getargs.c (feature_flag): New global.
4433 * src/getargs.h (feature): New enum.
4435 2012-12-05 Akim Demaille <akim@lrde.epita.fr>
4437 Merge remote-tracking branch '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
4443 2012-12-04 Theophile Ranquet <ranquet@lrde.epita.fr>
4445 getargs: don't label --language/-l as experimental
4446 * NEWS: Announce it.
4447 * doc/bison.texi, src/getargs.c (usage): Here.
4449 2012-12-03 Akim Demaille <akim@lrde.epita.fr>
4451 tests: minor improvements
4452 * tests/calc.at (AT_CHECK_SPACES): To speed up, accept several files
4453 at once, and factor some calls.
4455 2012-12-03 Theophile Ranquet <ranquet@lrde.epita.fr>
4457 getargs: fix the locations of command-line input
4458 * src/getargs.c (command_line_location): Here.
4459 * tests/input.at: Adjust.
4461 2012-12-03 Theophile Ranquet <ranquet@lrde.epita.fr>
4463 errors: indent missing action code semicolon warning
4464 Also, remove a duplicate #define.
4466 * src/scan-code.l (SC_RULE_ACTION): Here.
4467 * tests/actions.at: Adjust.
4469 2012-12-03 Akim Demaille <akim@lrde.epita.fr>
4471 Merge remote-tracking branch '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
4477 yacc.c, glr.c: check and fix the display of locations
4479 glr.c: remove stray macro
4481 2012-12-03 Akim Demaille <akim@lrde.epita.fr>
4483 parser: accept #line NUM
4484 * src/scan-gram.l (scanner): Accept '#line NUM'.
4485 (handle_syncline): Adjust to the possible missing file name.
4487 2012-12-03 Akim Demaille <akim@lrde.epita.fr>
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.
4495 Introduce begin/end macros which are easier to match that
4496 changecom()/changecom(#).
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:
4503 2012-12-03 Akim Demaille <akim@lrde.epita.fr>
4505 tests: beware of gnulib's need for config.h
4506 * tests/skeletons.at, tests/torture.at: Be sure to include config.h
4509 2012-11-30 Akim Demaille <akim@lrde.epita.fr>
4512 * lib/yyerror.c: Include config.h since the following stdio.h might be
4515 2012-11-30 Akim Demaille <akim@lrde.epita.fr>
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
4522 Reported by Jonathan Fabrizio.
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.
4529 2012-11-30 Akim Demaille <akim@lrde.epita.fr>
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.
4537 2012-11-30 Akim Demaille <akim@lrde.epita.fr>
4539 glr.c: remove stray macro
4540 * data/glr.c (YYOPTIONAL_LOC): Remove, unused since commit
4541 769a8ef9bcb5e14d0be9d0869f5dca20ab093930.
4543 2012-11-29 Akim Demaille <akim@lrde.epita.fr>
4545 Merge remote-tracking branch 'origin/maint'
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
4553 2012-11-29 Akim Demaille <akim@lrde.epita.fr>
4556 * doc/bison.texi: Use stderr for error messages.
4557 Meta-variables are usually spelled in lower case.
4558 Use @code for function names.
4560 2012-11-29 Akim Demaille <akim@lrde.epita.fr>
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.
4567 2012-11-29 Theophile Ranquet <ranquet@lrde.epita.fr>
4569 doc: introduce api.pure full, rearrange some examples
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'.
4576 2012-11-29 Theophile Ranquet <ranquet@lrde.epita.fr>
4578 yacc.c: support "%define api.pure full"
4579 This makes the interface for yyerror() pure without the need for a spurious
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.
4589 2012-11-28 Akim Demaille <akim@lrde.epita.fr>
4591 tests: check variants without locations
4592 * tests/c++.at (Variants): Support non-use of locations, and
4595 2012-11-26 Theophile Ranquet <ranquet@lrde.epita.fr>
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.
4602 2012-11-26 Akim Demaille <akim@lrde.epita.fr>
4604 tests: use -fno-strict-aliasing with variants
4605 Reported by Théophile Ranquet.
4607 * configure.ac (NO_STRICT_ALIAS_CXXFLAGS): New.
4608 * tests/c++.at, tests/atlocal.in, examples/local.mk: Use it.
4610 2012-11-26 Akim Demaille <akim@lrde.epita.fr>
4612 tests: remove leftover
4613 * tests/atlocal.in: Remove duplicate handling of --compile-c-with-cxx.
4615 2012-11-26 Akim Demaille <akim@lrde.epita.fr>
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.
4622 2012-11-26 Akim Demaille <akim@lrde.epita.fr>
4624 Merge remote-tracking branch '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
4635 2012-11-26 Akim Demaille <akim@lrde.epita.fr>
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
4645 2012-11-23 Theophile Ranquet <ranquet@lrde.epita.fr>
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.
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.
4661 2012-11-23 Akim Demaille <akim@lrde.epita.fr>
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.
4667 2012-11-23 Akim Demaille <akim@lrde.epita.fr>
4669 tests: formatting changes
4670 * tests/named-refs.at: Here.
4672 2012-11-23 Akim Demaille <akim@lrde.epita.fr>
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
4678 * doc/bison.texi (Reduce/Reduce): Fix the resulting ambiguity using
4679 precedence/associativity directives.
4681 2012-11-22 Akim Demaille <akim@lrde.epita.fr>
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.
4688 2012-11-22 Akim Demaille <akim@lrde.epita.fr>
4690 doc: prefer "token" to TOKEN
4691 This is more readable in short examples.
4693 * doc/bison.texi (Shift/Reduce): here.
4694 Make "win" and "lose" action more alike.
4696 2012-11-22 Akim Demaille <akim@lrde.epita.fr>
4698 doc: formatting changes
4699 * doc/bison.texi: Use @group.
4701 2012-11-14 Akim Demaille <akim@lrde.epita.fr>
4703 scanner: use explicit "ignore" statements
4704 * src/scan-gram.l: here.
4706 2012-11-13 Akim Demaille <akim@lrde.epita.fr>
4708 Merge remote-tracking branch '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
4715 output: capitalize State
4717 2012-11-12 Theophile Ranquet <ranquet@lrde.epita.fr>
4719 tests: close files in glr-regression
4720 * tests/glr-regression.at: Here.
4722 2012-11-12 Theophile Ranquet <ranquet@lrde.epita.fr>
4724 xml: match DOT output and xml2dot.xsl processing
4725 Make the DOT produced by XSLT processing equivalent to the one made with the
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
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.
4738 2012-11-12 Theophile Ranquet <ranquet@lrde.epita.fr>
4740 xml: factor xslt space template
4741 * data/xslt/bison.xsl (space): New, import from...
4742 * data/xslt/xml2text.xsl: Here.
4744 2012-11-12 Theophile Ranquet <ranquet@lrde.epita.fr>
4746 graph: fix a memory leak
4747 * src/graphviz.c (output_red): Here.
4749 2012-11-12 Theophile Ranquet <ranquet@lrde.epita.fr>
4752 The XML output combined with the XSL Transformations provided in data/ are
4753 incredibly useful, they should be documented.
4755 * doc/bison.texi (Xml): New node.
4757 2012-11-12 Theophile Ranquet <ranquet@lrde.epita.fr>
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.
4764 2012-11-12 Akim Demaille <akim@lrde.epita.fr>
4766 tests: fix syntax-check errors
4767 Reported by Théophile Ranquet.
4769 * tests/c++.at: Use AT_PARSER_CHECK.
4770 Avoid using "strcmp", which triggers an error from syntax-check.
4772 2012-11-12 Akim Demaille <akim@lrde.epita.fr>
4774 Merge remote-tracking branch '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"
4782 2012-11-12 Akim Demaille <akim@lrde.epita.fr>
4784 maint: address syntax-check errors.
4785 * cfg.mk: Ignore the "error" call in tests/c++.at, it is not to be
4787 * doc/bison.texi: Fix incorrect @pxref use.
4788 * po/POTFILES.in: Add missing file.
4789 * src/print_graph.c: Remove useless include.
4791 2012-11-12 Akim Demaille <akim@lrde.epita.fr>
4793 tests: use valgrind where appropriate
4794 Reported by Théophile Ranquet.
4796 * cfg.mk (sc_at_parser_check): New.
4797 * tests/c++.at: Fix use of AT_CHECK vs. AT_PARSER_CHECK.
4799 2012-11-12 Akim Demaille <akim@lrde.epita.fr>
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
4806 2012-11-10 Akim Demaille <akim@lrde.epita.fr>
4808 tests: use valgrind where appropriate
4809 Reported by Théophile Ranquet.
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.
4816 2012-11-08 Akim Demaille <akim@lrde.epita.fr>
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.
4825 2012-11-08 Akim Demaille <akim@lrde.epita.fr>
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.
4831 2012-11-08 Akim Demaille <akim@lrde.epita.fr>
4835 2012-11-08 Akim Demaille <akim@lrde.epita.fr>
4837 Merge branch 'maint'
4840 maint: post-release administrivia
4844 tests: beware of compilers that do not support POSIXLY_CORRECT
4847 2012-11-08 Akim Demaille <akim@lrde.epita.fr>
4851 2012-11-08 Akim Demaille <akim@lrde.epita.fr>
4853 Merge branch 'branch-2.6' into maint
4854 * origin/branch-2.6:
4855 maint: post-release administrivia
4859 tests: beware of compilers that do not support POSIXLY_CORRECT
4862 2012-11-07 Akim Demaille <akim@lrde.epita.fr>
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.
4869 2012-11-07 Akim Demaille <akim@lrde.epita.fr>
4872 * NEWS: Record release date.
4874 2012-11-07 Akim Demaille <akim@lrde.epita.fr>
4878 2012-11-07 Akim Demaille <akim@lrde.epita.fr>
4881 * tests/actions.at: Fix typo.
4883 2012-11-07 Akim Demaille <akim@lrde.epita.fr>
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
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
4897 (AT_QUELL_VALGRIND): Skip tests that cannot work because of compilers
4898 that do not support POSIXLY_CORRECT.
4900 2012-11-07 Akim Demaille <akim@lrde.epita.fr>
4904 2012-11-06 Akim Demaille <akim@lrde.epita.fr>
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
4924 tests: cosmetic changes
4930 2012-11-06 Akim Demaille <akim@lrde.epita.fr>
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
4950 tests: cosmetic changes
4956 2012-11-06 Akim Demaille <akim@lrde.epita.fr>
4958 tests: calc: modernize the use of locations
4959 * tests/calc.at: Don't initialize the location, let the parser
4962 Change some testing input to be easier to distinguish (instead of always
4963 "0 0" for instance).
4965 2012-11-06 Akim Demaille <akim@lrde.epita.fr>
4967 tests: remove useless location initializations
4968 * tests/actions.at, tests/calc.at: here.
4970 2012-11-06 Akim Demaille <akim@lrde.epita.fr>
4972 lalr1.cc: always initialize yylval.
4973 * data/lalr1.cc: here.
4975 2012-11-06 Akim Demaille <akim@lrde.epita.fr>
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.
4981 2012-11-06 Akim Demaille <akim@lrde.epita.fr>
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.
4987 2012-11-06 Akim Demaille <akim@lrde.epita.fr>
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
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
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
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.
5018 2012-11-06 Akim Demaille <akim@lrde.epita.fr>
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"
5026 * tests/local.at, data/glr.c, data/yacc.c: Use it instead of duplicating.
5027 * tests/actions.at: Adjust expectations.
5029 2012-11-06 Akim Demaille <akim@lrde.epita.fr>
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).
5036 2012-11-05 Akim Demaille <akim@lrde.epita.fr>
5038 doc: formatting changes
5039 * doc/bison.texi: In a pointer type.
5041 2012-11-05 Akim Demaille <akim@lrde.epita.fr>
5043 c++: fix position operator signatures
5044 * data/location.cc (operator+=, operator-=): Remove const from return
5047 2012-11-05 Akim Demaille <akim@lrde.epita.fr>
5049 tests: remove useless location initialization.
5050 * tests/glr-regression.at: here.
5051 glr.c does initialize yylloc.
5053 2012-11-05 Akim Demaille <akim@lrde.epita.fr>
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.
5060 2012-11-05 Akim Demaille <akim@lrde.epita.fr>
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
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.
5070 2012-11-05 Akim Demaille <akim@lrde.epita.fr>
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 @$.
5077 2012-11-01 Akim Demaille <akim@lrde.epita.fr>
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.
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...
5094 And undef when done.
5096 2012-11-01 Akim Demaille <akim@lrde.epita.fr>
5098 examples: simplify/improve
5099 * examples/variant.yy: Put yylex in yy::, and simplify accordingly.
5100 Minor formatting changes.
5102 2012-11-01 Akim Demaille <akim@lrde.epita.fr>
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.
5108 2012-11-01 Akim Demaille <akim@lrde.epita.fr>
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
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.
5119 2012-11-01 Akim Demaille <akim@lrde.epita.fr>
5122 * tests/regression.at (Invalid inputs, Invalid inputs with {}): Move to...
5123 * tests/input.at: here, for consistency.
5125 2012-11-01 Akim Demaille <akim@lrde.epita.fr>
5127 tests: cosmetic changes
5128 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): Improve the
5131 2012-11-01 Akim Demaille <akim@lrde.epita.fr>
5134 * data/lalr1.cc: here.
5136 2012-11-01 Akim Demaille <akim@lrde.epita.fr>
5139 There are comment changes only in the files we use.
5141 2012-11-01 Akim Demaille <akim@lrde.epita.fr>
5145 2012-10-28 Akim Demaille <akim@lrde.epita.fr>
5149 2012-10-28 Akim Demaille <akim@lrde.epita.fr>
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
5159 http://lists.gnu.org/archive/html/bison-patches/2012-10/msg00133.html
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.
5169 2012-10-26 Theophile Ranquet <ranquet@lrde.epita.fr>
5171 graphs: fix spacing refactoring
5172 * src/print_graph.c (print_lhs, print_core): Here.
5174 2012-10-26 Theophile Ranquet <ranquet@lrde.epita.fr>
5176 tests: make deprecation tests more specific
5177 * tests/input.at (Deprecated directives): Here, don't generate unrelated errors
5180 2012-10-26 Theophile Ranquet <ranquet@lrde.epita.fr>
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.
5186 2012-10-26 Theophile Ranquet <ranquet@lrde.epita.fr>
5188 scan-skel.l: consider m4 notes as related to "complaint" errors
5189 * src/scan-skel.l (flag): Here.
5191 2012-10-26 Theophile Ranquet <ranquet@lrde.epita.fr>
5193 warnings: distinguish context information based on warning type
5194 * src/scan-code.l (show_sub_message, show_sub_messages): Take a new warnings
5197 2012-10-26 Theophile Ranquet <ranquet@lrde.epita.fr>
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.
5203 Also, fix a bug that caused some context information of errors to not be
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.
5213 2012-10-26 Theophile Ranquet <ranquet@lrde.epita.fr>
5215 tests: reindent for legibility
5216 * tests/local.at (AT_BISON_CHECK_WARNINGS_): Here.
5218 2012-10-26 Akim Demaille <akim@lrde.epita.fr>
5220 build: fix Texinfo compilation
5221 * doc/local.mk: fix dependencies.
5223 2012-10-26 Akim Demaille <akim@lrde.epita.fr>
5227 2012-10-26 Akim Demaille <akim@lrde.epita.fr>
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
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
5240 parse-gram: update the Bison interface
5242 maint: post-release administrivia
5245 2.6.4: botched 2.6.3
5246 maint: post-release administrivia
5249 tests: check %no-lines
5250 NEWS: warnings with clang
5253 2012-10-26 Akim Demaille <akim@lrde.epita.fr>
5255 Merge branch 'branch-2.6' into maint
5256 * origin/branch-2.6:
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
5264 parse-gram: update the Bison interface
5267 2012-10-26 Akim Demaille <akim@lrde.epita.fr>
5269 doc: minor style change
5270 * doc/figs/example-reduce.txt: here.
5272 2012-10-26 Akim Demaille <akim@lrde.epita.fr>
5274 maint: use gendocs's new -I option
5275 * gnulib: Update gendocs.
5276 * cfg.mk (gendocs_options_): New.
5278 2012-10-26 Akim Demaille <akim@lrde.epita.fr>
5282 2012-10-26 Akim Demaille <akim@lrde.epita.fr>
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
5288 * data/yacc.c (b4_declare_scanner_communication_variables): 4.7
5291 2012-10-26 Akim Demaille <akim@lrde.epita.fr>
5295 2012-10-26 Akim Demaille <akim@lrde.epita.fr>
5297 yacc.c: do not define location support when not using locations
5298 * data/yacc.c (YYLLOC_DEFAULT, YYRHSLOC): Don't define when not
5301 2012-10-26 Akim Demaille <akim@lrde.epita.fr>
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):
5308 In file included from src/LR0.c:38:
5309 src/reader.h:56: warning: declaration of 'named_ref' shadows a
5311 src/named-ref.h:35: warning: shadowed declaration is here
5313 It does not like either when a global variable name is used in a
5314 prototype. Flex 2.5.37 generates this prototype:
5316 void gram_set_debug (int debug_flag );
5318 * src/getargs.h, src/getargs.c (debug_flag): Rename as...
5320 Adjust dependencies.
5321 * src/reader.h: Don't use "named_ref" as a formal argument name.
5323 2012-10-26 Theophile Ranquet <ranquet@lrde.epita.fr>
5325 misc: document TESTSUITEFLAGS in README-hacking
5326 * README-hacking: Document -j and -k flags.
5328 2012-10-26 Theophile Ranquet <ranquet@lrde.epita.fr>
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.
5334 2012-10-25 Akim Demaille <akim@lrde.epita.fr>
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
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
5345 * tests/torture.at (AT_DATA_STACK_TORTURE): Initial status to avoid
5348 2012-10-25 Akim Demaille <akim@lrde.epita.fr>
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.
5354 2012-10-25 Akim Demaille <akim@lrde.epita.fr>
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.
5361 Reported by the Hydra build farm, from Rob Vermaas.
5363 * tests/local.at (AT_BISON_CHECK_WARNINGS_): Check the envvar
5364 POSIXLY_CORRECT, not the shell variable.
5366 2012-10-25 Akim Demaille <akim@lrde.epita.fr>
5370 2012-10-25 Akim Demaille <akim@lrde.epita.fr>
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.
5377 2012-10-25 Akim Demaille <akim@lrde.epita.fr>
5380 * data/c.m4 (b4_YYDEBUG_define): here.
5382 2012-10-24 Theophile Ranquet <ranquet@lrde.epita.fr>
5386 2012-10-24 Theophile Ranquet <ranquet@lrde.epita.fr>
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.
5393 2012-10-23 Akim Demaille <akim@lrde.epita.fr>
5395 Merge branch 'branch-2.6' into maint
5396 * origin/branch-2.6:
5397 maint: post-release administrivia
5400 2.6.4: botched 2.6.3
5402 2012-10-23 Akim Demaille <akim@lrde.epita.fr>
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.
5409 2012-10-23 Akim Demaille <akim@lrde.epita.fr>
5412 * NEWS: Record release date.
5414 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
5418 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
5420 2.6.4: botched 2.6.3
5423 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
5425 Merge branch '2.6.3' into maint
5426 * 2.6.3: (22 commits)
5427 maint: post-release administrivia
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
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
5449 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
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.
5456 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
5459 * NEWS: Record release date.
5461 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
5465 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
5467 tests: check %no-lines
5468 * tests/synclines.at: here.
5470 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
5472 NEWS: warnings with clang
5475 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
5477 warnings: avoid warnings from clang
5478 Fix the following warning
5480 parse-gram.c:2078:14: error: equality comparison with extraneous parentheses
5481 [-Werror,-Wparentheses-equality]
5482 if (((yyn) == (-91)))
5484 parse-gram.c:2078:14: note: remove extraneous parentheses around the
5485 comparison to silence this warning
5486 if (((yyn) == (-91)))
5488 parse-gram.c:2078:14: note: use '=' to turn this equality comparison into
5490 if (((yyn) == (-91)))
5495 and the following one:
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__));
5502 yyMemoryExhausted (yyGLRStack* yystackp)
5504 YYLONGJMP (yystackp->yyexception_buffer, 2);
5507 1 warning and 1 error generated.
5509 This is Apple clang version 3.1 (tags/Apple/clang-318.0.61).
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.
5517 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
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
5526 * tests/atlocal.in (O0CFLAGS, O0CXXFLAGS): Remove, use CFLAGS and
5529 2012-10-22 Paul Eggert <eggert@cs.ucla.edu>
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).
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.
5539 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
5541 skeletons: style changes
5542 * data/yacc.c, data/glr.c: Prefer Title case for (CPP) macro arguments.
5544 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
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.
5551 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
5553 tests: use $PERL instead of perl
5554 * tests/atlocal.in (PERL): New.
5556 * tests/calc.at, tests/input.at, tests/local.at, tests/regression.at,
5557 * tests/skeletons.at, tests/synclines.at, tests/torture.at: here.
5559 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
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.
5566 * configure.ac (PERL): New.
5567 * doc/Doxyfile.in, doc/Makefile.am, tests/bison.in: Use it.
5569 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
5571 tests: fix sed portability issues
5572 Reported by Didier Godefroy,
5573 <http://lists.gnu.org/archive/html/bug-bison/2012-10/msg00005.html>.
5575 * tests/calc.at (AT_CHECK_SPACES): Use Perl.
5577 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
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>.
5583 * tests/existing.at (AT_LALR1_DIFF_CHECK): Skip if diff -u does not
5586 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
5589 * README-hacking (Typical errors): Improve wording.
5591 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
5593 lalr1.cc: fix test suite portability
5594 Reported by Rob Vermaas' Hydra build farm on x86_64-darwin 10.2.0 with
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.
5603 2012-10-22 Theophile Ranquet <theophile.ranquet@gmail.com>
5605 maint: fix an erroneous include
5606 This fixes test 130 (Several parsers).
5608 * data/location.cc: Include <iostream> rather than <iosfwd> since
5609 we really need << on strings for instance.
5610 * NEWS: Document this.
5612 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
5614 tests: check that headers are self contained
5615 Reported by Alexandre Duret-Lutz.
5617 * tests/headers.at (Several parsers): here.
5619 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
5621 doc: add missing documentation for --report
5622 * doc/bison.texi (Bison Options): Document --report's "solved", "all",
5625 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
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>.
5630 * data/c.m4 (b4_cpp_guard): Prepend YY_ and append _INCLUDED.
5631 * tests/headers.at: Adjust.
5632 * NEWS, doc/bison.texi: Document.
5634 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
5637 * NEWS: Word changes.
5638 * doc/bison.texi: Spell check.
5640 * tests/headers.at: Comment and formatting changes.
5642 2012-10-22 Akim Demaille <akim@lrde.epita.fr>
5646 2012-10-19 Akim Demaille <akim@lrde.epita.fr>
5650 2012-10-19 Akim Demaille <akim@lrde.epita.fr>
5652 xml: slight improvement of the DOT output
5653 This was completely forgotten... Nothing about XML is actually
5656 * data/xslt/xml2dot.xsl: Use boxes, and Courier font.
5658 2012-10-19 Akim Demaille <akim@lrde.epita.fr>
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.
5665 2012-10-18 Theophile Ranquet <theophile.ranquet@gmail.com>
5667 graphs: documentation
5668 Note that 'make web-manual' fails.
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.
5678 2012-10-18 Theophile Ranquet <theophile.ranquet@gmail.com>
5680 graphs: add tests, introducing -k graph
5681 * tests/output.at (AT_TEST): New.
5682 Use it to add 6 --graph tests.
5684 2012-10-18 Theophile Ranquet <theophile.ranquet@gmail.com>
5686 graphs: change the output format of the rules
5687 Use something similar to the report file.
5689 * src/print_graph.c (print_lhs): New, obstack equivalent of rule_lhs_print.
5690 (print_core): Use here.
5692 2012-10-18 Theophile Ranquet <theophile.ranquet@gmail.com>
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,
5703 (print_actions): Style, move a declaration.
5705 2012-10-18 Theophile Ranquet <theophile.ranquet@gmail.com>
5707 graphs: address an issue with R/R conflicts
5708 All disabled reductions should now be shown as such.
5710 * src/graphviz.c (output_red): Here.
5711 (conclude_red): New.
5713 2012-10-16 Akim Demaille <akim@lrde.epita.fr>
5718 2012-10-16 Akim Demaille <akim@lrde.epita.fr>
5720 Merge branch 'maint'
5722 java: use api.location.type and api.position.type
5724 2012-10-16 Akim Demaille <akim@lrde.epita.fr>
5726 variables: use singular in %define variable names
5727 See http://lists.gnu.org/archive/html/bison-patches/2012-02/msg00045.html
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/.
5736 2012-10-16 Akim Demaille <akim@lrde.epita.fr>
5739 * data/java.m4: Remove stray M4 characters.
5741 2012-10-16 Akim Demaille <akim@lrde.epita.fr>
5743 api.tokens.prefix -> api.token.prefix
5745 http://lists.gnu.org/archive/html/bison-patches/2012-02/msg00045.html
5746 Note that api.tokens.prefix has not been released, yet.
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.
5753 2012-10-15 Theophile Ranquet <theophile.ranquet@gmail.com>
5755 scan-skel.l: shift complain_args arguments
5756 Because argv[0] is never used, shift it out from the argument list.
5758 * src/complain.c (complain_args): Here.
5759 * src/scan-skel.l (at_complain): Adjust argv and argc.
5761 2012-10-15 Theophile Ranquet <theophile.ranquet@gmail.com>
5763 scan-skel.l: formatting changes
5764 * src/scan-skel.l (fail_for_at_directive_too_few_args): Here.
5766 2012-10-12 Akim Demaille <akim@lrde.epita.fr>
5768 java: use api.location.type and api.position.type
5769 * data/java.m4: here.
5770 * NEWS, doc/bison.texi, tests/java.at: Adjust.
5772 2012-10-12 Akim Demaille <akim@lrde.epita.fr>
5774 Merge branch '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
5789 2012-10-12 Akim Demaille <akim@lrde.epita.fr>
5791 tests: check %no-lines
5792 * tests/synclines.at: here.
5794 2012-10-12 Akim Demaille <akim@lrde.epita.fr>
5796 tests: minor simplification
5797 * tests/headers.at (Several parsers): Use *.y even for C++.
5799 2012-10-11 Akim Demaille <akim@lrde.epita.fr>
5801 graphs: stylistic changes.
5802 * src/graphviz.c (output_red): Comment and formatting changes.
5804 2012-10-11 Theophile Ranquet <ranquet@lrde.epita.fr>
5806 graphs: minor style changes
5807 * src/graphviz.c (output_red): Fix C90 issues.
5808 Reduce variable scopes.
5810 2012-10-11 Theophile Ranquet <ranquet@lrde.epita.fr>
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
5819 * src/graphviz.h : Adjust.
5820 * src/print_graph.c (print_actions): Call output_red here.
5822 2012-10-11 Theophile Ranquet <theophile.ranquet@gmail.com>
5824 graphs: style: prefix state number with "state"
5825 * src/print_graph.c (print_core): Here.
5827 2012-10-11 Theophile Ranquet <ranquet@lrde.epita.fr>
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'
5835 In order to allow \l in the DOT file, changes to the quoting system seem
5838 * src/print_graph.c (print_core): Escape tokens here, instead of...
5839 * src/graphviz.c (output_node): Here...
5840 (escape): Using this, new.
5842 2012-10-11 Theophile Ranquet <theophile.ranquet@gmail.com>
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.
5848 2012-10-11 Theophile Ranquet <theophile.ranquet@gmail.com>
5850 obstack: import obstack_finish0 from master
5851 * src/system.h (obstack_finish0): New.
5853 2012-10-11 Akim Demaille <akim@lrde.epita.fr>
5855 Merge branch '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
5876 2012-10-09 Akim Demaille <akim@lrde.epita.fr>
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
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
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.
5895 2012-10-09 Akim Demaille <akim@lrde.epita.fr>
5897 muscles: a function for backward compatibility
5898 Based on commit 171ad99d6421935a278656be6dc7161591835d00 from master.
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.
5904 2012-10-09 Akim Demaille <akim@lrde.epita.fr>
5907 * src/output.c (ARRAY_CARDINALITY): Move to...
5908 * src/system.h: here.
5909 (STREQ, STRNEQ): new.
5911 2012-10-08 Akim Demaille <akim@lrde.epita.fr>
5913 NEWS: warnings with clang
5916 2012-10-08 Akim Demaille <akim@lrde.epita.fr>
5918 warnings: avoid warnings from clang
5919 Fix the following warning
5921 parse-gram.c:2078:14: error: equality comparison with extraneous parentheses
5922 [-Werror,-Wparentheses-equality]
5923 if (((yyn) == (-91)))
5925 parse-gram.c:2078:14: note: remove extraneous parentheses around the
5926 comparison to silence this warning
5927 if (((yyn) == (-91)))
5929 parse-gram.c:2078:14: note: use '=' to turn this equality comparison into
5931 if (((yyn) == (-91)))
5936 and the following one:
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__));
5943 yyMemoryExhausted (yyGLRStack* yystackp)
5945 YYLONGJMP (yystackp->yyexception_buffer, 2);
5948 1 warning and 1 error generated.
5950 This is Apple clang version 3.1 (tags/Apple/clang-318.0.61).
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.
5958 2012-10-08 Akim Demaille <akim@lrde.epita.fr>
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
5967 * tests/atlocal.in (O0CFLAGS, O0CXXFLAGS): Remove, use CFLAGS and
5970 2012-10-08 Paul Eggert <eggert@cs.ucla.edu>
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).
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.
5980 2012-10-08 Akim Demaille <akim@lrde.epita.fr>
5982 skeletons: style changes
5983 * data/yacc.c, data/glr.c: Prefer Title case for (CPP) macro arguments.
5985 2012-10-06 Akim Demaille <akim@lrde.epita.fr>
5987 lalr1.cc: document exception safety
5989 * doc/bison.texi (Destructor Decl, C++ Parser Interface): and there.
5991 2012-10-06 Akim Demaille <akim@lrde.epita.fr>
5993 lalr1.cc: check exception safety of error handling
5994 * tests/c++.at (Exception safety): Don't use swap here, it
5996 Cover more test cases: yyerror, YYERROR, YYABORT, and
5998 (Object): Instead of just keeping a counter of instances, keep
6001 2012-10-06 Akim Demaille <akim@lrde.epita.fr>
6003 lalr1.cc: check (and fix) %printer exception safety
6004 * tests/c++.at (Exception safety): Let the parser support the --debug
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.
6010 2012-10-06 Akim Demaille <akim@lrde.epita.fr>
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
6018 2012-10-06 Akim Demaille <akim@lrde.epita.fr>
6020 lalr1.cc: fix exception safety
6021 lalr1.cc does not reclaim its memory when ended by an exception.
6023 Reported by Oleksii Taran:
6024 http://lists.gnu.org/archive/html/help-bison/2012-09/msg00000.html
6026 * data/lalr1.cc (yyparse): Protect the whole yyparse by a try-catch
6027 block that cleans the stack and the lookahead.
6029 2012-10-06 Akim Demaille <akim@lrde.epita.fr>
6031 lalr1.cc: check exception safety.
6032 * tests/c++.at (Exception safety): New.
6034 2012-10-06 Akim Demaille <akim@lrde.epita.fr>
6036 lalr1.cc: indentation fixes.
6037 * data/lalr1.cc (yyparse): here.
6038 Untabify a block of code.
6040 2012-10-06 Akim Demaille <akim@lrde.epita.fr>
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.
6047 2012-10-06 Akim Demaille <akim@lrde.epita.fr>
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.
6054 2012-10-05 Akim Demaille <akim@lrde.epita.fr>
6056 tests: use $PERL instead of perl
6057 * tests/atlocal.in (PERL): New.
6059 * tests/calc.at, tests/input.at, tests/local.at, tests/regression.at,
6060 * tests/skeletons.at, tests/synclines.at, tests/torture.at: here.
6062 2012-10-05 Akim Demaille <akim@lrde.epita.fr>
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.
6069 * configure.ac (PERL): New.
6070 * doc/Doxyfile.in, doc/Makefile.am, tests/bison.in: Use it.
6072 2012-10-05 Akim Demaille <akim@lrde.epita.fr>
6074 tests: fix sed portability issues
6075 Reported by Didier Godefroy,
6076 <http://lists.gnu.org/archive/html/bug-bison/2012-10/msg00005.html>.
6078 * tests/calc.at (AT_CHECK_SPACES): Use Perl.
6080 2012-10-05 Akim Demaille <akim@lrde.epita.fr>
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>.
6086 * tests/existing.at (AT_LALR1_DIFF_CHECK): Skip if diff -u does not
6089 2012-10-04 Akim Demaille <akim@lrde.epita.fr>
6091 Merge branch 'maint'
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
6099 2012-10-04 Akim Demaille <akim@lrde.epita.fr>
6101 scan-skel: use the scanner to reject all invalid directives
6102 * src/scan-skel.l: Use a simpler and more consistent pattern escaping
6104 Catch all the invalid directives here by just removing the previous
6105 catch-all-but-alphabetical rule.
6107 2012-10-04 Theophile Ranquet <theophile.ranquet@gmail.com>
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.
6116 2012-10-04 Theophile Ranquet <theophile.ranquet@gmail.com>
6118 scan-skel: split @directive functions
6119 * src/scan-skel.l (at_directive_perform): Split as...
6120 (at_basename, at_complain, at_output): these.
6122 2012-10-04 Theophile Ranquet <theophile.ranquet@gmail.com>
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.
6134 2012-10-04 Theophile Ranquet <theophile.ranquet@gmail.com>
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.
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.
6144 2012-10-04 Theophile Ranquet <theophile.ranquet@gmail.com>
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.
6152 2012-10-04 Akim Demaille <akim@lrde.epita.fr>
6155 * README-hacking (Typical errors): Improve wording.
6157 2012-10-04 Akim Demaille <akim@lrde.epita.fr>
6159 lalr1.cc: fix test suite portability
6160 Reported by Rob Vermaas' Hydra build farm on x86_64-darwin 10.2.0 with
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.
6169 2012-10-03 Theophile Ranquet <theophile.ranquet@gmail.com>
6171 maint: fix an erroneous include
6172 This fixes test 130 (Several parsers).
6174 * data/location.cc: Include <iostream> rather than <iosfwd> since
6175 we really need << on strings for instance.
6176 * NEWS: Document this.
6178 2012-10-03 Akim Demaille <akim@lrde.epita.fr>
6180 tests: check that headers are self contained
6181 Reported by Alexandre Duret-Lutz.
6183 * tests/headers.at (Several parsers): here.
6185 2012-10-03 Akim Demaille <akim@lrde.epita.fr>
6187 doc: add missing documentation for --report
6188 * doc/bison.texi (Bison Options): Document --report's "solved", "all",
6191 2012-10-01 Akim Demaille <akim@lrde.epita.fr>
6193 build: use gnulib's non-recursive-gnulib-prefix-hack
6194 Suggested by Jim Meyering.
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.
6200 2012-10-01 Akim Demaille <akim@lrde.epita.fr>
6202 warnings: simplify the m4 interface
6203 * data/bison.m4 (error_at): Replace...
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.
6209 2012-10-01 Theophile Ranquet <theophile.ranquet@gmail.com>
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.
6215 * src/getargs.c (flag_argmatch): New, taken from...
6216 (flags_argmatch): Here.
6218 2012-10-01 Theophile Ranquet <theophile.ranquet@gmail.com>
6220 warnings: refactoring
6221 The code here was too confusing, this seems more natural.
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.
6227 2012-10-01 Theophile Ranquet <theophile.ranquet@gmail.com>
6230 * src/complain.c: Here.
6232 2012-10-01 Theophile Ranquet <theophile.ranquet@gmail.com>
6234 warnings: organize variadic complaints call
6235 Move the dispatch of variadic complains to complain.c, rather than do
6238 * src/complain.h, src/complain.c (complain_args): New.
6239 * src/scan-skel.l (at_directive_perform): Use it.
6241 2012-10-01 Theophile Ranquet <theophile.ranquet@gmail.com>
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.
6247 This impacts 89 calls.
6249 * src/bootstrap.conf: Adjust.
6250 * src/complain.c (complain, complain_at): Merge into...
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:
6259 2012-10-01 Theophile Ranquet <theophile.ranquet@gmail.com>
6261 warnings: remove spurious suffixes on context
6262 Rectify a bug that introduced suffixes out of place.
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.
6268 2012-10-01 Akim Demaille <akim@lrde.epita.fr>
6270 Merge remote-tracking branch 'origin/maint'
6272 headers: move CPP guards into YY_*_INCLUDED to avoid collisions
6275 2012-10-01 Akim Demaille <akim@lrde.epita.fr>
6277 Merge remote-tracking branch 'origin/maint'
6280 errors: indent "user token number redeclaration" context
6282 2012-10-01 Akim Demaille <akim@lrde.epita.fr>
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>.
6287 * data/c.m4 (b4_cpp_guard): Prepend YY_ and append _INCLUDED.
6288 * tests/headers.at: Adjust.
6289 * NEWS, doc/bison.texi: Document.
6291 2012-10-01 Akim Demaille <akim@lrde.epita.fr>
6294 * NEWS: Word changes.
6295 * doc/bison.texi: Spell check.
6297 * tests/headers.at: Comment and formatting changes.
6299 2012-09-28 Akim Demaille <akim@lrde.epita.fr>
6303 2012-09-28 Theophile Ranquet <theophile.ranquet@gmail.com>
6305 errors: indent "user token number redeclaration" context
6306 This is the continuation of the work on the readability of errors
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.
6313 2012-09-27 Theophile Ranquet <theophile.ranquet@gmail.com>
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.
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...
6326 * src/complains.h: Adjust.
6327 * tests/input.at: Adjust.
6328 * NEWS: Document this change.
6330 2012-09-27 Akim Demaille <akim@lrde.epita.fr>
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.
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]
6341 bison: warnings being treated as errors
6342 input.y:1.1: error: stray ',' treated as white space [-Werror=other]
6344 The line "warnings being treated as errors" no longer adds any info,
6345 it will be removed in a forthcoming change.
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.
6355 2012-09-27 Theophile Ranquet <theophile.ranquet@gmail.com>
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
6362 If no category is specified (ie: used as simply "-Werror"), the
6363 functionality is the same as before.
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.
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.
6377 2012-09-26 Akim Demaille <akim@lrde.epita.fr>
6379 Merge branch '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
6388 2012-09-26 Theophile Ranquet <ranquet@lrde.epita.fr>
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.
6394 * src/getargs.c (usage): Insert here.
6396 2012-09-26 Akim Demaille <akim@lrde.epita.fr>
6400 2012-09-26 Akim Demaille <akim@lrde.epita.fr>
6402 Merge remote-tracking branch 'origin/maint'
6405 yacc: fix handling of CPP guards when no header is generated
6408 2012-09-26 Theophile Ranquet <ranquet@lrde.epita.fr>
6410 errors: prefix the output with "error: "
6411 This improves readability. This is also what gcc does.
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.
6421 2012-09-26 Theophile Ranquet <ranquet@lrde.epita.fr>
6423 errors: indent "invalid value for %define" context
6424 This is the continuation of the work on the readability of errors
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'
6432 input.y:1.9-29: invalid value for %define variable 'foo' : 'bar'
6433 input.y:1.9-29: accepted value: 'most'
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.
6439 2012-09-26 Theophile Ranquet <ranquet@lrde.epita.fr>
6441 errors: indent "%define var" redefinition context
6442 This is the continuation of the work on the readability of errors
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
6450 input.y:2.9-11: %define variable 'var' redefined
6451 input.y:1.9-11: previous definition
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.
6457 2012-09-26 Theophile Ranquet <ranquet@lrde.epita.fr>
6459 errors: indent "symbol redeclaration" context
6460 This is the continuation of the work on the readability of errors
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
6468 input.y:5.10-24: %printer redeclaration for <field2>
6469 input.y:3.11-25: previous declaration
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.
6479 2012-09-26 Theophile Ranquet <ranquet@lrde.epita.fr>
6481 errors: indent "result type clash" error context
6482 This used to be the format of the error report:
6484 input.y:6.5-10: result type clash on merge function 'merge': [...]
6485 input.y:2.4-9: previous declaration
6487 In order to distinguish the actual error from the context provided, we
6488 rather this new output:
6490 input.y:6.5-10: result type clash on merge function 'merge': [...]
6491 input.y:2.4-9: previous declaration
6493 Another patch will introduce an "error: " prefix to all non-indented
6494 lines, giving yet better readability to the reports.
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.
6502 2012-09-25 Akim Demaille <akim@lrde.epita.fr>
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).
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>.
6519 For a discussion on the chosen warning format, see
6520 http://lists.gnu.org/archive/html/bison-patches/2012-09/msg00039.html
6522 In an effort to factor the handling of errors and warnings, use the
6523 Bison warning routines to report these messages.
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
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.
6534 2012-09-25 Akim Demaille <akim@lrde.epita.fr>
6538 2012-09-25 Akim Demaille <akim@lrde.epita.fr>
6540 yacc: fix handling of CPP guards when no header is generated
6541 When no header was to be generated, Bison would issue:
6543 /* In a future release of Bison, this section will be replaced
6548 It now properly generates nothing.
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
6556 2012-09-25 Akim Demaille <akim@lrde.epita.fr>
6560 2012-09-21 Akim Demaille <akim@lrde.epita.fr>
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.
6569 2012-09-21 Akim Demaille <akim@lrde.epita.fr>
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.
6577 2012-09-21 Akim Demaille <akim@lrde.epita.fr>
6579 TODO: lalr1.cc master vs maint
6582 2012-09-21 Akim Demaille <akim@lrde.epita.fr>
6584 c++: coding style fixes
6585 * data/lalr1.cc, tests/c++.at: Formatting changes.
6587 2012-09-21 Akim Demaille <akim@lrde.epita.fr>
6589 Revert "introduced a GCC-like -Werror=type"
6590 This reverts commit 981c53e257f1974854edc4f6ad0e88c7f18e2bea.
6592 2012-09-21 Akim Demaille <akim@lrde.epita.fr>
6594 Revert "made previous commit less hairy"
6595 This reverts commit fd01e1d05ea3e627033d148b5400b99a18ac7ba3.
6597 2012-09-21 Akim Demaille <akim@lrde.epita.fr>
6599 Revert "new Werror report format fixed in a test"
6600 This reverts commit 41511178a71ebaf81bde7ffc682c575537af45cb.
6602 2012-09-21 Theophile Ranquet <ranquet@lrde.epita.fr>
6604 new Werror report format fixed in a test
6605 * tests/input.at : replaced [-Wyacc] with [-Werror=yacc]
6607 todo: fix the other failed test of the suite, tests/conflicts.at:1554
6609 2012-09-21 Theophile Ranquet <ranquet@lrde.epita.fr>
6611 made previous commit less hairy
6612 * src/getargs.c : here
6614 2012-09-20 Theophile Ranquet <ranquet@lrde.epita.fr>
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
6622 2012-09-04 Akim Demaille <akim@lrde.epita.fr>
6626 2012-09-04 Akim Demaille <akim@lrde.epita.fr>
6628 Merge remote-tracking branch '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
6635 --help: include a place to report translation issues
6636 tests: style changes
6637 tests: fix push-pull test
6638 yacc.c: style changes
6640 2012-09-04 Akim Demaille <akim@lrde.epita.fr>
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.
6647 2012-09-04 Akim Demaille <akim@lrde.epita.fr>
6649 update files to ignore
6650 * doc/.gitignore: Don't ignore split info files as we don't split our
6652 See <http://lists.gnu.org/archive/html/bug-bison/2012-08/msg00006.html>.
6654 2012-09-04 Akim Demaille <akim@lrde.epita.fr>
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.
6662 2012-09-03 Jim Meyering <meyering@redhat.com>
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.
6672 2012-09-03 Akim Demaille <akim@lrde.epita.fr>
6676 2012-09-03 Akim Demaille <akim@lrde.epita.fr>
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.
6683 * src/getargs.c (usage): Report more URLs where the user can
6685 Mostly copied/pasted from coreutils' emit_ancillary_info function.
6687 2012-09-03 Akim Demaille <akim@lrde.epita.fr>
6690 * NEWS: Minor improvements.
6692 2012-09-03 Akim Demaille <akim@lrde.epita.fr>
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.
6698 2012-09-03 Akim Demaille <akim@lrde.epita.fr>
6700 introduce -Wdeprecated
6701 GCC seems to be using "deprecated" consistently over "obsoleted", so
6702 use -Wdeprecated rather than -Wobsolete.
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.
6709 * src/scan-code.l: Use this category for the trailing ';' support.
6710 * tests/actions.at: Adjust expected output.
6712 2012-09-03 Akim Demaille <akim@lrde.epita.fr>
6714 undefined but unused is a warning
6715 * src/symtab.c (symbol_check_defined): Undeclared symbols are only
6717 * tests/input.at (Undeclared symbols used for a printer or destructor):
6719 (Undefined symbols): this, and check this case.
6722 2012-09-03 Akim Demaille <akim@lrde.epita.fr>
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
6734 2012-09-03 Akim Demaille <akim@lrde.epita.fr>
6736 todo: check push parsers
6738 2012-09-03 Akim Demaille <akim@lrde.epita.fr>
6740 style: remove useless C++ provisio
6741 * src/complain.h: here.
6743 2012-09-03 Akim Demaille <akim@lrde.epita.fr>
6745 parser: style changes
6746 * src/parse-gram.y: Avoid deprecated directives.
6748 2012-09-03 Akim Demaille <akim@lrde.epita.fr>
6750 doc: address a fixme
6751 * doc/bison.texi (Calc++ Parser): Add a cross-reference.
6753 2012-09-03 Akim Demaille <akim@lrde.epita.fr>
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.
6760 2012-08-31 Akim Demaille <akim@lrde.epita.fr>
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.
6769 2012-08-31 Akim Demaille <akim@lrde.epita.fr>
6771 tests: fix push-pull test
6772 * tests/torture.at: %push-pull-parser is no longer supported.
6774 2012-08-31 Akim Demaille <akim@lrde.epita.fr>
6776 yacc.c: style changes
6777 * data/yacc.c: (yytoken): Define with initial value.
6779 2012-08-12 Akim Demaille <akim@lrde.epita.fr>
6781 refactoring: define variables with a value
6782 * src/muscle-tab.c: Where possible, fuse definition and initial assignment.
6784 2012-08-12 Akim Demaille <akim@lrde.epita.fr>
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.
6791 (QPUTS): Remove, inline its only use.
6793 2012-08-12 Akim Demaille <akim@lrde.epita.fr>
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.
6801 2012-08-12 Akim Demaille <akim@lrde.epita.fr>
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
6809 2012-08-12 Akim Demaille <akim@lrde.epita.fr>
6811 minor refactoring in user code scanning
6812 * src/scan-code.l (show_sub_message): New, extracted from...
6813 (show_sub_messages): here.
6815 2012-08-03 Akim Demaille <akim@lrde.epita.fr>
6817 tests: strengthen the trailing spaces check
6818 * tests/calc.at: here.
6819 * data/glr.c: Fix accordingly.
6821 2012-08-03 Akim Demaille <akim@lrde.epita.fr>
6825 2012-08-03 Akim Demaille <akim@lrde.epita.fr>
6827 Merge branch 'maint'
6829 maint: post-release administrivia
6832 yacc: remove trailing end of line at end of file
6833 thanks: fix a contributor name
6835 tests: synch line -> syncline, for consistency
6836 tests: synclines: style changes
6837 tests: synclines: fix perl invocation
6839 c++: trailing end-of-lines in %parse-param
6842 2012-08-03 Akim Demaille <akim@lrde.epita.fr>
6846 2012-08-03 Akim Demaille <akim@lrde.epita.fr>
6848 remove support for lint
6849 Basically revert commit 12ce2df60d16961eaa03a5aa009eeaa645e4e1cb.
6850 http://lists.gnu.org/archive/html/bison-patches/2012-08/msg00004.html
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).
6857 2012-08-03 Akim Demaille <akim@lrde.epita.fr>
6859 skeletons: renamings after knr removal
6860 * data/c.m4 (b4_yydestruct_generate, b4_yy_symbol_print_generate):
6862 (b4_yydestruct_define, b4_yy_symbol_print_define): these, for consistency.
6863 * data/glr.c, data/glr.cc, data/yacc.c: Adjust.
6865 2012-08-03 Akim Demaille <akim@lrde.epita.fr>
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.
6872 2012-08-03 Akim Demaille <akim@lrde.epita.fr>
6875 * NEWS: Record release date.
6877 2012-08-02 Akim Demaille <akim@lrde.epita.fr>
6880 * data/c++.m4: Be sure to attach a ';' to its declaration, otherwise
6881 it appears in the preceding comment.
6883 2012-08-02 Akim Demaille <akim@lrde.epita.fr>
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.
6890 2012-08-02 Akim Demaille <akim@lrde.epita.fr>
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.
6899 2012-08-02 Akim Demaille <akim@lrde.epita.fr>
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.
6906 2012-08-02 Akim Demaille <akim@lrde.epita.fr>
6910 2012-08-02 Akim Demaille <akim@lrde.epita.fr>
6912 YYPARSE_PARAM: drop support
6913 * data/yacc.c: No longer support it.
6914 * doc/bison.texi, tests/headers.at: Adjust.
6917 2012-08-02 Akim Demaille <akim@lrde.epita.fr>
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):
6925 (b4_c_formal_names, b4_c_formal_decls, b4_c_formal_decl):
6927 * data/glr.c, data/glr.cc, data/yacc.c: Adjust.
6929 2012-08-02 Akim Demaille <akim@lrde.epita.fr>
6932 * NEWS: Catch up with the other changes from 2.6.1.
6934 2012-08-02 Akim Demaille <akim@lrde.epita.fr>
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
6941 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: here.
6942 * tests/calc.at (AT_CHECK_SPACES): New.
6944 Be sure not to introduce trailing empty lines in the *.y files.
6946 * cfg.mk (syntax-check): Remove the exception.
6948 2012-08-02 Akim Demaille <akim@lrde.epita.fr>
6950 thanks: fix a contributor name
6951 * THANKS: On his request.
6953 2012-08-01 Akim Demaille <akim@lrde.epita.fr>
6957 2012-08-01 Akim Demaille <akim@lrde.epita.fr>
6959 tests: synch line -> syncline, for consistency
6960 * tests/synclines.at: Do it, as "syncline" is used consistently
6961 everywhere else in Bison.
6963 2012-08-01 Akim Demaille <akim@lrde.epita.fr>
6965 tests: synclines: style changes
6966 * tests/synclines.at (AT_TEST_SYNCLINE): Rename as...
6970 Use '+' instead of '*' where appropriate.
6972 2012-08-01 Akim Demaille <akim@lrde.epita.fr>
6974 tests: synclines: fix perl invocation
6975 Reported by Summum Bonum.
6977 * tests/synclines.at: Fix Perl invocation: its -f is not like sed's.
6979 2012-08-01 Akim Demaille <akim@lrde.epita.fr>
6983 2012-08-01 Akim Demaille <akim@lrde.epita.fr>
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.
6991 2012-08-01 Akim Demaille <akim@lrde.epita.fr>
6994 * tests/regression.at: Remove useless compilations: AT_FULL_COMPILE
6995 includes the compilation by bison.
6997 2012-07-31 Akim Demaille <akim@lrde.epita.fr>
7000 * TODO: $ in the epilogue, and obstack_copy.
7002 2012-07-31 Akim Demaille <akim@lrde.epita.fr>
7004 Merge branch 'maint'
7007 scanner: restore a missing start condition
7009 maint: post-release administrivia
7012 maint: fix some syntax-check issues
7013 tests: do not depend on __cplusplus to decide for C++ or C output
7015 2012-07-31 Akim Demaille <akim@lrde.epita.fr>
7017 tests: comment changes
7018 * tests/actions.at, tests/input.at: here.
7020 2012-07-31 Akim Demaille <akim@lrde.epita.fr>
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).
7028 2012-07-31 Akim Demaille <akim@lrde.epita.fr>
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.
7035 2012-07-31 Akim Demaille <akim@lrde.epita.fr>
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.
7045 2012-07-31 Akim Demaille <akim@lrde.epita.fr>
7047 lalr1.cc: no longer require %defines.
7048 * data/lalr1.cc: Generate the parser header only when %defines is
7050 * tests/calc.at: Check it.
7052 2012-07-31 Akim Demaille <akim@lrde.epita.fr>
7054 skeletons: style changes
7055 * data/glr.c, data/lalr1.cc: Use more consistent comments,
7056 and YY_NULL declaration.
7058 2012-07-31 Akim Demaille <akim@lrde.epita.fr>
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.
7065 2012-07-31 Akim Demaille <akim@lrde.epita.fr>
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
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.
7075 Some other wording changes.
7077 2012-07-31 Akim Demaille <akim@lrde.epita.fr>
7080 This is not just nicer, it is also much safer, since we were
7083 * bootstrap.conf: Require it.
7084 * src/system.h (obstack_fgrow1, obstack_fgrow2, obstack_fgrow3)
7085 (obstack_fgrow4): Remove.
7086 Adjust dependencies.
7088 2012-07-30 Akim Demaille <akim@lrde.epita.fr>
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.
7096 * src/scan-skel.l: Restore the start-condition INITIAL for an <<EOF>>
7099 2012-07-30 Akim Demaille <akim@lrde.epita.fr>
7103 2012-07-30 Akim Demaille <akim@lrde.epita.fr>
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.
7110 2012-07-30 Akim Demaille <akim@lrde.epita.fr>
7113 * NEWS: Record release date.
7115 2012-07-30 Akim Demaille <akim@lrde.epita.fr>
7119 2012-07-27 Akim Demaille <akim@lrde.epita.fr>
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
7134 2012-07-27 Akim Demaille <akim@lrde.epita.fr>
7138 2012-07-27 Akim Demaille <akim@lrde.epita.fr>
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.
7143 * tests/actions.at (Qualified $$ in actions): Use AT_SKEL_CC_IF.
7145 2012-07-27 Akim Demaille <akim@lrde.epita.fr>
7147 Merge remote-tracking branch 'origin/maint'
7148 * origin/maint: (29 commits)
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
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
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
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
7174 maint: style changes
7175 doc: avoid problems with case insensitive file systems
7176 configure: fix botched quoting
7179 2012-07-27 Akim Demaille <akim@lrde.epita.fr>
7183 2012-07-27 Akim Demaille <akim@lrde.epita.fr>
7185 synclines: remove spurious empty line
7186 * data/bison.m4 (b4_syncline): Do not start with an empty line.
7188 2012-07-27 Akim Demaille <akim@lrde.epita.fr>
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
7195 Generalize this definition, and use it for the %initial-action too.
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.
7208 2012-07-27 Akim Demaille <akim@lrde.epita.fr>
7210 skeletons: b4_dollar_pushdef and popdef to simpify complex definitions
7211 M4 is really making it uselessly hard to define macros that define
7213 * data/c.m4 (b4_dollar_pushdef, b4_dollar_popdef): New.
7216 2012-07-27 Akim Demaille <akim@lrde.epita.fr>
7220 2012-07-27 Akim Demaille <akim@lrde.epita.fr>
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
7227 * src/symlist.h, src/symlist.c (symbol_list_destructor_set)
7228 (symbol_list_printer_set): Take the action as code_props instead of
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.
7234 2012-07-27 Akim Demaille <akim@lrde.epita.fr>
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.
7240 * src/scan-code.l: Instead of duplicating the logic of obstack_escape,
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.
7248 2012-07-27 Akim Demaille <akim@lrde.epita.fr>
7250 news: schedule the removal of the ";" hack
7251 scan-code.l is significantly more complex because of this.
7255 2012-07-27 Akim Demaille <akim@lrde.epita.fr>
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.
7262 Remove useless start-condition clauses.
7264 2012-07-26 Akim Demaille <akim@lrde.epita.fr>
7268 2012-07-26 Akim Demaille <akim@lrde.epita.fr>
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++.
7277 2012-07-26 Akim Demaille <akim@lrde.epita.fr>
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.
7284 2012-07-26 Akim Demaille <akim@lrde.epita.fr>
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.
7293 2012-07-26 Akim Demaille <akim@lrde.epita.fr>
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.
7300 2012-07-26 Akim Demaille <akim@lrde.epita.fr>
7304 2012-07-26 Akim Demaille <akim@lrde.epita.fr>
7307 * src/symtab.h: here.
7309 2012-07-26 Akim Demaille <akim@lrde.epita.fr>
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.
7315 2012-07-26 Akim Demaille <akim@lrde.epita.fr>
7317 tests: adjust to GCC 4.8, which displays caret errors
7318 With GCC 4.8, the tests on synclines are skipped. Transform
7320 input.y:1:2: error: #error "1"
7326 input.y:1: #error "1"
7328 * tests/synclines.at (AT_SYNCLINES_COMPILE): Do it, using Perl instead of
7331 2012-07-26 Akim Demaille <akim@lrde.epita.fr>
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.
7339 2012-07-26 Akim Demaille <akim@lrde.epita.fr>
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 "".
7347 2012-07-26 Akim Demaille <akim@lrde.epita.fr>
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.
7353 2012-07-26 Akim Demaille <akim@lrde.epita.fr>
7355 muscles: make private functions static
7356 * src/muscle-tab.h, src/muscle-tab.c (muscle_boundary_grow)
7357 (muscle_location_grow): Now static.
7359 2012-07-26 Akim Demaille <akim@lrde.epita.fr>
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.
7366 2012-07-26 Akim Demaille <akim@lrde.epita.fr>
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.
7374 2012-07-26 Akim Demaille <akim@lrde.epita.fr>
7377 * src/system.h (DEFAULT_TMPDIR): Remove, unused.
7379 2012-07-26 Akim Demaille <akim@lrde.epita.fr>
7381 maint: style changes
7382 * src/scan-code.l: Remove useless braces.
7385 * src/muscle-tab.c, src/system.h: Formatting changes.
7387 2012-07-24 Akim Demaille <akim@lrde.epita.fr>
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
7395 * doc/bison.texi (Index): Rename as...
7396 (Index of Terms): this.
7398 2012-07-24 Stefano Lattarini <stefano.lattarini@gmail.com> (tiny change)
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:
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
7410 2012-07-24 Akim Demaille <akim@lrde.epita.fr>
7414 2012-07-24 Akim Demaille <akim@lrde.epita.fr>
7416 yystype, yyltype: remove.
7420 2012-07-22 Akim Demaille <akim@lrde.epita.fr>
7424 2012-07-22 Akim Demaille <akim@lrde.epita.fr>
7427 * data/lalr1.java, data/yacc.c, src/scan-code.l: Remove YYFAIL support.
7428 * NEWS, TODO: Update.
7430 2012-07-22 Akim Demaille <akim@lrde.epita.fr>
7433 * TODO: obsolete items.
7435 2012-07-22 Akim Demaille <akim@lrde.epita.fr>
7439 2012-07-22 Akim Demaille <akim@lrde.epita.fr>
7442 * data/bison.m4 (b4_symbol_action): Remove spurious eol in the output.
7444 2012-07-22 Akim Demaille <akim@lrde.epita.fr>
7446 parser: fix %printer usage.
7447 * src/parse-gram.y: Instead of stderr, using yyo.
7449 2012-07-22 Akim Demaille <akim@lrde.epita.fr>
7451 parser: factor the handling of code_props
7452 * src/parse-gram.y: Now that %printer and %destructor are treated
7454 (code_props_type): handle them.
7456 2012-07-22 Akim Demaille <akim@lrde.epita.fr>
7458 parser: factor handling of type tags
7459 * src/parse-gram.y: Now that <*> and <> are processed like regular
7463 2012-07-22 Akim Demaille <akim@lrde.epita.fr>
7467 2012-07-22 Akim Demaille <akim@lrde.epita.fr>
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.
7475 * src/parse-gram.y (generic_symlist_item): Treat "<*>" and "<>" as regular
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.
7485 * tests/actions.at: Complete expected errors: there are new warnings.
7486 * tests/input.at: Likewise.
7487 (Useless printers or destructors): Extend.
7489 2012-07-22 Akim Demaille <akim@lrde.epita.fr>
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.
7498 I would probably use "mutable" in C++ and keep these guys const,
7499 but this is C. And casting away constness triggers warnings.
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
7504 (symbol_check_defined): Use it.
7506 2012-07-22 Akim Demaille <akim@lrde.epita.fr>
7510 2012-07-22 Akim Demaille <akim@lrde.epita.fr>
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.
7518 * tests/bison.in: Do not depend on the value of $top_srcdir for
7520 If we were to use relative paths from .c to .y, we would not have
7523 2012-07-22 Akim Demaille <akim@lrde.epita.fr>
7525 maint: add missing const.
7526 * src/symtab.h, src/symtab.c (symbol_print): here.
7528 2012-07-22 Akim Demaille <akim@lrde.epita.fr>
7531 * src/parse-gram.y, src/symtab.c: Space changes.
7532 * src/symtab.h: Comment changes.
7534 2012-07-22 Akim Demaille <akim@lrde.epita.fr>
7537 * submodules/autoconf: here.
7538 No significant changes for our use of m4sugar.m4.
7540 2012-07-22 Akim Demaille <akim@lrde.epita.fr>
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
7546 * src/output.c (token_definitions_output): Remove.
7548 2012-07-22 Akim Demaille <akim@lrde.epita.fr>
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.
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.
7559 2012-07-20 Akim Demaille <akim@lrde.epita.fr>
7561 tests: fix VPATH issue
7562 * examples/test: With an absolute VPATH build, "../" is incorrect.
7564 2012-07-20 Akim Demaille <akim@lrde.epita.fr>
7568 Reported by Ben Pfaff.
7570 2012-07-19 Akim Demaille <akim@lrde.epita.fr>
7572 Merge remote-tracking branch 'origin/maint'
7574 maint: update gnu-web-doc-update.
7575 maint: post-release administrivia
7577 maint: prepare for release 2.6
7578 maint: post-release administrivia
7580 maint: prepare NEWS.
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.
7595 2012-07-19 Akim Demaille <akim@lrde.epita.fr>
7597 maint: update gnu-web-doc-update.
7600 2012-07-19 Akim Demaille <akim@lrde.epita.fr>
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.
7607 2012-07-19 Akim Demaille <akim@lrde.epita.fr>
7610 * NEWS: Record release date.
7612 2012-07-19 Akim Demaille <akim@lrde.epita.fr>
7614 maint: prepare for release 2.6
7617 2012-07-18 Akim Demaille <akim@lrde.epita.fr>
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.
7624 2012-07-18 Akim Demaille <akim@lrde.epita.fr>
7627 * NEWS: Record release date.
7629 2012-07-18 Akim Demaille <akim@lrde.epita.fr>
7631 maint: prepare NEWS.
7633 2012-07-18 Akim Demaille <akim@lrde.epita.fr>
7636 * build-aux/Makefile.am: here.
7638 2012-07-18 Akim Demaille <akim@lrde.epita.fr>
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.
7644 2012-07-18 Akim Demaille <akim@lrde.epita.fr>
7646 tests: fix dependencies
7647 * tests/Makefile.am: we need atconfig and atlocal to be up to date
7648 when calling testsuite.
7650 2012-07-18 Akim Demaille <akim@lrde.epita.fr>
7652 doc: fix Texinfo command
7653 * doc/bison.texi: In parens, use @pxref.
7655 2012-07-18 Akim Demaille <akim@lrde.epita.fr>
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.
7665 2012-07-17 Akim Demaille <akim@lrde.epita.fr>
7667 tests: be sure that backups are safe.
7668 * tests/local.at (at_save_special_files): here.
7670 2012-07-17 Akim Demaille <akim@lrde.epita.fr>
7672 maint: dead comment.
7675 2012-07-17 Akim Demaille <akim@lrde.epita.fr>
7677 tests: refactor for legibility.
7678 * tests/local.at (AT_BISON_CHECK_WARNINGS, AT_BISON_CHECK_WARNINGS_):
7681 2012-07-17 Akim Demaille <akim@lrde.epita.fr>
7683 tests: refactor the bison invocations.
7684 * tests/local.at (m4_null_if, AT_BISON_CHECK_): New.
7686 2012-07-17 Akim Demaille <akim@lrde.epita.fr>
7688 maint: fix syntax-check ignore patterns.
7691 2012-07-17 Akim Demaille <akim@lrde.epita.fr>
7695 2012-07-16 Akim Demaille <akim@lrde.epita.fr>
7698 * gnulib: Update so that gitlog-to-changelog support --srcdir.
7699 * Makefile.am: Use it.
7701 2012-07-10 Akim Demaille <akim@lrde.epita.fr>
7704 * bootstrap, build-aux/.gitignore, gnulib, m4/.gitignore: update.
7706 2012-07-06 Akim Demaille <akim@lrde.epita.fr>
7709 * NEWS: restore missing entry.
7710 * cfg.mk: Adjust to *.texinfo -> *.texi.
7711 * src/symtab.c: Spaces fixes.
7713 2012-07-06 Akim Demaille <akim@lrde.epita.fr>
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;
7722 * tests/c++.at (AT_CHECK_VARIANTS): here.
7724 2012-07-06 Akim Demaille <akim@lrde.epita.fr>
7726 Merge remote-tracking branch 'origin/maint'
7728 maint: update release instructions
7729 maint: post-release administrivia
7731 build: fix gen-ChangeLog call.
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.
7741 2012-07-06 Akim Demaille <akim@lrde.epita.fr>
7743 maint: update release instructions
7744 * README-hacking: here.
7746 2012-07-05 Akim Demaille <akim@lrde.epita.fr>
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.
7753 2012-07-05 Akim Demaille <akim@lrde.epita.fr>
7756 * NEWS: Record release date.
7758 2012-07-05 Akim Demaille <akim@lrde.epita.fr>
7760 build: fix gen-ChangeLog call.
7761 * Makefile.am: Be sure to catch errors, and fix option name
7763 2012-07-05 Akim Demaille <akim@lrde.epita.fr>
7766 * gnulib/build-aux/do-release-commit-and-tag: Fix.
7768 2012-07-05 Akim Demaille <akim@lrde.epita.fr>
7770 tests: fix SKIP_IF for Java.
7771 * tests/local.at (AT_JAVA_COMPILE): here.
7773 2012-07-05 Akim Demaille <akim@lrde.epita.fr>
7775 api.prefix: incompatible with %name-prefix.
7776 * data/bison.m4: Make it incompatible.
7777 * tests/input.at: Check that it is.
7779 2012-07-05 Akim Demaille <akim@lrde.epita.fr>
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.
7788 2012-07-05 Akim Demaille <akim@lrde.epita.fr>
7790 skeletons: style changes.
7791 * data/bison.m4: Define default values after having defined
7793 Kill a dead comment.
7795 2012-07-05 Akim Demaille <akim@lrde.epita.fr>
7797 NEWS: minor changes.
7798 * NEWS: style changes.
7800 2012-07-05 Akim Demaille <akim@lrde.epita.fr>
7802 api.prefix: improve the documentation for YYDEBUG.
7803 * doc/bison.texi: Explain how api.prefix is applied to YYDEBUG.
7805 2012-07-05 Akim Demaille <akim@lrde.epita.fr>
7808 * bootstrap, gnulib: Update.
7809 * cfg.mk (syntax-check): Don't check "error" usage in bison.texi.
7811 2012-07-04 Akim Demaille <akim@lrde.epita.fr>
7813 Merge remote-tracking branch '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.
7823 api.prefix: also rename YYDEBUG.
7825 2012-07-04 Akim Demaille <akim@lrde.epita.fr>
7827 tests: headers.at: strengthen.
7828 * tests/headers.at (Several headers): Be stricter when checking
7829 the exported macros.
7831 2012-07-04 Akim Demaille <akim@lrde.epita.fr>
7833 glr.cc: do not override C++ definitions by C macros.
7835 * data/glr.cc: Fix overquotation.
7836 * tests/headers.at: Comment changes.
7838 2012-07-04 Akim Demaille <akim@lrde.epita.fr>
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.
7846 2012-07-04 Akim Demaille <akim@lrde.epita.fr>
7848 api.prefix: do not use #define to handle YYSTYPE_IS_TRIVIAL etc.
7849 The following mixture is insane:
7851 #define YYSTYPE_IS_TRIVIAL PREFIX_STYPE_IS_TRIVIAL
7852 #if (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)
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
7858 #if (defined PREFIX_STYPE_IS_TRIVIAL && PREFIX_STYPE_IS_TRIVIAL)
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
7864 2012-07-04 Akim Demaille <akim@lrde.epita.fr>
7866 tests: portability fixes.
7869 * tests/headers.at (Several headers): Be sure to include config.h
7870 in the files to compile.
7872 2012-07-04 Akim Demaille <akim@lrde.epita.fr>
7874 c++: fewer #includes in the headers.
7875 * data/lalr1.cc: Define YY_NULL in the *.cc file, it is not needed
7877 * data/location.cc: iosfwd suffices.
7879 2012-07-04 Akim Demaille <akim@lrde.epita.fr>
7881 glr.cc: formatting changes.
7882 * data/glr.cc: here.
7884 2012-07-04 Akim Demaille <akim@lrde.epita.fr>
7887 * tests/headers.at (Several parsers): Here.
7889 2012-07-04 Akim Demaille <akim@lrde.epita.fr>
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.
7897 It happens when mixing several parser headers, some generated without
7898 %debug, others with. In particular the C++ parser was generated with
7905 and compiled separatedly. Yet, its header was included after the one
7906 of another parser, this time without %debug, i.e., with
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.
7916 Therefore, do not change the value of YYDEBUG. Rather, use it as a
7917 default value for <API.PREFIX>DEBUG.
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.
7925 2012-07-02 Akim Demaille <akim@lrde.epita.fr>
7928 * data/lalr1.cc: here.
7930 2012-07-02 Akim Demaille <akim@lrde.epita.fr>
7934 Reported by Stefano Lattarini.
7936 2012-07-02 Akim Demaille <akim@lrde.epita.fr>
7938 Merge remote-tracking branch 'origin/maint'
7943 2012-07-02 Akim Demaille <akim@lrde.epita.fr>
7948 2012-06-29 Akim Demaille <akim@lrde.epita.fr>
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.
7967 2012-06-29 Victor Santet <victor.santet@epita.fr>
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
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.
7978 2012-06-29 Victor Santet <victor.santet@epita.fr>
7980 warnings: be ready to print warnings categories
7981 A function to print warnings categories, like -Wyacc, -Wother, etc.
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.
7988 2012-06-29 Akim Demaille <akim@lrde.epita.fr>
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.
7995 2012-06-29 Victor Santet <victor.santet@epita.fr>
7998 * src/complain.c, src/reader.c, src/reduce.c, src/main.c:
8002 2012-06-28 Akim Demaille <akim@lrde.epita.fr>
8006 2012-06-28 Victor Santet <victor.santet@epita.fr>
8008 warnings: factoring: complaints
8009 * src/complain.c (error_message): Accept warning categories (an integer) as
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.
8021 2012-06-28 Victor Santet <victor.santet@epita.fr>
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.
8027 2012-06-28 Victor Santet <victor.santet@epita.fr>
8029 warnings: rename the categories
8030 Forthcoming changes will use the warning categories much more often,
8031 so shortening them will improve readability.
8033 * src/complain.c, src/complain.h, src/conflicts.c,
8034 * src/getargs.c, src/getargs.h, src/gram.c (enum warnings):
8037 2012-06-28 Akim Demaille <akim@lrde.epita.fr>
8040 * data/bison.m4: Use b4_error_verbose_if after it was defined.
8042 2012-06-28 Akim Demaille <akim@lrde.epita.fr>
8044 Merge remote-tracking branch '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.
8051 2012-06-28 Akim Demaille <akim@lrde.epita.fr>
8053 tests: use the generalized default yylex.
8054 * tests/actions.at, tests/glr-regression.at, tests/regression.at: here.
8056 2012-06-28 Akim Demaille <akim@lrde.epita.fr>
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.
8064 2012-06-27 Akim Demaille <akim@lrde.epita.fr>
8066 skeletons: no longer define YYLSP_NEEDED.
8067 * data/c.m4, data/glr.cc: here.
8068 * NEWS, TODO: Adjust.
8070 2012-06-27 Akim Demaille <akim@lrde.epita.fr>
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.
8079 * data/lalr1.cc: Likewise.
8080 (YYERROR_VERBOSE): Remove.
8081 * NEWS, doc/bison.texi: Document this.
8083 2012-06-26 Akim Demaille <akim@lrde.epita.fr>
8085 Merge remote-tracking branch 'origin/maint'
8089 2012-06-26 Akim Demaille <akim@lrde.epita.fr>
8092 This is more consistent with the other packages, and Automake-NG
8093 supports only *.texi.
8095 * doc/bison.texinfo: Rename as...
8096 * doc/bison.texi: this.
8097 * doc/Makefile.am, examples/calc++/Makefile.am: Adjust.
8099 2012-06-26 Akim Demaille <akim@lrde.epita.fr>
8101 Merge remote-tracking branch '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.
8110 yacc: work around the ylwrap limitation.
8112 2012-06-26 Victor Santet <victor.santet@epita.fr>
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.
8129 2012-06-26 Akim Demaille <akim@lrde.epita.fr>
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).
8136 2012-06-26 Akim Demaille <akim@lrde.epita.fr>
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.
8145 2012-06-26 Akim Demaille <akim@lrde.epita.fr>
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,
8152 Prefer assert to abort.
8154 2012-06-26 Akim Demaille <akim@lrde.epita.fr>
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.
8161 2012-06-26 Akim Demaille <akim@lrde.epita.fr>
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.
8169 2012-06-26 Akim Demaille <akim@lrde.epita.fr>
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.
8178 2012-06-26 Akim Demaille <akim@lrde.epita.fr>
8182 2012-06-25 Victor Santet <victor.santet@epita.fr>
8184 warnings: useless semantic types
8185 * src/symtab.h (symbol_list): Represent semantic types as structure
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
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
8194 (semantic_type_check_defined, semantic_type_check_defined_processor): Same
8195 as symbol_check_defined and symbol_check_defined_processor, but for semantic
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.
8205 2012-06-25 Akim Demaille <akim@lrde.epita.fr>
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.
8213 2012-06-25 Akim Demaille <akim@lrde.epita.fr>
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.
8219 * src/output.c (prepare_symbol_definitions): Fix value of pname.
8221 2012-06-25 Akim Demaille <akim@lrde.epita.fr>
8223 Merge remote-tracking branch '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
8231 skeletons: minor style changes
8233 c skeletons: factor the declaration of yylloc and yylval.
8234 news: condemn YYPARSE_PARAM and YYLEX_PARAM.
8237 2012-06-22 Akim Demaille <akim@lrde.epita.fr>
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.
8245 2012-06-22 Victor Santet <victor.santet@epita.fr>
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
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.
8273 2012-06-22 Akim Demaille <akim@lrde.epita.fr>
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.
8283 * tests/actions.at, tests/calc.at, tests/cxx-type.at: Adjust to
8286 2012-06-22 Akim Demaille <akim@lrde.epita.fr>
8288 tests: handle locations in a more generic way.
8289 * tests/local.at (AT_YYERROR_PROTOTYPE): New.
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.
8296 2012-06-22 Akim Demaille <akim@lrde.epita.fr>
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.
8305 2012-06-22 Akim Demaille <akim@lrde.epita.fr>
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.
8312 2012-06-22 Akim Demaille <akim@lrde.epita.fr>
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
8319 (AT_YYERROR_DEFINE): Use m4_case.
8320 (AT_JAVA_COMPILE): Use AT_SKIP_IF.
8322 2012-06-21 Akim Demaille <akim@lrde.epita.fr>
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_*.
8329 2012-06-21 Akim Demaille <akim@lrde.epita.fr>
8331 skeletons: minor style changes
8332 * data/glr.c, data/yacc.c: here.
8334 2012-06-21 Akim Demaille <akim@lrde.epita.fr>
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.
8342 2012-06-21 Victor Santet <victor.santet@epita.fr>
8345 Prepares forthcoming changes.
8347 * src/symtab.c (symbols_do): Accept the hash table and the sorted
8348 list as arguments. Adjust dependencies.
8350 2012-06-21 Akim Demaille <akim@lrde.epita.fr>
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.
8357 2012-06-21 Akim Demaille <akim@lrde.epita.fr>
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.
8365 2012-06-21 Akim Demaille <akim@lrde.epita.fr>
8367 news: condemn YYPARSE_PARAM and YYLEX_PARAM.
8369 (Bison 1.875): Add %parse-param and %lex-param.
8370 * doc/bison.texinfo: Spello.
8372 2012-06-20 Akim Demaille <akim@lrde.epita.fr>
8374 fix warnings for useless %printer/%destructor
8375 The previous commit, which turns into a warning what used to be an
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:
8390 Reduce the amount to warnings in the first case, restore the error in
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
8405 * tests/input.at (Undeclared symbols used for a printer or destructor):
8406 Improve the cover the cases described above.
8408 2012-06-20 Akim Demaille <akim@lrde.epita.fr>
8410 gitignore: test-driver.
8412 2012-06-20 Akim Demaille <akim@lrde.epita.fr>
8414 maint: style changes.
8415 * src/reduce.c (reduce_grammar_tables): Define variables with their
8418 2012-06-20 Akim Demaille <akim@lrde.epita.fr>
8421 * NEWS: Fix spelling.
8423 2012-06-20 Victor Santet <victor.santet@epita.fr>
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.
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.
8438 2012-06-20 Akim Demaille <akim@lrde.epita.fr>
8441 * Makefile.am (regen): New target.
8443 2012-06-20 Akim Demaille <akim@lrde.epita.fr>
8447 2012-06-20 Akim Demaille <akim@lrde.epita.fr>
8450 * Makefile.am (regen): New target.
8452 2012-06-19 Akim Demaille <akim@lrde.epita.fr>
8454 tests: enhance AT_YYERROR_DEFINE.
8455 * tests/local.at: Handle the fact that locations are no longer
8456 needed with lalr1.cc.
8458 2012-06-19 Akim Demaille <akim@lrde.epita.fr>
8460 Merge remote-tracking branch '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.
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.
8474 tests: strengthen the test on generated headers inclusion
8475 yacc.c: instead of duplicating y.tab.h inside y.tac.c, include it.
8478 2012-06-19 Akim Demaille <akim@lrde.epita.fr>
8480 maint: formatting changes.
8481 * NEWS: Fix indentation of code snippets.
8484 2012-06-17 Akim Demaille <akim@lrde.epita.fr>
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.
8494 2012-06-17 Akim Demaille <akim@lrde.epita.fr>
8496 tests: pacify font-lock-mode.
8497 * tests/local.at: here.
8499 2012-06-17 Akim Demaille <akim@lrde.epita.fr>
8501 tests: remove test covered elsewhere.
8502 * tests/headers.at (%union and --defines): Remove, pretty useless and
8505 2012-06-17 Akim Demaille <akim@lrde.epita.fr>
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.
8517 2012-06-17 Akim Demaille <akim@lrde.epita.fr>
8521 2012-06-17 Akim Demaille <akim@lrde.epita.fr>
8523 tests: portability issues.
8524 * tests/calc.at (AT_CALC_MAIN): Missing include reported by Hydra.
8526 2012-06-15 Akim Demaille <akim@lrde.epita.fr>
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.
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.
8539 2012-06-15 Akim Demaille <akim@lrde.epita.fr>
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.
8547 2012-06-15 Akim Demaille <akim@lrde.epita.fr>
8549 skeletons: use header guards.
8550 * data/glr.c, data/glr.cc, data/yacc.c: here.
8551 * NEWS: Document it.
8553 2012-06-15 Akim Demaille <akim@lrde.epita.fr>
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.
8560 2012-06-15 Akim Demaille <akim@lrde.epita.fr>
8563 * tests/calc.at (power): Move its definition, as a preparation for
8564 forthcoming changes.
8567 2012-06-15 Akim Demaille <akim@lrde.epita.fr>
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.
8573 2012-06-15 Akim Demaille <akim@lrde.epita.fr>
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.
8578 * data/yacc.c: here.
8580 2012-06-15 Akim Demaille <akim@lrde.epita.fr>
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.
8587 2012-06-15 Akim Demaille <akim@lrde.epita.fr>
8589 maint: space changes
8590 * configure.ac, src/complain.c: space changes.
8592 2012-06-13 Akim Demaille <akim@lrde.epita.fr>
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.
8602 * data/yacc.c (b4_shared_declarations): New.
8603 Use it to factor duplicated declarations.
8605 2012-06-13 Stefano Lattarini <stefano.lattarini@gmail.com> (tiny change)
8607 cosmetics: prettify names for compiled object for bison
8608 * src/local.mk (src_bison_SHORTNAME): Define to "bison".
8610 2012-06-13 Akim Demaille <akim@lrde.epita.fr>
8613 * data/lalr1.cc: Reported by Gilles Espinasse.
8615 2012-06-13 Akim Demaille <akim@lrde.epita.fr>
8617 Merge remote-tracking branch 'origin/maint'
8619 skeletons: factor yacc.c and glr.c.
8620 glr.c: minor refactoring.
8621 tests: remove all the -On flags.
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
8629 2012-06-12 Akim Demaille <akim@lrde.epita.fr>
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
8638 * data/c.m4 (b4_declare_yylstype): New.
8639 * data/yacc.c, data/glr.c: Use it.
8641 2012-06-12 Akim Demaille <akim@lrde.epita.fr>
8643 glr.c: minor refactoring.
8644 * data/glr.c (b4_shared_declarations): Move from the generated file
8645 section, to the M4 prologue.
8647 2012-06-12 Akim Demaille <akim@lrde.epita.fr>
8649 tests: remove all the -On flags.
8650 * tests/atlocal.in: Here.
8651 Reported by Gilles Espinasse.
8653 2012-06-12 Akim Demaille <akim@lrde.epita.fr>
8656 * README-hacking: Here.
8657 * THANKS: Reported by Gilles Espinasse.
8659 2012-06-12 Akim Demaille <akim@lrde.epita.fr>
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.
8667 2012-06-07 Akim Demaille <akim@lrde.epita.fr>
8669 gnulib: update readme-release.
8670 * gnulib (readme-release): Now includes the modules it promotes.
8671 * bootstrap.conf: Simplify accordingly.
8673 2012-06-07 Akim Demaille <akim@lrde.epita.fr>
8675 maint: cfg.mk: manual title.
8676 * cfg.mk (manuel_title): New.
8678 2012-06-07 Akim Demaille <akim@lrde.epita.fr>
8680 maint: cfg.mk: simplify
8681 * cfg.mk: Remove bits provided by maint.mk.
8683 2012-06-07 Akim Demaille <akim@lrde.epita.fr>
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.
8690 2012-06-05 Akim Demaille <akim@lrde.epita.fr>
8692 maint: an envvar equal to "00" is 0.
8693 * src/output.c (prepare): here.
8694 Reported by Paul Eggert.
8696 2012-06-05 Akim Demaille <akim@lrde.epita.fr>
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>
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.
8709 2012-06-05 Akim Demaille <akim@lrde.epita.fr>
8711 maint: use xconcat-filename.
8712 * bootstrap.conf (gnulib_modules): Request it.
8713 * src/output.h, src/output.c (compute_pkgdatadir): Rename as...
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>.
8725 2012-06-05 Akim Demaille <akim@lrde.epita.fr>
8727 maint: minor simplification
8728 * src/output.c (prepare): Assign use_push_for_pull_flag's value at its
8731 2012-06-05 Akim Demaille <akim@lrde.epita.fr>
8733 Merge remote-tracking branch 'origin/maint'
8736 NEWS: prepare for 2.5.1.
8737 maint: update release procedure
8738 maint: fix comment typos
8739 maint: post-release administrivia
8741 2012-06-05 Akim Demaille <akim@lrde.epita.fr>
8744 * NEWS: Record release date.
8746 2012-06-05 Akim Demaille <akim@lrde.epita.fr>
8748 NEWS: prepare for 2.5.1.
8749 * NEWS: Be compliant with do-release-commit-and-tag.
8751 2012-06-05 Akim Demaille <akim@lrde.epita.fr>
8753 maint: update release procedure
8754 * bootstrap.conf: Request do-release-commit-and-tag and readme-release.
8755 * README-hacking: Adjust.
8757 2012-06-05 Jim Meyering <meyering@redhat.com>
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:
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
8772 2012-05-24 Akim Demaille <akim@lrde.epita.fr>
8776 2012-05-24 Akim Demaille <akim@lrde.epita.fr>
8778 Merge tag 'v2.5.1_rc2'
8781 * tag 'v2.5.1_rc2': (34 commits)
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.
8791 build: do not prototype flex-generated functions.
8792 build: fix ChangeLog generation.
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.
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.
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
8817 2012-05-23 Akim Demaille <akim@lrde.epita.fr>
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.
8824 2012-05-23 Akim Demaille <akim@lrde.epita.fr>
8829 2012-05-23 Akim Demaille <akim@lrde.epita.fr>
8832 * doc/bison.texinfo: Fix errors spotted by syntax-check.
8834 2012-05-23 Akim Demaille <akim@lrde.epita.fr>
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.
8841 2012-05-21 Akim Demaille <akim@lrde.epita.fr>
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>.
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...
8854 2012-05-21 Akim Demaille <akim@lrde.epita.fr>
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.
8861 2012-05-21 Akim Demaille <akim@lrde.epita.fr>
8863 lalr1.cc: improve Doxygen documentation.
8864 * data/location.cc: Qualify file names with directory name.
8866 2012-05-21 Akim Demaille <akim@lrde.epita.fr>
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.
8874 2012-05-21 Akim Demaille <akim@lrde.epita.fr>
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
8881 2012-05-21 Akim Demaille <akim@lrde.epita.fr>
8884 * src/flex-scanner.h: Indent nested cpp directives.
8886 2012-05-21 Akim Demaille <akim@lrde.epita.fr>
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>.
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.
8901 2012-05-16 Akim Demaille <akim@lrde.epita.fr>
8903 build: fix ChangeLog generation.
8904 * Makefile.am (gen-ChangeLog): Fix for VPATH builds.
8906 2012-05-14 Akim Demaille <akim@lrde.epita.fr>
8910 * src/parse-gram.c, src/parse-gram.h: Regen.
8912 2012-05-11 Akim Demaille <akim@lrde.epita.fr>
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.
8918 * tests/local.at (AT_BISON_CHECK_XML): Belt: Save/restore files.
8919 * tests/regression.at (parse-gram.y: LALR = IELR): Suspenders: Don't
8921 Each one of these changes suffices.
8923 2012-05-11 Akim Demaille <akim@lrde.epita.fr>
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).
8930 There is already some support for this. Expand it to be ready to use
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.
8937 2012-05-11 Akim Demaille <akim@lrde.epita.fr>
8939 tests: honor TESTSUITEFLAGS in all the check targets.
8940 * tests/Makefile.am (installcheck-local): Simplify.
8941 (maintainer-check-posix, maintainer-check-valgrind): Honor
8944 2012-05-11 Akim Demaille <akim@lrde.epita.fr>
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..
8950 2012-05-11 Akim Demaille <akim@lrde.epita.fr>
8952 maint: update gnulib.
8953 * bootstrap, gnulib: Update.
8955 2012-05-09 Akim Demaille <akim@lrde.epita.fr>
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.
8962 * configure.ac: Rename config.hin as config.in.h.
8964 2012-05-09 Akim Demaille <akim@lrde.epita.fr>
8966 build: move silent rules.
8967 * tests/Makefile.am: In the generation of the test suite.
8969 2012-05-09 Akim Demaille <demaille@gostai.com>
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.
8976 2012-05-08 Akim Demaille <akim@lrde.epita.fr>
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.
8984 2012-05-08 Akim Demaille <akim@lrde.epita.fr>
8986 maint: shush a syntax-check.
8987 * cfg.mk: lib/timevar is not planned to be gnulib'ed, as it comes
8990 2012-05-08 Akim Demaille <akim@lrde.epita.fr>
8992 maint: prefer "commit message" to "log entry".
8993 * README-hacking: here.
8994 Suggested by Stefano Lattarini.
8996 2012-05-08 Akim Demaille <akim@lrde.epita.fr>
8998 command line: fix minor leaks.
8999 * src/getargs.c (getargs): Free pointers before allocating them new
9002 2012-05-08 Akim Demaille <akim@lrde.epita.fr>
9004 maint: we no longer maintain the ChangeLog.
9005 * .gitattributes: No need to merge it.
9006 * README-hacking: Update release instructions.
9008 2012-05-06 Akim Demaille <akim@lrde.epita.fr>
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.
9015 2012-05-06 Akim Demaille <akim@lrde.epita.fr>
9018 * src/parse-gram.c, src/parse-gram.h: Regen.
9020 2012-05-06 Akim Demaille <akim@lrde.epita.fr>
9022 maint: import the xmemdup0 gnulib module.
9023 * bootstrap.conf: Require this module.
9024 * src/parse-gram.y: Include xmemdup0.h.
9026 2012-05-06 Akim Demaille <akim@lrde.epita.fr>
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.
9032 2012-05-06 Akim Demaille <akim@lrde.epita.fr>
9034 maint: ignore files imported by autopoint.
9035 * m4/.gitignore: here.
9037 2012-05-06 Akim Demaille <akim@lrde.epita.fr>
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.
9044 2012-05-06 Jim Meyering <meyering@redhat.com>
9046 maint: regen src/parse-gram.[ch]
9048 2012-05-06 Jim Meyering <meyering@redhat.com>
9049 Akim Demaille <akim@lrde.epita.fr>
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.
9055 2012-05-06 Jim Meyering <meyering@redhat.com>
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.
9062 2012-05-04 Akim Demaille <akim@lrde.epita.fr>
9064 glr.c: formatting changes.
9065 * data/glr.c: Fix indentation.
9067 2012-05-04 Akim Demaille <akim@lrde.epita.fr>
9069 Merge remote-tracking branch 'origin/master'
9073 glr.cc: formatting changes.
9074 glr.cc: remove unused signature.
9075 glr.cc: properly declare locations are const where appropriate.
9078 2012-05-04 Akim Demaille <akim@lrde.epita.fr>
9083 2012-05-04 Akim Demaille <akim@lrde.epita.fr>
9086 * data/glr.cc: here.
9088 2012-05-04 Akim Demaille <akim@lrde.epita.fr>
9090 glr.cc: formatting changes.
9091 * data/glr.cc: Fit in 80 columns.
9093 2012-05-04 Akim Demaille <akim@lrde.epita.fr>
9095 glr.cc: remove unused signature.
9096 * data/glr.cc (yydestruct_): Not used, remove.
9097 It is yydestruct which is used.
9099 2012-05-04 Akim Demaille <akim@lrde.epita.fr>
9101 glr.cc: properly declare locations are const where appropriate.
9102 * data/glr.cc (yyerror): The location is const.
9104 2012-05-04 Akim Demaille <akim@lrde.epita.fr>
9107 * doc/bison.texinfo: here.
9109 2012-05-04 Akim Demaille <akim@lrde.epita.fr>
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.
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.
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.
9133 doc: fix documentation of YYERROR.
9136 2012-05-02 Akim Demaille <akim@lrde.epita.fr>
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
9145 * tests/local.at (AT_PARSER_CHECK): Ignore messages for failed merges
9146 of code coverage/profiling results.
9148 2012-04-16 Akim Demaille <akim@lrde.epita.fr>
9150 doc: fix some invalid @ref.
9151 * doc/bison.texinfo: Fix incorrect @ref uses.
9153 2012-04-16 Akim Demaille <akim@lrde.epita.fr>
9155 build: fix previous commit.
9156 * bootstrap: Update from gnulib.
9158 2012-04-16 Akim Demaille <akim@lrde.epita.fr>
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
9166 2012-04-16 Akim Demaille <akim@lrde.epita.fr>
9169 * NEWS: Spell check.
9170 (%printer): is now documented.
9172 2012-04-16 Akim Demaille <akim@lrde.epita.fr>
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
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.
9185 2012-04-16 Akim Demaille <akim@lrde.epita.fr>
9187 doc: mfcalc: demonstrate %printer.
9188 * doc/bison.texinfo (Printer Decl): New.
9189 Number mfcalc.y snippets so that they are output in
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.
9196 2012-04-16 Akim Demaille <akim@lrde.epita.fr>
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.
9203 2012-04-16 Akim Demaille <akim@lrde.epita.fr>
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
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.
9216 2012-04-16 Akim Demaille <akim@lrde.epita.fr>
9218 doc: mfcalc: demonstrate %printer.
9219 * doc/bison.texinfo (Printer Decl): New.
9220 Number mfcalc.y snippets so that they are output in
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.
9227 2012-04-16 Akim Demaille <akim@lrde.epita.fr>
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.
9234 2012-04-10 Akim Demaille <akim@lrde.epita.fr>
9236 build: require Flex.
9237 * configure.ac: Require Flex.
9239 2012-04-10 Akim Demaille <akim@lrde.epita.fr>
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.
9246 2012-04-10 Akim Demaille <akim@lrde.epita.fr>
9248 build: flex.m4: quote properly.
9249 * m4/flex.m4: Use quotes more systematically.
9251 2012-04-10 Akim Demaille <akim@lrde.epita.fr>
9255 An exact copy of what is in Autoconf currently.
9257 2012-04-10 Akim Demaille <akim@lrde.epita.fr>
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.
9264 2012-04-10 Akim Demaille <akim@lrde.epita.fr>
9266 glr: eliminate last bits of unwanted locations.
9267 * data/glr.c (YYLTYPE): Do not define when locations are
9269 Adjust all dependencies.
9271 2012-04-10 Akim Demaille <akim@lrde.epita.fr>
9273 NEWS: 2.6 will drop K&R.
9275 (glr.c): Fix a spello.
9277 2012-04-09 Akim Demaille <akim@lrde.epita.fr>
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.
9284 2012-04-09 Akim Demaille <akim@lrde.epita.fr>
9286 TODO: import from master.
9287 * TODO: Copy the current version.
9289 2012-04-08 Akim Demaille <akim@lrde.epita.fr>
9291 tests: fix bison wrapper.
9292 * tests/bison.in (PERL): Fix.
9294 2012-04-08 Akim Demaille <akim@lrde.epita.fr>
9296 doc: fix some invalid @ref.
9297 * doc/bison.texinfo: Fix incorrect @ref uses.
9299 2012-04-08 Akim Demaille <akim@lrde.epita.fr>
9301 build: extexi: support out-of-order blocks.
9302 * examples/extexi (%file_output): Remove.
9303 (&process): Accept "FILE: BLOCK-NUM" requests.
9305 2012-04-08 Akim Demaille <akim@lrde.epita.fr>
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.
9312 * configure.ac (PERL): New.
9313 * doc/Doxyfile.in, doc/local.mk, examples/local.mk,
9314 * tests/bison.in: Use it.
9316 2012-04-08 Akim Demaille <akim@lrde.epita.fr>
9318 maint: rewrite extexi in Perl.
9319 * examples/extexi: Rewrite in Perl.
9320 * examples/local.mk (extract): Adjust.
9322 2012-04-07 Akim Demaille <akim@lrde.epita.fr>
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.
9329 2012-04-07 Akim Demaille <akim@lrde.epita.fr>
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.
9337 2012-04-04 Akim Demaille <akim@lrde.epita.fr>
9340 * NEWS: Fix entry about __attribute__.
9341 Reorder by "decreasing" order of importance.
9343 2012-04-04 Akim Demaille <akim@lrde.epita.fr>
9346 http://lists.gnu.org/archive/html/bison-patches/2012-04/msg00006.html
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 ";".
9355 2012-04-04 Akim Demaille <akim@lrde.epita.fr>
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".
9361 2012-04-01 Akim Demaille <akim@lrde.epita.fr>
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.
9368 While at it, upgrade the generation of the (completely obsolete)
9369 reference card. Target PDF.
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.
9377 2012-04-01 Akim Demaille <akim@lrde.epita.fr>
9379 build: don't rely on $< in non-pattern rules.
9380 * doc/local.mk, tests/local.mk: here.
9381 Reported by Stefano Lattarini.
9383 2012-04-01 Akim Demaille <akim@lrde.epita.fr>
9385 doc: upgrade Doxyfile.
9386 * doc/Doxyfile.in: Run doxygen -u.
9387 Prompted by Tim Landscheidt.
9389 2012-04-01 Akim Demaille <akim@lrde.epita.fr>
9391 doc: help Doxygen find our files.
9392 * doc/Doxyfile.in (INCLUDE_PATH): here.
9394 2012-04-01 Tim Landscheidt <tim@tim-landscheidt.de>
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".
9401 2012-04-01 Tim Landscheidt <tim@tim-landscheidt.de>
9403 Fix Doxygen comment.
9404 * src/InadequacyList.h: s#</t>#</tt>#.
9406 2012-04-01 Akim Demaille <akim@lrde.epita.fr>
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.
9415 2012-04-01 Akim Demaille <akim@lrde.epita.fr>
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.
9424 2012-04-01 Akim Demaille <akim@lrde.epita.fr>
9426 Merge remote-tracking branch '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.
9437 maint: formatting changes.
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.
9443 2012-04-01 Akim Demaille <akim@lrde.epita.fr>
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.
9449 2012-04-01 Akim Demaille <akim@lrde.epita.fr>
9451 build: remove ancient Autoconf tests.
9452 lib/subpipe.c was removed in 47fa574761319b0a422691223c9b8a9a72f36aa2.
9454 * m4/subpipe.m4: Remove.
9455 * configure.ac (BISON_PREREQ_SUBPIPE): Remove.
9457 2012-03-31 Akim Demaille <akim@lrde.epita.fr>
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.
9466 2012-03-31 Akim Demaille <demaille@gostai.com>
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.
9474 2012-03-31 Akim Demaille <akim@lrde.epita.fr>
9476 c++: locations: remove useless "inline".
9477 * data/location.cc: "inline" is implicit when defining
9478 methods in the class definition.
9480 2012-03-31 Akim Demaille <akim@lrde.epita.fr>
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.
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.
9494 2012-03-31 Akim Demaille <akim@lrde.epita.fr>
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.
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,
9511 * tests/actions.at, tests/calc.at: Adjust.
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.
9521 2012-03-30 Akim Demaille <akim@lrde.epita.fr>
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
9529 (WARN_CFLAGS_TEST, WARN_CXXFLAGS_TEST): Don't aggregate
9530 $WARN_CFLAGS and $WARN_CXXFLAGS in them now, leave it
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.
9538 2012-03-30 Akim Demaille <akim@lrde.epita.fr>
9542 2012-03-30 Akim Demaille <akim@lrde.epita.fr>
9544 maint: formatting changes.
9545 * src/system.h: Indent CPP directives using cppi.
9547 2012-03-27 Akim Demaille <akim@lrde.epita.fr>
9550 * NEWS: Java fixes, more about the doc changes, liby issues.
9552 2012-03-27 Tim Landscheidt <tim@tim-landscheidt.de>
9554 Java: Fix syntax error handling without error token.
9555 * data/lalr1.java (YYParser::parse): Here.
9556 * tests/java.at: Add test case.
9558 2012-03-24 Akim Demaille <akim@lrde.epita.fr>
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
9566 2012-03-24 Akim Demaille <akim@lrde.epita.fr>
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
9576 * tests/atlocal.in: Implement it.
9577 * tests/local.mk: Use it.
9579 2012-03-24 Akim Demaille <akim@lrde.epita.fr>
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.
9587 2012-03-24 Akim Demaille <akim@lrde.epita.fr>
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
9595 2012-03-24 Akim Demaille <akim@lrde.epita.fr>
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
9605 * tests/atlocal.in: Implement it.
9606 * tests/local.mk: Use it.
9608 2012-03-24 Akim Demaille <akim@lrde.epita.fr>
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).
9619 2012-03-19 Akim Demaille <akim@lrde.epita.fr>
9621 Merge remote-tracking branch 'fsf/maint'
9622 * fsf/maint: (404 commits)
9623 doc: update the --verbose report format.
9625 doc: stmt, not stmnt.
9627 doc: reformat grammar snippets.
9628 doc: use only @example, not @smallexample.
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.
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.
9645 2012-03-19 Akim Demaille <akim@lrde.epita.fr>
9648 * doc/bison.texinfo: here.
9649 Reported by Tim Landscheidt.
9651 2012-03-19 Akim Demaille <akim@lrde.epita.fr>
9653 doc: update the --verbose report format.
9654 * doc/bison.texinfo (Understanding): Adjust to match the
9657 2012-03-19 Akim Demaille <akim@lrde.epita.fr>
9660 * doc/bison.texinfo: here.
9662 2012-03-19 Akim Demaille <akim@lrde.epita.fr>
9664 doc: stmt, not stmnt.
9665 * doc/bison.texinfo: s/stmnt/stmt/g. This is a
9666 much more common abbreviation for "statement".
9668 2012-03-19 Akim Demaille <akim@lrde.epita.fr>
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.
9675 2012-03-19 Akim Demaille <akim@lrde.epita.fr>
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
9683 2012-03-19 Akim Demaille <akim@lrde.epita.fr>
9685 doc: use only @example, not @smallexample.
9686 * doc/bison.texinfo: Convert all @smallexamples into @examples.
9687 Adjust layout where needed.
9689 2012-03-19 Akim Demaille <akim@lrde.epita.fr>
9692 * doc/bison.texinfo: Avoid line width issues with TeX.
9693 Upgrade ancient messages.
9694 Move some comments to better looking places.
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.
9701 2012-03-19 Paul Eggert <eggert@cs.ucla.edu>
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>.
9708 2012-03-19 Akim Demaille <akim@lrde.epita.fr>
9710 doc: update the --verbose report format.
9711 * doc/bison.texinfo (Understanding): Adjust to match the
9714 2012-03-19 Akim Demaille <akim@lrde.epita.fr>
9717 * doc/bison.texinfo: here.
9719 2012-03-19 Akim Demaille <akim@lrde.epita.fr>
9721 doc: stmt, not stmnt.
9722 * doc/bison.texinfo: s/stmnt/stmt/g. This is a
9723 much more common abbreviation for "statement".
9725 2012-03-19 Akim Demaille <akim@lrde.epita.fr>
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.
9732 2012-03-19 Akim Demaille <akim@lrde.epita.fr>
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
9740 2012-03-19 Akim Demaille <akim@lrde.epita.fr>
9742 doc: use only @example, not @smallexample.
9743 * doc/bison.texinfo: Convert all @smallexamples into @examples.
9744 Adjust layout where needed.
9746 2012-03-19 Akim Demaille <akim@lrde.epita.fr>
9749 * doc/bison.texinfo: Avoid line width issues with TeX.
9750 Upgrade ancient messages.
9751 Move some comments to better looking places.
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.
9758 2012-03-19 Akim Demaille <akim@lrde.epita.fr>
9760 c.m4: better newline control with b4_parse_param_use.
9761 * data/c.m4: Use m4_ifvaln instead of m4_ifval where
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.
9767 2012-03-19 Akim Demaille <akim@lrde.epita.fr>
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.
9774 * data/c.m4 (yy_symbol_value_print): Use YYPRINT only for yacc.c.
9777 2012-03-17 Paul Eggert <eggert@cs.ucla.edu>
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>.
9784 2012-03-15 Akim Demaille <akim@lrde.epita.fr>
9788 2012-03-15 Akim Demaille <akim@lrde.epita.fr>
9792 2012-03-13 Akim Demaille <demaille@gostai.com>
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
9801 2012-03-13 Akim Demaille <akim@lrde.epita.fr>
9803 maint: fix distcheck.
9804 * examples/local.mk (MAINTAINERCLEANFILES): Complete, and rename as...
9806 * examples/calc++/local.mk, examples/mfcalc/local.mk,
9807 * examples/rpcalc/local.mk (CLEANFILES): Add the generated files.
9809 2012-03-13 Akim Demaille <demaille@gostai.com>
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
9818 2012-03-09 Akim Demaille <demaille@gostai.com>
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
9826 2012-03-09 Akim Demaille <demaille@gostai.com>
9828 tests: be robust to quote style.
9829 See <http://lists.gnu.org/archive/html/bug-bison/2012-01/msg00120.html>.
9831 * src/main.c (main): Define the quoting style we use.
9832 * tests/atlocal.in: Use ASCII style quotes during the tests.
9834 2012-03-09 Akim Demaille <demaille@gostai.com>
9836 maint: update gnulib.
9838 * src/scan-gram.l: Don't use the (former version of) STREQ.
9840 2012-03-09 Akim Demaille <demaille@gostai.com>
9842 tests: remove quote magic from the bison test wrapper.
9843 Basically, revert 4c4d35394d1bdb4dc3392482ab002bc111a3378f.
9845 * tests/bison.in: Leave bison's stderr as is.
9847 2012-03-09 Akim Demaille <demaille@gostai.com>
9849 tests: be robust to quote style.
9850 See <http://lists.gnu.org/archive/html/bug-bison/2012-01/msg00120.html>.
9852 * src/main.c (main): Define the quoting style we use.
9853 * tests/atlocal.in: Use ASCII style quotes during the tests.
9855 2012-03-09 Akim Demaille <demaille@gostai.com>
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.
9862 For consistency, handle only TAB_EXT (".tab" on non DJGPP platforms).
9863 Support for "_tab" is neither documented, nor tested.
9865 * src/system.h (STRNCMP_LIT): New.
9867 (STRPREFIX_LIT): New.
9868 * src/files.c, src/getargs.c: Use it.
9870 2012-03-06 Akim Demaille <demaille@gostai.com>
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
9878 2012-02-24 Akim Demaille <demaille@gostai.com>
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.
9886 2012-02-24 Akim Demaille <demaille@gostai.com>
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.
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...
9903 2012-02-24 Akim Demaille <demaille@gostai.com>
9905 maint: fix example extraction issues.
9906 calc++: don't rely on Automake to compile a C++ parser.
9908 Basically, revert commit 609b3d8096fb0cc1fa4d908b6e1a860ced260bda,
9909 Automake 1.11.3 is not safe enough for C++ parser.
9911 * examples/calc++/calc++-parser.hh: Remove.
9912 * examples/calc++/local.mk (examples/calc++/calc++-parser.stamp):
9915 examples: factor the extractions into a single step
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.
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
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.
9936 2012-02-23 Akim Demaille <demaille@gostai.com>
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,
9946 * src/scan-gram.l: Do not use streq.h, use system.h's STREQ.
9947 * cfg.mk: The documentation is an exception.
9949 2012-02-23 Akim Demaille <demaille@gostai.com>
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.
9957 2012-02-23 Akim Demaille <demaille@gostai.com>
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.
9965 2012-02-23 Akim Demaille <demaille@gostai.com>
9968 * src/parse-gram.h, src/parse-gram.c: regen.
9970 2012-02-23 Akim Demaille <demaille@gostai.com>
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.
9979 * tests/calc.at, tests/named-refs.at: Include assert.h.
9981 2012-02-22 Akim Demaille <demaille@gostai.com>
9984 * examples/mfcalc/.gitignore, examples/rpcalc/.gitignore: Fix.
9986 2012-02-21 Akim Demaille <demaille@gostai.com>
9989 * src/parse-gram.c, src/parse-gram.h: regen.
9991 2012-02-21 Akim Demaille <demaille@gostai.com>
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.
10000 * tests/calc.at, tests/named-refs.at: Include assert.h.
10002 2012-02-21 Akim Demaille <demaille@gostai.com>
10004 tests: post-process stderr to normalize quotes.
10005 * tests/bison.in: Save bison's stderr, and convert gettextized
10006 quotes to plain ASCII.
10008 2012-02-21 Akim Demaille <demaille@gostai.com>
10010 glr: fix ambiguity reports.
10011 * tests/glr-regression.at (Ambiguity reports): New.
10013 2012-02-21 Akim Demaille <demaille@gostai.com>
10015 glr: fix ambiguity reports.
10016 Fix a regression introduced in commit
10017 783aa653f4ca70a75919c8516b950494c612cbfe.
10019 * tests/glr-regression.at (Ambiguity reports): New.
10020 * data/glr.c (yyreportTree): Fix an offset error.
10022 2012-02-19 Akim Demaille <demaille@gostai.com>
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.
10028 2012-02-19 Akim Demaille <demaille@gostai.com>
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.
10035 2012-02-19 Akim Demaille <demaille@gostai.com>
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.
10043 2012-02-19 Akim Demaille <demaille@gostai.com>
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.
10050 Skip lib/main.c for bindtextdomain and set_program_name.
10052 2012-02-19 Akim Demaille <demaille@gostai.com>
10054 maint: remove stray file.
10055 * config.hin: Remove.
10057 2012-02-19 Akim Demaille <demaille@gostai.com>
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.
10063 2012-02-19 Akim Demaille <demaille@gostai.com>
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.
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.
10077 2012-02-19 Akim Demaille <demaille@gostai.com>
10080 * src/parse-gram.c, src/parse-gram.h: Regen.
10082 2012-02-19 Akim Demaille <demaille@gostai.com>
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.
10089 2012-02-19 Akim Demaille <demaille@gostai.com>
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.
10097 2012-02-19 Akim Demaille <demaille@gostai.com>
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.
10104 Skip lib/main.c for bindtextdomain and set_program_name.
10106 2012-02-19 Akim Demaille <demaille@gostai.com>
10108 maint: remove stray file.
10109 * config.hin: Remove.
10111 2012-02-19 Akim Demaille <demaille@gostai.com>
10113 bitset: fix an incorrect error message.
10114 * lib/bitset_stats.c: here.
10115 Reported by Stefano Lattarini.
10117 2012-02-19 Akim Demaille <demaille@gostai.com>
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.
10124 2012-02-19 Akim Demaille <demaille@gostai.com>
10127 * src/parse-gram.c, src/parse-gram.h: Regen.
10129 2012-02-19 Akim Demaille <demaille@gostai.com>
10131 bitset: fix an incorrect error message.
10132 * lib/bitset_stats.c: here.
10133 Reported by Stefano Lattarini.
10135 2012-02-19 Jim Meyering <meyering@redhat.com>
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.
10141 2012-02-19 Akim Demaille <demaille@gostai.com>
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
10150 2012-02-19 Akim Demaille <demaille@gostai.com>
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.
10160 2012-02-19 Akim Demaille <demaille@gostai.com>
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.
10174 2012-02-19 Akim Demaille <demaille@gostai.com>
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.
10185 2012-02-19 Akim Demaille <demaille@gostai.com>
10187 maint: gnulib: upgrade.
10189 2012-02-18 Akim Demaille <demaille@gostai.com>
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
10198 2012-02-18 Akim Demaille <demaille@gostai.com>
10201 * src/parse-gram.c, src/parse-gram.h: regen.
10203 2012-02-18 Akim Demaille <demaille@gostai.com>
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.
10213 2012-02-18 Akim Demaille <demaille@gostai.com>
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.
10227 2012-02-18 Akim Demaille <demaille@gostai.com>
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.
10238 2012-02-18 Akim Demaille <demaille@gostai.com>
10240 maint: gnulib: upgrade.
10242 2012-02-17 Akim Demaille <demaille@gostai.com>
10244 doc: mfcalc: fix includes.
10245 * doc/bison.texinfo: math.h is needed early.
10247 2012-02-17 Akim Demaille <demaille@gostai.com>
10249 examples: factor the test suite.
10250 * examples/mfcalc/test, examples/calc++/test: Extract the
10251 common bits into...
10252 * examples/test: here.
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.
10261 2012-02-17 Akim Demaille <demaille@gostai.com>
10263 examples: fix the test suites.
10264 * examples/calc++/test, examples/mfcalc/test (me): Be more
10265 meaningfull: include the example name.
10267 (run): Avoid printf, use echo.
10268 Add missing parens.
10271 Remove the previous "rm" that did the cleanup.
10272 Move into a private directory to avoid concurrency issues.
10273 Reported by Jim Meyering.
10275 2012-02-17 Jim Meyering <meyering@redhat.com>
10277 examples: link mfcalc with -lm for uses of pow, cos, atan, etc.
10278 * examples/mfcalc/local.mk (examples_mfcalc_mfcalc_LDADD): Define.
10280 2012-02-16 Akim Demaille <demaille@gostai.com>
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.
10287 2012-02-16 Akim Demaille <demaille@gostai.com>
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
10295 * examples/calc++/test: As a consequence, always be verbose.
10298 Sort the tests in a more natural order (simplest first).
10300 2012-02-16 Akim Demaille <demaille@gostai.com>
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
10306 Let yyerror report on stderr.
10308 2012-02-16 Akim Demaille <demaille@gostai.com>
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.
10318 2012-02-16 Akim Demaille <demaille@gostai.com>
10320 tests: c++: stylistic changes.
10321 * tests/c++.at: Don't use void for incoming arguments.
10322 Prefer cstdlib to stdlib.h.
10324 2012-02-16 Jim Meyering <meyering@redhat.com>
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>.
10331 2012-02-15 Akim Demaille <demaille@gostai.com>
10333 maint: rely on Automake for parsers.
10334 * Makefile.am (AM_YFLAGS): Automake looks for "-d" alone.
10335 Move other options in here.
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
10342 Based on commit 737406a32c201471699bfa0843d1f432f3ec29ab and
10343 commit 3d6ca339083c278d907c9f030f4ba6bc5ecb07f2.
10345 2012-02-15 Akim Demaille <demaille@gostai.com>
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.
10352 2012-02-15 Akim Demaille <demaille@gostai.com>
10354 maint: help Automake reading Yacc flags.
10355 * Makefile.am (AM_YFLAGS): Automake looks for "-d" alone.
10357 2012-02-15 Akim Demaille <demaille@gostai.com>
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".
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.
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.
10381 2012-02-14 Akim Demaille <demaille@gostai.com>
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.
10391 2012-02-14 Akim Demaille <demaille@gostai.com>
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
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.
10405 In order to make the tuning of CPPFLAGS easier, discard the predefined
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.
10419 * configure.ac: Pass nostdinc to Automake.
10420 * src/local.mk, lib/local.mk (AM_CPPFLAGS): Move to...
10421 * Makefile.am: here.
10423 * src/local.mk, examples/calc++/Makefile.am (BISON, BISON_IN): Factor
10425 * Makefile.am: here.
10426 * tests/local.mk: Use it.
10428 2012-02-14 Akim Demaille <demaille@gostai.com>
10430 variant: fix the example.
10431 * examples/variant.yy: Adjust to "assert" being now
10434 2012-02-14 Akim Demaille <demaille@gostai.com>
10436 maint: more authors.
10438 Suggested by Tys Lefering.
10440 2012-02-14 Akim Demaille <demaille@gostai.com>
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.
10447 2012-02-14 Akim Demaille <demaille@gostai.com>
10449 maint: remove obsolete file.
10450 * etc/make-ChangeLogs: Remove (used for rcs to cvs migration!).
10451 Reported by Tys Lefering.
10453 2012-02-14 Akim Demaille <demaille@gostai.com>
10455 maint: more authors.
10457 Suggested by Tys Lefering.
10459 2012-02-14 Akim Demaille <demaille@gostai.com>
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.
10466 2012-02-14 Akim Demaille <demaille@gostai.com>
10468 maint: remove obsolete file.
10469 * etc/make-ChangeLogs: Remove (used for rcs to cvs migration!).
10470 Reported by Tys Lefering.
10472 2012-02-10 Akim Demaille <demaille@gostai.com>
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.
10481 2012-02-10 Akim Demaille <demaille@gostai.com>
10483 tests: lalr1.cc: check syntax_error.
10484 * tests/c++.at (Syntax error as exception): New.
10486 2012-02-10 Akim Demaille <demaille@gostai.com>
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.
10492 2012-02-10 Akim Demaille <demaille@gostai.com>
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.
10502 2012-02-10 Akim Demaille <demaille@gostai.com>
10504 skeletons: simplify the protections against "unused" warnings.
10505 * data/c.m4 (b4_parse_param_use): Also accept optional arguments
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
10511 * data/lalr1.cc (YY_SYMBOL_PRINT): Even when disabled, "use" the
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.
10517 2012-02-10 Akim Demaille <demaille@gostai.com>
10519 glr: formatting changes.
10520 * data/glr.c: Split long strings.
10522 2012-02-08 Akim Demaille <demaille@gostai.com>
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.
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.
10536 * tests/skeletons.at, tests/input.at, tests/regression.at: Adjust
10539 2012-02-08 Akim Demaille <demaille@gostai.com>
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.
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.
10553 * tests/skeletons.at, tests/input.at, tests/regression.at: Adjust
10556 2012-01-31 Jim Meyering <meyering@redhat.com>
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.
10562 2012-01-31 Jim Meyering <meyering@redhat.com>
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.
10568 2012-01-31 Akim Demaille <demaille@gostai.com>
10570 maint: remove stray debug code.
10571 * src/Makefile.am (echo): Remove.
10573 2012-01-31 Akim Demaille <demaille@gostai.com>
10575 maint: space changes.
10576 * src/Makefile.am: Use 2 leading spaces for variable definition
10577 spreading over several lines.
10579 2012-01-31 Akim Demaille <demaille@gostai.com>
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.
10585 2012-01-31 Jim Meyering <meyering@redhat.com>
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.
10605 2012-01-31 Akim Demaille <demaille@gostai.com>
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.
10611 2012-01-29 Jim Meyering <meyering@redhat.com>
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.
10631 2012-01-26 Akim Demaille <demaille@gostai.com>
10633 tests: fix expected output.
10634 * tests/actions.at (YYBACKUP): here.
10636 2012-01-26 Akim Demaille <demaille@gostai.com>
10638 tests: fix expected output.
10639 * tests/actions.at (YYBACKUP): here.
10641 2012-01-26 Akim Demaille <demaille@gostai.com>
10643 maint: fix configure.ac
10644 Fix commit 1890a2a816dab86c23cc1d0af8fac3986335deb7.
10646 * configure.ac: Fix variable assignment.
10648 2012-01-26 Akim Demaille <demaille@gostai.com>
10650 yacc: fix YYBACKUP.
10651 Reported by David Kastrup:
10652 https://lists.gnu.org/archive/html/bug-bison/2011-10/msg00002.html.
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.
10660 2012-01-26 Akim Demaille <demaille@gostai.com>
10662 maint: update TODO.
10663 * TODO (Labeling the symbols): Remove, it's done ("Name references").
10665 2012-01-26 Akim Demaille <demaille@gostai.com>
10667 maint: update THANKS.
10668 * THANKS: Update Tys's address, on his request.
10670 2012-01-26 Akim Demaille <demaille@gostai.com>
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.
10676 2012-01-26 Akim Demaille <demaille@gostai.com>
10678 maint: silent-rules.
10679 * configure.ac: Ask for silent-rules support.
10680 Enable it by default.
10682 2012-01-26 Akim Demaille <demaille@gostai.com>
10684 maint: remove trailing blanks.
10685 * src/scan-code.l: Here.
10687 2012-01-26 Akim Demaille <demaille@gostai.com>
10689 yacc: fix YYBACKUP.
10690 Reported by David Kastrup:
10691 https://lists.gnu.org/archive/html/bug-bison/2011-10/msg00002.html.
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.
10699 2012-01-25 Akim Demaille <demaille@gostai.com>
10701 maint: update TODO.
10702 * TODO (Labeling the symbols): Remove, it's done ("Name references").
10704 2012-01-25 Akim Demaille <demaille@gostai.com>
10706 maint: update THANKS.
10707 * THANKS: Update Tys's address, on his request.
10709 2012-01-25 Akim Demaille <demaille@gostai.com>
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.
10715 2012-01-25 Akim Demaille <demaille@gostai.com>
10717 maint: silent-rules.
10718 * configure.ac: Ask for silent-rules support.
10719 Enable it by default.
10721 2012-01-25 Paul Eggert <eggert@cs.ucla.edu>
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>.
10729 2012-01-25 Jim Meyering <meyering@redhat.com>
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.
10741 2012-01-24 Paul Eggert <eggert@cs.ucla.edu>
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>.
10749 2012-01-24 Jim Meyering <meyering@redhat.com>
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.
10764 2012-01-24 Jim Meyering <meyering@redhat.com>
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.
10781 2012-01-23 Jim Meyering <meyering@redhat.com>
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.
10799 2012-01-23 Jim Meyering <meyering@redhat.com>
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.
10811 2012-01-23 Jim Meyering <meyering@redhat.com>
10813 build: update gnulib and autoconf submodules to latest (cherry picked from commit 728415f885e5cb8e518c8576fa6e1f541e384130)
10815 2012-01-23 Jim Meyering <meyering@redhat.com>
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.
10828 2012-01-23 Jim Meyering <meyering@redhat.com>
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
10835 2012-01-23 Jim Meyering <meyering@redhat.com>
10837 build: include <config.h> from lib/yyerror.c
10838 * lib/yyerror.c: Include <config.h>.
10840 2012-01-23 Jim Meyering <meyering@redhat.com>
10842 maint: list djgpp/subpipe.c in po/POTFILES.in
10843 * po/POTFILES.in: Add djgpp/subpipe.c.
10845 2012-01-23 Jim Meyering <meyering@redhat.com>
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.
10853 2012-01-23 Jim Meyering <meyering@redhat.com>
10855 doc: correct typo: s/can not/cannot/
10856 * doc/bison.texinfo (Bug Reports): s/can not/cannot/
10857 And remove trailing blanks.
10859 2012-01-23 Jim Meyering <meyering@redhat.com>
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.
10869 2012-01-22 Jim Meyering <meyering@redhat.com>
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.
10877 2012-01-20 Akim Demaille <demaille@gostai.com>
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.
10883 2012-01-20 Jim Meyering <meyering@redhat.com>
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.
10898 2012-01-19 Jim Meyering <meyering@redhat.com>
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.
10915 2012-01-19 Jim Meyering <meyering@redhat.com>
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.
10933 2012-01-19 Jim Meyering <meyering@redhat.com>
10935 build: update gnulib and autoconf submodules to latest
10937 2012-01-19 Jim Meyering <meyering@redhat.com>
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$(...
10954 2012-01-19 Jim Meyering <meyering@redhat.com>
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
10961 2012-01-19 Jim Meyering <meyering@redhat.com>
10963 build: include <config.h> from lib/yyerror.c
10964 * lib/yyerror.c: Include <config.h>.
10966 2012-01-19 Jim Meyering <meyering@redhat.com>
10968 maint: list djgpp/subpipe.c in po/POTFILES.in
10969 * po/POTFILES.in: Add djgpp/subpipe.c.
10971 2012-01-19 Jim Meyering <meyering@redhat.com>
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.
10979 2012-01-19 Jim Meyering <meyering@redhat.com>
10981 maint: remove final trailing space
10982 * src/scan-gram.l (%): Remove single space at end of line.
10984 2012-01-19 Jim Meyering <meyering@redhat.com>
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.
10992 2012-01-19 Jim Meyering <meyering@redhat.com>
10994 doc: correct typo: s/can not/cannot/
10995 * doc/bison.texinfo (Bug Reports): s/can not/cannot/
10996 And remove trailing blanks.