summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
| * maint: fix use of copyright year intervals.Joel E. Denny2009-08-142-0/+2
| | | | | | | | | | | | | | | | | | * gnulib: Update. * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu as now recommended in gnulib/NEWS. * build-aux/update-b4-copyright: Fix. * cfg.mk (update-copyright-env): Configure update-copyright. (cherry picked from commit 75ac158b82be1fab5157b140287368165a50ec82)
| * maint: run "make update-copyright"Joel E. Denny2009-08-0626-26/+36
| |
| * maint: automate annual package-wide copyright-year update.Joel E. Denny2009-08-042-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * .x-update-copyright: New. * Makefile.am (EXTRA_DIST): Remove maint.mk. * bootstrap.conf (gnulib_modules): Add maintainer-makefile and update-copyright. Remove gnumakefile, which is implied by maintainer-makefile. * cfg.mk (bootstrap-tools): Copy from old maint.mk. * gnulib: Update. * maint.mk: Remove, now copied from gnulib. * examples/extexi: Add missing "(C)" in copyright statement so update-copyright can recognize it. * src/LR0.h: Likewise. * src/print.h: Likewise. * src/print_graph.h: Likewise. * src/named-ref.c: Likewise. * src/named-ref.h: Likewise. * src/gram.c: Add missing comma in copyright statement. * src/gram.h: Likewise. (cherry picked from commit 50bcb22c4cda30353f44930b0a29519609527408) Conflicts: gnulib src/gram.c
| * gnulib: update.Akim Demaille2009-06-102-0/+2
| | | | | | | | | | | | | | | | | | | | * gnulib: Update to latest. * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, * m4/.gitignore: Regen. * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr): Call xalloc_die on hash_insert failures. Requested by the new __warn_unused_result__ attribute of hash_insert.
| * Finish implementing %define lr.type.Joel E. Denny2009-04-211-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Its value can be "LALR", "IELR", or "canonical LR". * lib/timevar.def (TV_IELR_PHASE1): New var. (TV_IELR_PHASE2): New var. (TV_IELR_PHASE3): New var. (TV_IELR_PHASE4): New var. * src/Makefile.am (bison_SOURCES): Add AnnotationList.c, AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c, Sbitset.h, ielr.h, and ielr.c. * src/getargs.h, src/getargs.c (enum trace, trace_args, trace_types): Add trace_ielr. * src/lalr.h, src/lalr.c (ngotos): Export it. (F): Rename to... (goto_follows): ... this, update all uses, and export it. (set_goto_map): Export it. (map_goto): Export it. (compute_lookahead_tokens): Don't free goto_follows yet. Now handled in ielr. (initialize_LA): Export it. Move lookback allocation to... (lalr): ... here because, for canonical LR, initialize_LA must be invoked but lookback and much of the rest of LALR isn't needed. * main.c (main): Instead of lalr, invoke ielr, which invokes lalr. * src/reader.c (reader): Default lr.type to "LALR". Default lr.default_rules to "accepting" if lr.type is "canonical LR". Leave the default as "all" otherwise. Check for a valid lr.type value. * src/state.h, src/state.c (struct state_list): Add state_list member. (state_new): Initialize state_list member to NULL. (state_new_isocore): New function, exported. * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that exercises all values of lr.type. (GNU AWK Grammar): Rename test group to... (GNU AWK 3.1.0 Grammar): ... this, and extend to use AT_TEST_EXISTING_GRAMMAR. (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR. (GNU pic Grammar): Rename test group to... (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use AT_TEST_EXISTING_GRAMMAR. * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises all values of lr.type. (Single State Split): New test groups using AT_TEST_LR_TYPE. (Lane Split): Likewise. (Complex Lane Split): Likewise. (Split During Added Lookahead Propagation): Likewise.
| * gnulib: update.Akim Demaille2009-03-261-3/+3
| | | | | | | | | | | | * gnulib: Update to latest. * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so use +=.
| * Update gnulib.Akim Demaille2009-02-122-0/+4
| |
| * Version 2.4.1.v2.4.1branch-2.4.1Joel E. Denny2008-12-111-1/+2
| | | | | | | | | | | | * NEWS: Set version and date. * lib/Makefile.am: Update copyright year. * tests/atlocal.in: Update copyright year.
| * Replace m4/warning.m4 with warnings module.Paolo Bonzini2008-11-121-1/+1
| | | | | | | | | | | | | | | | * bootstrap.conf: Replace m4/warning.m4 with warnings module. * configure.ac: Adjust usage. * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS). * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS). * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
* | build: comment changes.akimAkim Demaille2012-02-241-5/+2
| | | | | | | | | | | | | | * Makefile.am, examples/calc++/local.mk, examples/local.mk, * examples/mfcalc/local.mk, examples/rpcalc/local.mk, * lib/local.mk, src/local.mk, tests/local.mk: Make the copyright licenses more uniform.
* | maint: address sc_bindtextdomain, sc_program_name and sc_prohibit_HAVE_MBRTOWC.Akim Demaille2012-02-191-0/+2
| | | | | | | | | | | | | | | | * 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.
* | bitset: fix an incorrect error message.Akim Demaille2012-02-191-1/+1
| | | | | | | | | | * lib/bitset_stats.c: here. Reported by Stefano Lattarini.
* | maint: avoid "magic number exit".Akim Demaille2012-02-181-0/+1
| | | | | | | | | | | | | | | | | | * 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: address a couple of syntax-check errors.Akim Demaille2012-02-181-6/+6
| | | | | | | | | | | | | | | | | | | | * 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.
* | use a more consistent quoting style.Akim Demaille2012-02-081-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | do not ignore errors like ENOSPC,EIO when writing to stdoutJim Meyering2012-01-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | build: avoid possibly-replaced fprintf in liby-source, yyerror.cJim Meyering2012-01-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | * lib/yyerror.c (yyerror): Use fputs and fputc rather than fprintf with a mere "%s\n" format. Always return 0 now, on the assumption that the return value was never used anyway. Don't include <config.h> after all. This avoids a problem reported by Thiru Ramakrishnan in http://lists.gnu.org/archive/html/help-bison/2011-11/msg00000.html * cfg.mk: Exempt lib/yyerror.c from the sc_require_config_h_first test. * THANKS: Update.
* | quote consistently and make tests pass with new quoting from gnulibJim Meyering2012-01-191-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updating to gnulib pulled in new quote and quotarg modules, by which quoting is now done like 'this' rather than `this'. That change induces many "make check" test failures. This change adapts code and tests so that "make check" passes once again. * src/scan-code.l: Quote like 'this', not like `this'. * src/scan-gram.l: Likewise. * src/symtab.c: Likewise. * tests/actions.at: Adjust tests to match. * tests/input.at: Likewise. * tests/named-refs.at: Likewise. * tests/output.at: Likewise. * tests/regression.at: Likewise. * lib/.gitignore: Regenerate. * m4/.gitignore: Likewise.
* | build: include <config.h> from lib/yyerror.cJim Meyering2012-01-191-0/+1
| | | | | | | | * lib/yyerror.c: Include <config.h>.
* | build: avoid warning from coverity about lbitset_elt_findJim Meyering2012-01-131-3/+2
| | | | | | | | | | | | | | * lib/lbitset.c (lbitset_elt_find): Remove unnecessary test of "elt", at a point where we know it is non-NULL, due to prior dereference. Copyright (C) 1987-1988, 1991-2012 Free Software Foundation,
* | maint: run "make update-copyright".Jim Meyering2012-01-1326-26/+26
| |
* | build: avoid warnings about set-but-not-used variablesJim Meyering2012-01-063-12/+0
| | | | | | | | | | | | | | * lib/bitset_stats.c (bitset_stats_list): Remove declaration and set of unused local, "type". * lib/ebitset.c (ebitset_init): Likewise, for "size". * lib/lbitset.c (lbitset_not): Likewise, for "elt".
* | global: remove unnecessary horizontal tabs.Joel E. Denny2011-07-2411-1098/+1098
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change was made by applying emacs' untabify function to nearly all files in Bison's repository. Required tabs in make files, ChangeLog, regexps, and test code were manually skipped. Other notable exceptions and changes are listed below. * bootstrap: Skip because we sync this with gnulib. * data/m4sugar/foreach.m4 * data/m4sugar/m4sugar.m4: Skip because we sync these with Autoconf. * djgpp: Skip because I don't know how to test djgpp properly, and this code appears to be unmaintained anyway. * README-hacking (Hacking): Specify that tabs should be avoided where not required.
* | Pacify -DGNULIB_POSIXCHECK.Joel E. Denny2011-05-011-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bootstrap.conf (gnulib_modules): Add all modules suggested by -DGNULIB_POSIXCHECK. * src/files.c (file_name_split) * src/getargs.c (getargs) * src/location.c (boundary_set_from_string) * src/output.c (output_skeleton) * src/parse-gram.y (prologue_declaration) * src/scan-gram.l (handle_syncline) * src/symtab.c (symbol_new): Use mbschr and mbsrchr instead of strchr and strrchr. In the cases of command-line options, file names, and thus locations, functionality may be improved. In the case of symbol names, there should be no functional difference as all characters are ASCII, so the intended benefit is just warning suppression. (cherry picked from commit d143e9c33f07e1a9966c10077f43e2f81232bf6c) Conflicts: src/output.c src/parse-gram.c src/parse-gram.h
* | gnulib, autoconf: update.Joel E. Denny2011-04-161-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * README-hacking (Updating a submodule): Give advice on how to determine the versions of gnulib and autoconf to which we should update. (Release Procedure): Note that submodules should be updated. * bootstrap.conf (gnulib_modules): Rename pipe to spawn-pipe as suggested in updated gnulib NEWS. * gnulib: Choose a stable snapshot according to advice in Bison's README-hacking. * po/POTFILES.in (lib/pipe.c): Rename to... (lib/spawn-pipe.c): ... this. * src/output.c: Update to include spawn-pipe.h. * submodules/autoconf: Update to latest for improvement in m4.m4 that excludes M4 with buggy strstr. The only other changes to files that we use are copyright updates. (cherry picked from commit a898435b25eca4869e8c49b2b0fb1f649b030ce7) Conflicts: build-aux/.gitignore
* | maint: run "make update-copyright".Joel E. Denny2011-01-0226-37/+31
| |
* | maint: re-anchor all .gitignore entries.Joel E. Denny2010-10-171-216/+216
| | | | | | | | | | | | | | | | | | * bootstrap: Copy from gnulib's latest for the fix to automatically anchor entries it constructs. * gnulib: Update to latest just so it has the same bootstrap. * .gitignore, build-aux/.gitignore, doc/.gitignore: * lib/.gitignore, m4/.gitignore, po/.gitignore: * runtime-po/.gitignore: Re-anchor all entries.
* | Adjust to recent changes to gnulib bootstrap.Paul Eggert2010-10-082-441/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore: * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore: * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore: * tests/.cvsignore: Remove; I don't use CVS to maintain Bison anymore and don't know of anybody else who does. If someone needs these files, they can resurrect them. * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore: * m4/.gitignore, po/.gitignore, runtime-po/.gitignore: Omit leading '/', since bootstrap omits it. Adjust file names to match current contents better. * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook installed just for us. * bootstrap.conf (excluded_files): Don't exclude codeset.m4, glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now needed somehow. Don't have time to look into why. (gnulib_modules): Change malloc to malloc-gnu. Do we really assume the GNU malloc behavior, where malloc (0) != NULL unless we're out of storage? If not, we can omit malloc-gnu; but for now I left it in to be safe. (vc_ignore): Remove. (gnulib_mk_hook): New function. * README-hacking: Renamed from HACKING, since gnulib bootstrap now uses that convention.
* | maint: use announce-gen's new --mail-headers.Joel E. Denny2010-07-252-0/+4
| | | | | | | | | | | | | | | | | | * HACKING (Announce): Update instructions. * cfg.mk (announcement_Cc_): Define. * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as required by latest gnulib. * gnulib: Update to latest. (cherry picked from commit e5655564583f2f704dd85d6f602f5fcd86f87467)
* | Do not use date ranges in copyright notices.Paul Eggert2010-06-1726-31/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha: * TODO, bootstrap, bootstrap.conf: * build-aux/update-b4-copyright, cfg.mk, configure.ac: * data/README, data/bison.m4, data/c++-skel.m4, data/c++.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.texinfo, doc/local.mk: * doc/refcard.tex, etc/README, etc/bench.pl.in, etc/local.mk: * examples/calc++/Makefile.am, examples/extexi: * examples/local.mk, 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/subpipe.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/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.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/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/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: Don't use date ranges in copyright notices. Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
* | portability: fix several issues with M4 subprocess.Joel E. Denny2010-02-225-208/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | M4's output pipe was not being drained upon fatal errors during scan_skel. As a result, broken-pipe messages from M4 were seen on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a failure in the test suite. The problem was that, on platforms where the default disposition for SIGPIPE is ignore instead of terminate, M4 sometimes saw fwrite fail with errno=EPIPE and then reported it. However, there's some sort of race condition, because the new test group occasionally succeeded. Reported by Albert Chin at <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>. There were also problems with the test suite livelocking on Tru64 5.1b. Reported by Didier Godefroy at <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>. Switching to create_pipe_bidi suggested by Akim Demaille. To attempt to solve both of these problems, switch to gnulib's create_pipe_bidi and register M4 process as a slave. Along the way, clean up file name conflict handling, which was affected by the broken-pipe problem before the switch. * NEWS (2.4.2): Document. * THANKS (Didier Godefroy): Add. * bootstrap.conf (gnulib_modules): Add pipe. * gnulib: Update to latest to make sure we have all the latest fixes. * lib/local.mk (lib_libbison_a_SOURCES): Remove subpipe.h and subpipe.c. * po/POTFILES.in (lib/subpipe.c): Remove. * src/files.c (compute_output_file_names): Update invocations of output_file_name_check. (output_file_name_check): In the case that the grammar file would be overwritten, use complain instead of fatal, but replace the output file name with /dev/null. Use the /dev/null solution for the case of two conflicting output files as well because it seems safer in case Bison one day tries to open both files at the same time. * src/files.h (output_file_name_check): Update prototype. * src/output.c (output_skeleton): Use create_pipe_bidi and wait_subprocess. Assert that scan_skel completely drains the pipe. * src/scan-skel.l (at_directive_perform): Update output_file_name_check invocation. * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the grammar file actually isn't overwritten. (Conflicting output files: -o foo.y): Update expected output. * tests/skeletons.at (Fatal errors but M4 continues producing output): New test group. (cherry picked from commit 22cc8d813ee57c9631e527a31010ab138f9b7e06) Conflicts: NEWS bootstrap.conf lib/.cvsignore lib/.gitignore lib/Makefile.am m4/.cvsignore m4/.gitignore src/output.c
* | * bootstrap: Import improvements from latest gnulib.Joel E. Denny2010-01-202-0/+14
| | | | | | | | | | | | | | | | (cherry picked from commit 73edad9a25ff7dd15f276a071a39e95bc8cca07a) Conflicts: bootstrap
* | gnulib: update to latest.Joel E. Denny2010-01-192-0/+4
| |
* | maint: run "make update-copyright"Joel E. Denny2010-01-0428-34/+33
| |
* | portability: use -DGNULIB_POSIXCHECK.Joel E. Denny2009-12-152-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported by Eric Blake. See discussions at <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html> and <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>. * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK. * bootstrap.conf (gnulib_modules): Add all the printf modules suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c. (excluded_files): Remove m4/printf-posix.m4. * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add lib/libbison.a so gnulib libraries can be linked.
* | gnulib: update for fix of fprintf-posix, which we'll use soon.Joel E. Denny2009-12-152-0/+10
| | | | | | | | | | | | | | * etc/prefix-gnulib-mk (prefix): Adjust regex for make file targets so that gnulib's new arg-nonnull.h and link-warning.h are matched. * gnulib: Update.
* | maint: fix use of copyright year intervals.Joel E. Denny2009-08-142-0/+2
| | | | | | | | | | | | | | | | | | * gnulib: Update. * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu as now recommended in gnulib/NEWS. * build-aux/update-b4-copyright: Fix. * cfg.mk (update-copyright-env): Configure update-copyright. (cherry picked from commit 75ac158b82be1fab5157b140287368165a50ec82)
* | maint: run "make update-copyright"Joel E. Denny2009-08-0627-27/+37
| |
* | maint: automate annual package-wide copyright-year update.Joel E. Denny2009-08-042-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * .x-update-copyright: New. * Makefile.am (EXTRA_DIST): Remove maint.mk. * bootstrap.conf (gnulib_modules): Add maintainer-makefile and update-copyright. Remove gnumakefile, which is implied by maintainer-makefile. * cfg.mk (bootstrap-tools): Copy from old maint.mk. * gnulib: Update. * maint.mk: Remove, now copied from gnulib. * examples/extexi: Add missing "(C)" in copyright statement so update-copyright can recognize it. * src/LR0.h: Likewise. * src/print.h: Likewise. * src/print_graph.h: Likewise. * src/named-ref.c: Likewise. * src/named-ref.h: Likewise. * src/gram.c: Add missing comma in copyright statement. * src/gram.h: Likewise. (cherry picked from commit dbbb64f09180b8749e3a91d3559e13b933cd15c8) Conflicts: Makefile.am gnulib maint.mk src/gram.h
* | gnulib: update.Akim Demaille2009-06-102-0/+2
| | | | | | | | | | | | | | | | | | | | * gnulib: Update to latest. * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, * m4/.gitignore: Regen. * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr): Call xalloc_die on hash_insert failures. Requested by the new __warn_unused_result__ attribute of hash_insert.
* | Finish implementing %define lr.type.Joel E. Denny2009-04-211-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Its value can be "LALR", "IELR", or "canonical LR". * lib/timevar.def (TV_IELR_PHASE1): New var. (TV_IELR_PHASE2): New var. (TV_IELR_PHASE3): New var. (TV_IELR_PHASE4): New var. * src/local.mk (src_bison_SOURCES): Add AnnotationList.c, AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c, Sbitset.h, ielr.c, and ielr.h. * src/getargs.h, src/getargs.c (enum trace, trace_args, trace_types): Add trace_ielr. * src/lalr.h, src/lalr.c (ngotos): Export it. (F): Rename to... (goto_follows): ... this, update all uses, and export it. (set_goto_map): Export it. (map_goto): Export it. (compute_lookahead_tokens): Don't free goto_follows yet. Now handled in ielr. (initialize_LA): Export it. Move lookback allocation to... (lalr): ... here because, for canonical LR, initialize_LA must be invoked but lookback and much of the rest of LALR isn't needed. * main.c (main): Instead of lalr, invoke ielr, which invokes lalr. * src/reader.c (reader): Default lr.type to "LALR". Default lr.default_rules to "accepting" if lr.type is "canonical LR". Leave the default as "all" otherwise. Check for a valid lr.type value. * src/state.h, src/state.c (struct state_list): Add state_list member. (state_new): Initialize state_list member to NULL. (state_new_isocore): New function, exported. * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that exercises all values of lr.type. (GNU AWK Grammar): Rename test group to... (GNU AWK 3.1.0 Grammar): ... this, and extend to use AT_TEST_EXISTING_GRAMMAR. (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR. (GNU pic Grammar): Rename test group to... (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use AT_TEST_EXISTING_GRAMMAR. * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises all values of lr.type. (Single State Split): New test groups using AT_TEST_LR_TYPE. (Lane Split): Likewise. (Complex Lane Split): Likewise. (Split During Added Lookahead Propagation): Likewise.
* | Upgrade gnulib.Akim Demaille2009-02-262-0/+4
| | | | | | | | | | | | * gnulib: Upgrade from master. * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore: Regen.
* | Convert lib/Makefile.am into lib/local.mk.Akim Demaille2008-11-262-45/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The real problem is rather gnulib.mk, which itself is extracted from a Makefile.am that gnulib expects to the "recursive". The tool prefix-gnulib-mk converts such a gnulib.mk to be non-recursive. Also, some AC_SUBST variables need to be adjusted. * etc/prefix-gnulib-mk: New. * bootstrap (slurp): Use it to convert further gnulib.mk. * lib/Makefile.am: Rename as... * lib/local.mk: this. Adjust to be prefixed. * Makefile.am, configure.ac: Adjust. * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
* | Replace m4/warning.m4 with warnings module.Paolo Bonzini2008-11-111-1/+1
|/ | | | | | | | * bootstrap.conf: Replace m4/warning.m4 with warnings module. * configure.ac: Adjust usage. * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS). * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS). * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
* Update several administrative files mainly to facilitate releasing.Joel E. Denny2008-10-182-0/+2
| | | | | | | | | | | | | | | | | | * HACKING (Administrivia): Make the git-merge-changelog notes more helpful. (Test suite): Don't say lalr1.cc is not exercised in the test suite. (Release Procedure): Update for git and add numerous details that were previously missing. * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint. * maint.mk (announcement): Don't list bison as a bootstrap tool so that announcements don't claim we bootstrapped with whatever bison happened to be in PATH. Add flex as a bootstrap tool. * Makefile.maint: Remove, previously replaced by maint.mk. * Makefile.cfg: Remove, and migrate settings to... * cfg.mk: ... here for the sake of `make announcement'. * bootstrap.conf (gnulib_modules): Add announce-gen. * README: Say GNU Bison instead of just Bison. Suggested by Karl Berry.
* Fix some .gitignore and .cvsignore problems.Joel E. Denny2008-07-161-0/+1
| | | | | | | | | | | | | | | | | | | * bootstrap (insert_sorted_if_absent): Replace all uses with... (insert_vc_ignore): ... this new function, which prepends `/' to all .gitignore entries before passing them to insert_sorted_if_absent. * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that .cvsignore files are maintained even though Bison developers run bootstrap while using Git. * .cvsignore (*.patch *.log log patches applied): Remove, apparently unneeded by Bison. (gnulib): Add. * .gitignore (/*.patch *.log log patches applied): Remove, broken and unneeded. Reported by Eric Blake. * lib/.gitignore (/*~): Add. * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore. * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric Blake. * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
* Improve forward-compatibility with GNU M4.Joel E. Denny2008-07-152-0/+2
| | | | | | | | | | | | | Reported by Eric Blake at <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>. * bootstrap.conf (gnulib_modules): Add unsetenv. * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add. * m4/.gitignore, m4/.cvsignore (/environ.m4): Add. (/setenv.m4): Add. * src/output.c (output_skeleton): For the m4 invocation, pass -dV as the first argument because it may become position-dependent, and unset POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions. Add comments explaining these issues in more detail.
* Add .gitignore everywhere based on .cvsignore.Joel E. Denny2008-07-141-0/+105
| | | | | | | | | | | | | | | | * .gitignore: New. * build-aux/.gitignore: New. * data/.gitignore: New. * doc/.gitignore: New. * etc/.gitignore: New. * examples/.gitignore: New. * examples/calc++/.gitignore: New. * lib/.gitignore: New. * m4/.gitignore: New. * po/.gitignore: New. * runtime-po/.gitignore: New. * src/.gitignore: New. * tests/.gitignore: New.
* Update to the current gnulib CVS repository, and fix trigraph handlingJoel E. Denny2008-04-211-0/+10
| | | | | | | | | | | | | | | | | | | in Bison. * bootstrap: Update gnulib CVS repository URL. (symlink_to_dir): Encapsulate the code that guarantees the destination directory exists into... (check_dst_dir): ... this new function, and... (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't fail when copying files into lib/uniwidth/. * src/output.c (prepare_symbols): When writing yytname muscles, where symbol names will be encoded in C-string literals, tell quotearg to escape trigraphs. This used to be the default in gnulib. * tests/regression.at (Token definitions): Because of the change in gnulib's quotearg behavior, string_as_id in parse-gram.y no longer escapes trigraphs in symbol names. Thus, yytname no longer has trigraphs unnecessarily doubly escaped. Update test case output. Extend test case to be sure Bison's own error messages will no longer have trigraphs in symbol names unnecessarily escaped once.
* * src/gram.c (rule_rhs_print_xml): Now static, since it isn't usedPaul Eggert2007-09-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | elsewhere. * src/print-xml.c: Prefer "const" after types; that's more consistent. (xml_printf): Indent just 1 space for level. (e_char, xlate_char): Remove. (xml_escape_string): Rewrite to avoid undefined behavior (used storage that was freed from the stack). (xml_escape_n): Don't bother checking for subscript error. 2007-09-21 Wojciech Polak <polak@gnu.org> Add support for an -x option to generate an XML report. It is not documented yet. * src/print-xml.c: New file. * src/print-xml.h: Likewise. * lib/timevar.def (TV_XML): New var. * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h. * src/conflicts.c: Include print-xml.h. (solved_conflicts_xml_obstack): New var. (log_resolution, conflicts_solve, conflicts_free): Add support for XML report. (conflicts_output_val): New function. * src/conflicts.h (conflicts_output_val): New decl. * src/files.c (spec_xml_file): New var. (compute_output_file_names, output_file_names_free): Add XML support. * src/files.h (spec_xml_file): New decl. * src/getargs.c (xml_flag): New var. (usage, short_options, long_options, getargs): Add XML support. * src/getargs.h (xml_flag): New decl. * src/gram.c: Include print-xml.h. (rule_lhs_print_xml, rule_rhs_print_xml): (grammar_rules_partial_print_xml, grammar_rules_print_xml): New functions. * src/gram.h: Declare external ones. * src/main.c: Include print-xml.h. (main): Add XML support. * src/reduce.c: Include print-xml.h. (reduce_xml): New function. * src/reduce.h: Declare it. * src/state.c: Include print-xml.h. (state_new): Add XML support. (state_rule_lookahead_tokens_print_xml): New function. * src/state.h: Declare it. (struct state): New member solved_conflicts_xml. * src/symtab.c (symbol_class_get_string): New function. * src/symtab.h: Declare it. 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>