summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* version 3.0.4v3.0.4Akim Demaille2015-01-231-1/+1
| | | | * NEWS: Record release date.
* gnulib: updateAkim Demaille2015-01-231-0/+0
|
* build: re-enable compiler warnings, and fix themAkim Demaille2015-01-2317-22/+33
| | | | | | | | | | | | | | | | | | | | | | | | There are warnings (-Wextra) in generated C++ code: ltlparse.cc: In member function 'ltlyy::parser::symbol_number_type ltlyy::parser::by_state::type_get() const': ltlparse.cc:452:33: warning: enumeral and non-enumeral type in conditional expression return state == empty_state ? empty_symbol : yystos_[state]; Reported by Alexandre Duret-Lutz. It turns out that -Wall and -Wextra were disabled because of a stupid typo. * configure.ac: Fix the stupid typo. * data/lalr1.cc, src/AnnotationList.c, src/InadequacyList.c, * src/ielr.c, src/print.c, src/scan-code.l, src/symlist.c, * src/symlist.h, src/symtab.c, src/tables.c, tests/actions.at, * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at, * tests/named-refs.at, tests/torture.at: Fix warnings, mostly issues about variables used only with assertions, which are disabled with -DNDEBUG.
* tests: c++: fix a C++03 conformance issueAkim Demaille2015-01-222-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes test 241 on xLC: "input.y", line 42.11: 1540-0274 (S) The name lookup for "report" did not find a declaration. "input.y", line 42.11: 1540-1292 (I) Static declarations are not considered for a function call if the function is not qualified. where report is: static void report (std::ostream& yyo, int ival, float fval) { yyo << "ival: " << ival << ", fval: " << fval; } and line 42 is: %printer { report (yyo, $$, $<fval>$); } <ival>; It turns out that indeed this function must not be declared static, <http://stackoverflow.com/a/17662745/1353549>. Let's put it into an anonymous namespace. Reported by Thomas Jahns. http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00059.html * tests/actions.at (Qualified $$ in actions): Don't use "static", prefer anonymous namespace.
* tests: fix a titleAkim Demaille2015-01-201-1/+1
| | | | * tests/conflicts.at: De-overquote.
* c++: reserve 200 slots in the parser's stackAkim Demaille2015-01-202-5/+3
| | | | | | | | | | | | | | | | | This is consistent with what is done with yacc.c and glr.c. Because it also avoids that the stack needs to be resized very soon, it should help keeping tests about destructors more reliable. Indeed, if the stack is created too small, very soon the C++ library needs to enlarge it, which means creating a new one, copying the elements from the initial one onto it, and then destroy the elements of the initial stack: that would be a spurious call to a destructor. Reported by Thomas Jahns. http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00059.html * data/stack.hh (stack::stack): Reserve 200 slots. * tests/c++.at: Remove traces of stack expansions.
* tests: be more robust to unrecognized synclines, and try to recognize xlcAkim Demaille2015-01-201-12/+35
| | | | | | | | | | | Reported by Thomas Jahns. http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00059.html * tests/synclines.at (AT_SYNCLINES_COMPILE): Rename as... (_AT_SYNCLINES_COMPILE): this. Try to recognize xlc locations. (AT_SYNCLINES_COMPILE): New. Skips the test if we can't read the synclines.
* tests: fix C++ conformanceAkim Demaille2015-01-201-1/+2
| | | | | | | | Reported by Thomas Jahns. http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00059.html * tests/c++.at (Exception safety): Add missing include. Don't use const_iterator for erase.
* build: fix some warningsAkim Demaille2015-01-183-3/+4
| | | | | | | Reported by John Horigan. http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00034.html * src/graphviz.c, src/symtab.h: Address compiler warnings.
* build: avoid infinite recursions on include_nextAkim Demaille2015-01-162-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On MacOS X 10.5 PPC with Apple's GCC 4.0.1: % uname -a Darwin aria.cielonegro.org 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:57:0 1 PDT 2009; root:xnu-1228.15.4~1/RELEASE_PPC Power Macintosh % gcc --version powerpc-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. building in place enters into an infinite recursion on "#include_next": % gmake V=1 [snip] depbase=`echo lib/math.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ 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 &&\ mv -f $depbase.Tpo $depbase.Po In file included from lib/math.h:27, from lib/math.h:27, from lib/math.h:27, from lib/math.h:27, [snip] from lib/math.h:27, from lib/math.h:27, from lib/math.c:3: lib/math.h:27:23: error: #include nested too deeply Makefile:3414: recipe for target 'lib/math.o' failed gmake[2]: *** [lib/math.o] Error 1 Using -I./lib instead of -Ilib fixes the problem. Reported by Pho. <https://lists.gnu.org/archive/html/bison-patches/2014-01/msg00000.html> * Makefile.am (AM_CPPFLAGS): Use -I./lib instead of -Ilib.
* doc: minor fixesAkim Demaille2015-01-164-963/+1409
| | | | | | * doc/bison.texi: Fix warnings about colon in reference names. * data/bison.m4, src/files.h: Fix comments. * doc/Doxyfile.in: update.
* gnulib: strtoul is considered obsolete and now uselessAkim Demaille2015-01-153-5/+1
| | | | * bootstrap.conf: here.
* c++: avoid warnings when destructors don't use $$Akim Demaille2015-01-152-0/+6
| | | | * data/c++.m4: here.
* maint: post-release administriviaAkim Demaille2015-01-152-1/+4
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.0.3v3.0.3Akim Demaille2015-01-151-1/+1
| | | | * NEWS: Record release date.
* gnulib: updateAkim Demaille2015-01-151-0/+0
|
* tests: split a large test case into several smaller onesAkim Demaille2015-01-131-4/+7
| | | | | * tests/conflicts.at (AT_CONSISTENT_ERRORS_CHECK): Move AT_SETUP/AT_CLEANUP into it, so that we don't skip non Java tests following a test case in Java.
* package: a bit of trouble shooting indicationsAkim Demaille2015-01-121-3/+5
| | | | * README-hacking: here.
* doc: liby's main arms the internationalizationAkim Demaille2015-01-122-3/+18
| | | | | | | Reported by Nicolas Bedon. <https://lists.gnu.org/archive/html/bug-bison/2014-11/msg00005.html> * doc/bison.texi (Yacc Library): Document the call the setlocale.
* bison: avoid warnings from static code analysisAkim Demaille2015-01-095-23/+13
| | | | | | | | | | | | | | | | A static analysis tool reports that some callers of symbol_list_n_get might get NULL and not handle it properly. This is not the case, yet we can suppress this pattern. Reported by Mike Sullivan. <https://lists.gnu.org/archive/html/bug-bison/2013-12/msg00027.html> * src/symlist.c (symbol_list_n_get): Actually it is never called to return 0. Enforce this postcondition via aver. (symbol_list_n_type_name_get): Simplify accordingly. In particular, discards a (translated) useless error message. * src/symlist.h: Adjust documentation. * src/scan-code.l: Style change.
* c++: fix the use of destructors when variants are enabledAkim Demaille2015-01-094-10/+41
| | | | | | | | | | When using variants, destructors generate invalid code. <http://lists.gnu.org/archive/html/bug-bison/2014-09/msg00005.html> Reported by Michael Catanzaro. * data/c++.m4 (~basic_symbol): b4_symbol_foreach works on yysym: define it. * tests/c++.at (Variants): Check it.
* style: tests: simplify the handling of some C++ testsAkim Demaille2015-01-081-14/+13
| | | | | | * tests/c++.at: here. (Doxygen): Pass %define, so that files such as position.hh etc. are generated, instead of putting everything into input.hh.
* c++: symbols can be empty, so use itAkim Demaille2015-01-081-21/+13
| | | | | | | | | | | | | | The previous patches ensure that symbols (symbol_type and stack_symbol_type) can be empty, cleared, and their emptiness can be checked. Therefore, yyempty, which codes whether yyla is empty or not, is now useless. In C skeletons (e.g., yacc.c), the fact that the lookahead is empty is coded by "yychar = YYEMPTY", which is exactly what this patch restores, since yychar/yytoken corresponds to yyla.type. * data/lalr1.cc (yyempty): Remove. Rather, depend on yyla.empty ().
* c++: variants: don't leak the lookahead in error recoveryAkim Demaille2015-01-082-26/+44
| | | | | | | | | | | | During error recovery, when discarding the lookeahead, we don't destroy it, which is caught by parse.assert assertions. Reported by Antonio Silva Correia. With an analysis and suggested patch from Michel d'Hooge. <http://savannah.gnu.org/support/?108481> * tests/c++.at (Variants): Strengthen the test to try syntax errors with discarded lookahead.
* c++: provide a means to clear symbolsAkim Demaille2015-01-083-2/+36
| | | | | | | | | | | | | | | | | | The symbol destructor is currently the only means to clear a symbol. Unfortunately during error recovery we might have to clear the lookahead, which is a local variable (yyla) that has not yet reached its end of scope. Rather that duplicating the code to destroy a symbol, or rather than destroying and recreating yyla, let's provide a means to clear a symbol. Reported by Antonio Silva Correia, with an analysis from Michel d'Hooge. <http://savannah.gnu.org/support/?108481> * data/c++.m4, data/lalr1.cc (basis_symbol::clear, by_state::clear) (by_type::clear): New. (basic_symbol::~basic_symbol): Use clear.
* c++: clean up the handling of empty symbolsAkim Demaille2015-01-082-18/+29
| | | | | | * data/c++.m4, data/lalr1.cc (yyempty_): Remove, replaced by... (empty_symbol, by_state::empty_state): these. (basic_symbol::empty): New.
* c++: comment and style changesAkim Demaille2015-01-083-12/+16
| | | | | | | * data/c++.m4, data/lalr1.cc: More documentation. Tidy. * tests/c++.at (string_cast): Rename as... (to_string): this C++11 name.
* c++: variants: comparing addresses of typeid.name() is undefinedAkim Demaille2015-01-072-13/+14
| | | | | | | | | | Instead of storing and comparing pointers to names of types, store pointers to the typeids, and compares the typeids. Reported by Thomas Jahns. <http://lists.gnu.org/archive/html/bug-bison/2014-03/msg00001.html> * data/variant.hh (yytname_): Replace with... (yytypeid_): this.
* c++: locations: complete the API and fix commentsAkim Demaille2015-01-053-16/+34
| | | | | | | | | There are no support for += between locations, and some comments are wrong. Reported by Alexandre Duret-Lutz. * data/location.cc: Fix. * doc/bison.texi: Document. * tests/c++.at: Check.
* build: do not clean figure sources in make cleanAkim Demaille2015-01-051-1/+1
| | | | | | | "make clean && make" fails in in-tree builds. * doc/local.mk (CLEANDIRS): Replace with... (CLEANFILES): this safer list of files to clean.
* build: don't try to generate docs when cross-compilingAkim Demaille2015-01-053-1/+11
| | | | | | | | | When cross-compiling don't run the generated bison to update the docs. Reported by Aaro Koskinen. <http://lists.gnu.org/archive/html/bison-patches/2014-03/msg00000.html> * configure.ac (CROSS_COMPILING): New. * doc/local.mk: Use it.
* package: fix a reporter's nameAkim Demaille2015-01-042-1/+4
| | | | * THANKS, build-aux/git-log-fix: s/Bernd Edligner/Bernd Edlinger/.
* %union: fix the support for named %unionAkim Demaille2015-01-0412-212/+363
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bison supports a union tag, for obscure reasons. But it does a poor job at it, especially since Bison 3.0. Reported by Stephen Cameron and Tobias Frost. It did not ensure that the name was not given several times. An easy way to do this is to make the %union tag be handled as a %define variable, as they cannot be defined several times. Since Bison 3.0, the synclines were wrongly placed, resulting in invalid code. Addressing this issue, because of the way the union tag was stored (as a code muscle), would have been tedious. Unless we rather define the %union tag as a %percent variable, whose synclines are easier to manipulate. So replace the b4_union_name muscle by the api.value.union.name %define variable, document, and check. * data/bison.m4: Make sure that api.value.union.name has a keyword value. * data/c++.m4: Make sure that api.value.union.name is not defined. * data/c.m4 (b4_union_name): No longer use it, use api.value.union.name. * doc/bison.texi (%define Summary): Document it. * src/parse-gram.y (union_name): No longer define b4_uion_name, but api.value.union.name. * tests/input.at (Redefined %union name): New. * tests/synclines.at (%union name syncline): New. * tests/types.at: Check named %unions.
* package: bump to 2015Akim Demaille2015-01-04201-332/+351
| | | | | | Which also requires: * gnulib: Update.
* flex: don't trust YY_USER_INITAkim Demaille2014-12-312-3/+10
| | | | | | Reported by Bernd Edligner and others. * src/scan-gram.l: here.
* yacc.c: fix broken union when api.value.type=union and %defines are usedAkim Demaille2014-12-315-23/+70
| | | | | | | | | | | | | | | Reported by Rich Wilson. * data/c.m4 (b4_symbol_type_register): Append to b4_union_members, not b4_user_union_members. The latter invokes the former, but it is the former which is reinitialized to empty by b4_value_type_setup_union. * tests/types.at: Check it. This reveals another bug, this time in the case of glr.c parsers. * data/glr.c: Generate the header file before the implementation file, to be sure that the setup is run before what depends on it.
* doc: fix missing xrefAkim Demaille2014-12-312-4/+7
| | | | | | Reported by xolodho. * doc/bison.texi (Printer Decl): here.
* gnulib: updateAkim Demaille2014-12-294-9/+48
|
* location: remove some ugly debugging code tracesAkim Demaille2014-02-031-2/+1
| | | | * data/location.cc: here.
* build: use abort to pacify compiler errorsAkim Demaille2014-02-032-3/+3
| | | | | | | | clang, with -DNDEBUG and -Werror fails on some functions that might lack a return. This is because aver is just another assert, discarded with -DNDEBUG. So use abort. * src/muscle-tab.c, src/scan-skel.l: here.
* package: bump to 2014Akim Demaille2014-02-03197-206/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * AUTHORS, ChangeLog-2012, Makefile.am, NEWS, PACKAGING, README, * README-alpha, README-hacking, THANKS, TODO, bootstrap.conf, * build-aux/darwin11.4.0.valgrind, build-aux/local.mk, * build-aux/update-b4-copyright, * build-aux/update-package-copyright-year, cfg.mk, configure.ac, * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4, * data/c-like.m4, data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc, * data/java-skel.m4, data/java.m4, data/lalr1.cc, data/lalr1.java, * data/local.mk, data/location.cc, data/stack.hh, data/variant.hh, * data/xslt/bison.xsl, data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl, * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint, * djgpp/README.in, djgpp/config.bat, djgpp/config.sed, * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat, * djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h, * djgpp/testsuite.sed, doc/bison.texi, doc/local.mk, doc/refcard.tex, * etc/README, etc/bench.pl.in, etc/local.mk, * examples/calc++/calc++.test, examples/calc++/local.mk, * examples/extexi, examples/local.mk, examples/mfcalc/local.mk, * examples/mfcalc/mfcalc.test, examples/rpcalc/local.mk, * examples/rpcalc/rpcalc.test, examples/test, examples/variant.yy, * lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c, * lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h, * lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c, * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c, * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h, * lib/local.mk, lib/main.c, lib/timevar.c, lib/timevar.def, * lib/timevar.h, lib/vbitset.c, lib/vbitset.h, lib/yyerror.c, * m4/bison-i18n.m4, m4/c-working.m4, m4/cxx.m4, m4/flex.m4, * m4/timevar.m4, src/AnnotationList.c, src/AnnotationList.h, * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c, src/LR0.h, * src/Sbitset.c, src/Sbitset.h, src/assoc.c, src/assoc.h, * src/closure.c, src/closure.h, src/complain.c, src/complain.h, * src/conflicts.c, src/conflicts.h, src/derives.c, src/derives.h, * src/files.c, src/files.h, src/flex-scanner.h, src/getargs.c, * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c, * src/graphviz.h, src/ielr.c, src/ielr.h, src/lalr.c, src/lalr.h, * src/local.mk, src/location.c, src/location.h, src/main.c, * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c, * src/named-ref.h, src/nullable.c, src/nullable.h, src/output.c, * src/output.h, src/parse-gram.c, src/parse-gram.y, src/print-xml.c, * src/print-xml.h, src/print.c, src/print.h, src/print_graph.c, * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c, * src/reduce.h, src/relation.c, src/relation.h, src/scan-code.h, * src/scan-code.l, src/scan-gram.h, src/scan-gram.l, src/scan-skel.h, * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c, * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h, * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h, * tests/actions.at, tests/atlocal.in, tests/bison.in, tests/c++.at, * tests/calc.at, tests/conflicts.at, tests/cxx-type.at, * tests/existing.at, tests/glr-regression.at, tests/headers.at, * tests/input.at, tests/java.at, tests/javapush.at, tests/local.at, * tests/local.mk, tests/named-refs.at, tests/output.at, tests/push.at, * tests/reduce.at, tests/regression.at, tests/sets.at, * tests/skeletons.at, tests/synclines.at, tests/testsuite.at, * tests/torture.at, tests/types.at: here.
* doc: specify documentation encodingPaul Eggert2014-01-031-0/+2
| | | | | | | * doc/bison.texi: Add '@documentencoding UTF-8'; needed since the manual contains UTF-8 characters. This will cause the .info files to contain UTF-8 quotes and the like, which should be OK nowadays. Add @documentlanguage while we're at it.
* package: install the examplesAkim Demaille2013-12-097-20/+69
| | | | | | | | | | | Currently, we do not install the various examples extracted from the documentation. Let's do it, as they are useful starting points. * configure.ac: When --enable-gcc-warnings is set, enable ENABLE_GCC_WARNINGS. * examples/extexi: No longer issue synclines by default. * examples/local.mk: Except if ENABLE_GCC_WARNINGS. * examples/calc++/local.mk, examples/mfcalc/local.mk, * examples/rpcalc/local.mk: Install the example files.
* package: install README and the like in docdirAkim Demaille2013-12-091-2/+4
| | | | * Makefile.am: here.
* diagnostics: fix the order of multiple declarations reportsAkim Demaille2013-12-093-31/+135
| | | | | | | | | | | | | | | | | | | | | On %token FOO "foo" %printer {} "foo" %printer {} FOO we report /tmp/foo.yy:2.10-11: error: %printer redeclaration for FOO %printer {} "foo" ^^ /tmp/foo.yy:3.10-11: previous declaration %printer {} FOO ^^ * src/symtab.c (locations_sort): New. Use it. * tests/input.at (Invalid Aliases): Stress the order of diagnostics.
* symbol: provide an easy means to compare them in source orderAkim Demaille2013-12-091-11/+23
| | | | | * src/symtab.c (symbols_sort): New. (user_token_number_redeclaration): Taken from here.
* maint: post-release administriviaAkim Demaille2013-12-052-1/+4
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.0.2v3.0.2Akim Demaille2013-12-051-1/+1
| | | | * NEWS: Record release date.
* gnulib: updateAkim Demaille2013-12-053-0/+5
| | | | * gnulib: here.
* output: do not generate source files when late errors are caughtAkim Demaille2013-12-045-2/+29
| | | | | | | | | | Reported by Alexandre Duret-Lutz as "second problem" in: http://lists.gnu.org/archive/html/bug-bison/2013-09/msg00015.html * bootstrap.conf: We need the "unlink" module. * src/files.h, src/files.c (unlink_generated_sources): New. * src/output.c: Use it. * tests/output.at: Check the case of late errors.