summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* regen.Akim Demaille2012-02-192-237/+237
| | | | * src/parse-gram.c, src/parse-gram.h: Regen.
* maint: address sc_prohibit_doubled_word.Akim Demaille2012-02-193-7/+6
| | | | | | * data/yacc.c, doc/bison.texinfo: Reword to avoid having to disable that check. * cfg.mk: No longer skip this test.
* maint: address sc_prohibit_always-defined_macros.Akim Demaille2012-02-192-8/+11
| | | | | | | * cfg.mk: No longer skip it, except where EXIT_SUCCESS is used as a witness for stdlib.h. Skip this test when appropriate. * data/yacc.c: Drop a note about why EXIT_SUCCESS is defined here.
* maint: address sc_bindtextdomain, sc_program_name and sc_prohibit_HAVE_MBRTOWC.Akim Demaille2012-02-197-13/+18
| | | | | | | | * bootstrap.conf (gnulib_modules): Require progname. * src/complain.c, src/getargs.c, src/getargs.h, src/main.c: Use it. * cfg.mk (exclude): New. Use it. Skip lib/main.c for bindtextdomain and set_program_name.
* maint: remove stray file.Akim Demaille2012-02-191-292/+0
| | | | * config.hin: Remove.
* bitset: fix an incorrect error message.Akim Demaille2012-02-192-1/+2
| | | | | * lib/bitset_stats.c: here. Reported by Stefano Lattarini.
* maint: remove trailing empty lines.Akim Demaille2012-02-184-7/+2
| | | | | | | | * cfg.mk: No longer skip sc_prohibit_empty_lines_at_EOF, except for parse-gram.h (generated). * examples/mfcalc/.gitignore, lib/.gitignore, m4/.gitignore, * po/.gitignore, runtime-po/.gitignore: Remove trailing/leading empty lines.
* maint: regen.Akim Demaille2012-02-182-355/+355
| | | | * src/parse-gram.c, src/parse-gram.h: regen.
* maint: avoid "magic number exit".Akim Demaille2012-02-1810-11/+18
| | | | | | | | | * cfg.mk (local-checks-to-skip): No longer skip it. * bootstrap.conf (gnulib_modules): Add sysexits. * doc/bison.texinfo, etc/bench.pl.in, src/parse-gram.y, * src/system.h, tests/calc.at, tests/named-refs.at: Use assert where appropriate instead of "if (...) exit". Use symbolic exit status elsewhere.
* maint: fix some syntax-check issues.Akim Demaille2012-02-1813-20/+6
| | | | | | | | | | | | | * cfg.mk (local-checks-to-skip): Remove sc_prohibit_quotearg_without_use, sc_prohibit_strcmp, sc_unmarked_diagnostics, sc_useless_cpp_parens. (sc_unmarked_diagnostics): Skip DJGPP. * data/yacc.c, src/LR0.c, src/closure.c, * src/flex-scanner.h, src/gram.c, src/lalr.c, * src/print-xml.c, src/print.c, src/print_graph.c, * src/reader.c, src/reduce.c, src/tables.c: Don't use parens with cpp's defined. Remove useless includes.
* maint: address a couple of syntax-check errors.Akim Demaille2012-02-186-13/+10
| | | | | | | | | | * cfg.mk (local-checks-to-skip): Remove sc_error_message_period and sc_error_message_uppercase. Address the uncovered issues. * po/POTFILES.in: Add missing files. * src/symtab.c: Remove useless includes. * lib/bitset_stats.c, src/files.c, tests/glr-regression.at: Use conformant error messages.
* maint: gnulib: upgrade.Akim Demaille2012-02-181-0/+0
|
* doc: mfcalc: fix includes.Akim Demaille2012-02-171-1/+1
| | | | * doc/bison.texinfo: math.h is needed early.
* examples: factor the test suite.Akim Demaille2012-02-177-130/+92
| | | | | | | | | | | | | * examples/mfcalc/test, examples/calc++/test: Extract the common bits into... * examples/test: here. (cwd): New. Use it to avoid a race on the temporary directory. Reported by Jim Meyering. * examples/mfcalc/test, examples/calc++/test: Rename into... * examples/mfcalc/mfcalc.test, examples/calc++/calc++.test: these. * examples/calc++/local.mk, examples/mfcalc/local.mk, * examples/local.mk: Adjust.
* examples: fix the test suites.Akim Demaille2012-02-172-20/+52
| | | | | | | | | | | | | * examples/calc++/test, examples/mfcalc/test (me): Be more meaningfull: include the example name. (prog): Factor. (run): Avoid printf, use echo. Add missing parens. (cleanup): New. Call it on trap. Remove the previous "rm" that did the cleanup. Move into a private directory to avoid concurrency issues. Reported by Jim Meyering.
* examples: link mfcalc with -lm for uses of pow, cos, atan, etc.Jim Meyering2012-02-171-0/+1
| | | | * examples/mfcalc/local.mk (examples_mfcalc_mfcalc_LDADD): Define.
* mfcalc: extract and exercise.Akim Demaille2012-02-164-0/+139
| | | | | | * examples/mfcalc/local.mk, examples/mfcalc/test: New, based on calc++'s ones. * examples/local.mk: Include mfcalc/local.mk.
* calc++: factor for other extracted tests.Akim Demaille2012-02-165-23/+26
| | | | | | | | | | | | * Makefile.am (TESTS, check_PROGRAMS): Initialize here. * examples/local.mk (doc, extexi): Define here. * examples/calc++/local.mk: Adjust accordingly. * configure.ac: Ask for parallel-tests (for the way the logs are handled). * examples/calc++/test: As a consequence, always be verbose. ($prog): New. (run): Use it. Sort the tests in a more natural order (simplest first).
* doc: mfcalc: send errors to stderr.Akim Demaille2012-02-161-23/+37
| | | | | | | * doc/bison.texinfo (Mfcalc Lexer): New. (Mfcalc Main): Move the definition of main and yyerror here, for clarity. Let yyerror report on stderr.
* doc: fix mfcalc code.Akim Demaille2012-02-162-21/+35
| | | | | | | | | * doc/bison.texinfo (Multi-function Calc): Add missing includes. Fix the rendering of the result: use @result and remove the initial tabulation in the actual code. Fix stylistic issues: avoid the , operator. Add extexi mark-up. * examples/extexi: Also support @smallexample.
* tests: c++: stylistic changes.Akim Demaille2012-02-161-5/+5
| | | | | * tests/c++.at: Don't use void for incoming arguments. Prefer cstdlib to stdlib.h.
* tests: avoid c++ failure due to lack of getenv declJim Meyering2012-02-161-1/+2
| | | | | | * tests/c++.at (Syntax error as exception): Avoid spurious failure at least when compiling with g++-4.7.x due to lack of declaration of getenv. Include <stdlib.h>.
* maint: trust Automake for parser headers.Akim Demaille2012-02-152-2/+0
| | | | | | * examples/calc++/local.mk, src/local.mk: Now that automake can see `-d' in AM_YFLAGS, we can rely on it to compile and ship the parser header files.
* maint: help Automake reading Yacc flags.Akim Demaille2012-02-151-1/+1
| | | | * Makefile.am (AM_YFLAGS): Automake looks for "-d" alone.
* calc++: rely on Automake.Akim Demaille2012-02-154-46/+41
| | | | | | | | | | | | | | | | | | | | | | | Rely on $(YACC) being the bison being built, and let Automake do the rest. It turned out to be much more difficult than anticipated, for various reasons, including some bad behavior from Automake 1.11.2 which (i) generates calc++-parser.h instead of calc++-parser.hh, and (ii) leaves an #include "y.tab.h" in the generated parser instead of #include "calc++-parser.h". The authors of Automake appear to be aware of the problem, http://lists.gnu.org/archive/html/automake/2011-05/msg00008.html so a simple work around will suffice for the time being. * examples/calc++/y.tab.h, examples/calc++/calc++-parser.hh: New. To work around Automake 1.11.2 issues. * examples/calc++/local.mk: Remove all the rules for compilation with bison, leave them to Automake. So provide it with "calc++-parse.yy" as a source file. (calc_sources_generated, calc_sources_extracted): Rename as. (calc_generated, calc_extracted): these. (calc_sources): New. Fix them.
* maint: tidy the Makefile a bit.Akim Demaille2012-02-142-11/+13
| | | | | | | | | * src/local.mk: Put yacc related variables together. (AUTOMAKE_OPTIONS): Move to... * Makefile.am: here. Remove an old Emacs mode request which disables Automake support. * src/local.mk (YACC, AM_YFLAGS): Move to... * Makefile.am: here, as they will be used by other local.mks.
* maint: de-recurse the handling of examplesAkim Demaille2012-02-148-55/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The directory was still using a local Makefile.am because it provides "scoped" Make variables: these examples are not meant to use the same CPPFLAGS etc. If we were to use the same -I set, we'd pick up gnulib's stdio.h for instance, which we do not want for these simple examples. Yet, as a result, the dependencies are less accurate, there is code duplication, etc. This is especially perceptible when trying to extract more examples from the documentation, as will be done in forthcoming changes. In order to make the tuning of CPPFLAGS easier, discard the predefined -I from Automake. * examples/calc++/Makefile.am: Rename as... * examples/calc++/local.mk: this. Adjust the paths which are now rooted in top_srcdir/top_builddir. Handle BISON_CXX_WORKS here, instead of the too crude previous approach that completely discarded the whole directory. ($(BISON)): Remove now useless bouncing recipe. (calc___CPPFLAGS): New. Stay away from -Ilib. * Makefile.am, configure.ac, examples/local.mk, * examples/calc++/test: Adjust. * configure.ac: Pass nostdinc to Automake. * src/local.mk, lib/local.mk (AM_CPPFLAGS): Move to... * Makefile.am: here. * src/local.mk, examples/calc++/Makefile.am (BISON, BISON_IN): Factor to... * Makefile.am: here. * tests/local.mk: Use it.
* variant: fix the example.Akim Demaille2012-02-141-1/+1
| | | | | * examples/variant.yy: Adjust to "assert" being now "parse.assert".
* maint: more authors.Akim Demaille2012-02-141-1/+16
| | | | | * AUTHORS: here. Suggested by Tys Lefering.
* maint: add license headers.Akim Demaille2012-02-146-0/+98
| | | | | | * examples/calc++/test, examples/variant.yy, AUTHORS, THANKS, * tests/atlocal.in, tests/bison.in: Add license headers. Reported by Tys Lefering.
* maint: remove obsolete file.Akim Demaille2012-02-141-16/+0
| | | | | * etc/make-ChangeLogs: Remove (used for rcs to cvs migration!). Reported by Tys Lefering.
* lalr1.cc: also handle syntax_error when calling yylex.Akim Demaille2012-02-104-7/+39
| | | | | | | | * data/lalr1.cc (parse): Catch syntax_error around yylex and forward them to errlab1. * tests/c++.at (Syntax error as exception): Check support for syntax exceptions raised by the scanner. * NEWS, doc/bison.texinfo: Document it.
* tests: lalr1.cc: check syntax_error.Akim Demaille2012-02-101-0/+75
| | | | * tests/c++.at (Syntax error as exception): New.
* tests: don't require locations uselessly.Akim Demaille2012-02-101-4/+3
| | | | | * tests/c++.at (Syntax error discarding no lookahead): Contrary to 2.5, C++ parsers can work without locations.
* maint: more silent rules.Akim Demaille2012-02-102-9/+12
| | | | | | | | | * tests/local.mk (TESTSUITE_AT): Include plackage.m4. Adjust dependencies. Make testsuite.at its first argument. (package.m4): Be silent. (testsuite): Be silent. Use $<.
* skeletons: simplify the protections against "unused" warnings.Akim Demaille2012-02-103-21/+15
| | | | | | | | | | | | | | * data/c.m4 (b4_parse_param_use): Also accept optional arguments to "use". Simplify callers. * data/glr.c (yyuserAction): Simplify use of b4_parse_param_use. (yy_reduce_print): Don't use b4_parse_param_use, as all the arguments _are_ used. * data/lalr1.cc (YY_SYMBOL_PRINT): Even when disabled, "use" the symbol argument. This neutralizes a warning in yypush_ when there are no symbols with a semantic values. (yy_destroy_): Remove useless "use" of yymsg.
* glr: formatting changes.Akim Demaille2012-02-101-4/+10
| | | | * data/glr.c: Split long strings.
* use a more consistent quoting style.Akim Demaille2012-02-0814-68/+73
| | | | | | | | | | | | | | | | See <http://lists.gnu.org/archive/html/bug-bison/2012-01/msg00120.html>. Use quotearg as often as possible instead of leaving the choice of the quotes to the translators. Use shorter messages. Factor similar messages to a single format, to make localization easier. * src/files.c, src/getargs.c, src/muscle-tab.c, src/reader.c * src/scan-code.l, src/scan-gram.l, src/symtab.c: Use quote() or quotearg_colon() on printf arguments instead of quotes in the format string. * data/bison.m4: Keep sync with the changes in muscle-tab.c. * tests/skeletons.at, tests/input.at, tests/regression.at: Adjust expected messages.
* maint: reenable sc_m4_quote_checkJim Meyering2012-01-312-2/+1
| | | | | * cfg.mk (local-checks-to-skip): Reenable sc_m4_quote_check. * m4/dmalloc.m4: Add quotes.
* maint: force "make syntax-check" to pass by skipping failing testsJim Meyering2012-01-311-6/+18
| | | | | * cfg.mk (local-checks-to-skip): Skip all currently-failing tests. Remove changelog-check; it's long gone.
* maint: more silent-rules.Akim Demaille2012-01-313-37/+36
| | | | | * doc/local.mk, src/local.mk, examples/calc++/Makefile.am: Use $(AM_V_GEN) and $(AM_V_at) where appropriate.
* do not ignore errors like ENOSPC,EIO when writing to stdoutJim Meyering2012-01-294-1/+13
| | | | | | | | | | | | | | | | | | | Standard output was never explicitly closed, so we could not detect failure. Thus, bison would ignore the errors of writing to a full file system and getting an I/O error on write, but only for standard output, e.g., for --print-localedir, --print-datadir, --help and some verbose output. Now, "bison --print-datadir > /dev/full" reports the write failure: bison: write error: No space left on device Before, it would exit 0 with no diagnostic, implying success. This is not an issue for "--output=-" or the other FILE-accepting command-line options, because unlike most other GNU programs, an output file argument of "-" is treated as the literal "./-", rather than standard output. * bootstrap.conf (gnulib_modules): Add closeout. * src/main.c: Include "closeout.h". Use atexit to ensure we close stdout. * .gitignore: Ignore new files pulled in via gnulib-tool.
* tests: fix expected output.Akim Demaille2012-01-261-1/+0
| | | | * tests/actions.at (YYBACKUP): here.
* maint: fix configure.acAkim Demaille2012-01-261-1/+1
| | | | | | Fix commit 1890a2a816dab86c23cc1d0af8fac3986335deb7. * configure.ac: Fix variable assignment.
* yacc: fix YYBACKUP.Akim Demaille2012-01-265-46/+71
| | | | | | | | | | | Reported by David Kastrup: https://lists.gnu.org/archive/html/bug-bison/2011-10/msg00002.html. * data/yacc.c (YYBACKUP): Accept rhs size. Restore the proper state value. * TODO (YYBACKUP): Make it... * tests/actions.at: a new test case. * NEWS, THANKS: Update.
* maint: update TODO.Akim Demaille2012-01-251-25/+0
| | | | * TODO (Labeling the symbols): Remove, it's done ("Name references").
* maint: update THANKS.Akim Demaille2012-01-251-1/+1
| | | | * THANKS: Update Tys's address, on his request.
* maint: fix --gcc-warnings support.Akim Demaille2012-01-251-5/+5
| | | | | * configure.ac: Use enable_gcc_warnings instead of enableval, which is valid only with AC_ARG_ENABLE.
* maint: silent-rules.Akim Demaille2012-01-251-1/+2
| | | | | * configure.ac: Ask for silent-rules support. Enable it by default.
* tests: port to Solaris 10 'diff -u'Paul Eggert2012-01-241-2/+2
| | | | | | | * tests/regression.at (parse-gram.y: LALR = IELR): Port to Solaris 10, where "diff -u X X" outputs "No differences encountered" instead of outputting nothing. Reported by Tomohiro Suzuki in <http://lists.gnu.org/archive/html/bug-bison/2012-01/msg00101.html>.