summaryrefslogtreecommitdiff
path: root/m4
Commit message (Collapse)AuthorAgeFilesLines
* 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-235-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/location.cc: * 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/subpipe.c, djgpp/subpipe.h: * djgpp/testsuite.sed, doc/bison.texinfo: * doc/refcard.tex, etc/README, etc/bench.pl.in: * examples/calc++/Makefile.am, examples/extexi: * 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/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/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/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: * data/Makefile.am, data/location.cc, doc/Makefile.am, src/Makefile.am: * tests/Makefile.am, lib/Makefile.am, examples/Makefile.am: * etc/Makefile.am: 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 spawning on at least FreeBSD 8 and FreeBSD 9.Joel E. Denny2010-03-232-0/+4
| | | | | | | | | | | | | Reported by Johan van Selst at <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>. * NEWS (2.4.3): New. * THANKS (Johan van Selst): Add. * gnulib: Update to latest. (cherry picked from commit 311b2e56eaad952fc7908336e3aeb019dd8bf1ee) Conflicts: NEWS
* portability: fix several issues with M4 subprocess.Joel E. Denny2010-02-222-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/Makefile.am (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 m4/.cvsignore m4/.gitignore src/output.c
* gnulib: update to latest.Joel E. Denny2010-01-192-0/+6
|
* maint: run "make update-copyright"Joel E. Denny2010-01-045-5/+6
|
* portability: use -DGNULIB_POSIXCHECK.Joel E. Denny2009-12-152-0/+70
| | | | | | | | | | | | | | | | | | | | | | 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/Makefile.am, add lib/libbison.a so gnulib libraries can be linked. (cherry picked from commit 5c99151aeb4396bf35b482e27075948c33088afa) Conflicts: lib/.cvsignore lib/.gitignore m4/.cvsignore m4/.gitignore
* Enable assertion output and --disable-assert for configure.Joel E. Denny2009-12-142-0/+2
| | | | | | | * bootstrap.conf (gnulib_modules): Add assert module. * src/system.h (aver): Define as assert, and summarize the discussion on this issue. (cherry picked from commit ca01f454f01645533622a59ef0df335ee07679e5)
* 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-065-5/+5
|
* maint: automate annual package-wide copyright-year update.Joel E. Denny2009-08-042-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | * .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
* * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.Joel E. Denny2009-07-211-46/+1
|
* 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.
* Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.Joel E. Denny2009-04-041-26/+45
| | | | | | | | If the first m4 in $PATH is wrong, it keeps looking. Moreover, its requirements for a correct m4 are stricter. * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4. * configure.ac: Update to use AC_PROG_GNU_M4. Reported by Eric Blake.
* Update gnulib.Akim Demaille2009-02-122-0/+12
|
* Replace m4/warning.m4 with warnings module.Paolo Bonzini2008-11-122-0/+2
| | | | | | | | * 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.
* Update for recent change to gnulib.Joel E. Denny2008-08-262-0/+2
| | | | | * src/parse-gram.y: Don't include strverscmp.h. It comes from string.h now.
* Improve forward-compatibility with GNU M4.Joel E. Denny2008-07-152-0/+4
| | | | | | | | | | | | | 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/+63
| | | | | | | | | | | | | | | | * .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.
* Pacify ./configure --enable-gcc-warnings.Joel E. Denny2007-09-241-0/+1
| | | | | | | * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument `char const *' instead of `char *'. * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused local variable `sep'.
* * GNUmakefile: Switch to coreutils's version.Paul Eggert2007-09-211-24/+13
| | | | | | | | | | | | | | * bootstrap: Likewise. * Makefile.cfg: Adjust to new GNUmakefile. * README-hacking: Likewise. Import from gnulib: 2006-08-18 Paul Eggert <eggert@cs.ucla.edu> Bruno Haible <bruno@clisp.org> * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists and is a script that invokes bison. Tighten the code. Add comments.
* Update to GPLv3.Paul Eggert2007-08-155-26/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/gpl-3.0.texi: New file. * doc/gpl.texi: Remove. * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg: * Makefile.maint, NEWS, PACKAGING, README, README-alpha: * README-hacking, TODO, bootstrap, bootstrap.conf: * configure.ac, data/Makefile.am, 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/location.cc: * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4: * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat: * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed: * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h: * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo: * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README: * etc/bench.pl.in, examples/Makefile.am, examples/extexi: * examples/calc++/Makefile.am, lib/Makefile.am, 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/main.c, lib/subpipe.c, lib/subpipe.h: * lib/timevar.c, lib/timevar.def, lib/timevar.h: * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c: * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4: * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am: * 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/lalr.c, src/lalr.h, src/location.c, src/location.h: * src/main.c, src/muscle_tab.c, src/muscle_tab.h: * src/nullable.c, src/nullable.h, src/output.c, src/output.h: * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y: * 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/revision.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/Makefile.am, tests/actions.at, 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/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: Update to GPLv3.
* * bootstrap (slurp): Create target directories that don't exist.Joel E. Denny2007-07-171-0/+1
| | | | Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
* * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTFJoel E. Denny2007-07-021-0/+2
| | | | | | instead of fprintf. Guard these functions with #if YYDEBUG instead of #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison and so that YYFPRINTF is guaranteed to be defined here.
* * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.Joel E. Denny2007-02-191-0/+1
|
* Undo my 2007-02-07 change, switching back to the c-strcase modulePaul Eggert2007-02-121-1/+0
| | | | | | | | | | | | | | introduced in the 2007-02-03 change. Bruno Haible reported that the 2007-02-07 change would be dangerous in Turkish if we add a language whose name contains "i", since "i" is not lowercase "I" in Turkish. * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase. * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h, c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c. * m4/.cvsignore: Remove strcase.m4. * src/getargs.c: Revert 2007-02-07 change, as follows. Include c-strcase.h. (language_argmatch): Use c_strcasecmp rather than strcasecmp.
* Undo most of the 2007-02-03 change, switching to the strcase modulePaul Eggert2007-02-071-0/+1
| | | | | | | | | | | | | | now that gnulib strcase has been fixed. * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase. * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h, c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c * m4/.cvsignore: Add strcase.m4. * src/getargs.c: Revert 2007-02-03 change, as follows. Don't include c-strcase.h. (language_argmatch): Use strcasecmp rather than c_strcasecmp. strcasecmp has "unspecified behavior" outside the POSIX locale, but it works fine in practice if at least one argument is ASCII, as is the case in Bison.
* 2007-01-29 Paolo Bonzini <bonzini@gnu.org>Paolo Bonzini2007-01-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | * NEWS: Mention java. * TODO: Remove things that are done. * bootstrap.conf: Add javacomp-script and javaexec-script. * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC. * data/Makefile.am: Add new files. * data/java-skel.m4: New. * data/java.m4: New. * data/lalr1.java: New. * doc/bison.texinfo: Put "A Complete C++ Example" under C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers under Other Languages. * src/getargs.c (valid_languages): Add Java. * src/getargs.h (struct bison_language): Update size of string fields. * tests/Makefile.am: Add java.at. * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC. * tests/java.at: New. * tests/testsuite.at: Include it.
* Adjust to recent gnulib changes.Paul Eggert2007-01-261-0/+3
| | | | | | | | * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h. Add string.h, string_.h, unistd_.h, wchar_.h. * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4. * src/system.h: Don't include <stpcpy.h>; this is now done by <string.h>.
* For push mode, convert yyparse from a macro to a function, invoke yylexJoel E. Denny2006-12-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of passing a yylexp argument to yypull_parse, and don't generate yypull_parse or yyparse unless %push-pull-parser is declared. Discussed starting at <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>. * data/bison.m4 (b4_pull_if): New. * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH. * data/push.c: Improve M4 quoting a little. (b4_generate_macro_args, b4_parenthesize): Remove. (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse] any time a pull parser is requested. Don't #define this as a wrapper around yypull_parse. Instead, when both push and pull are requested, make it a function that does that same thing. (yypull_parse): If there's a b4_prefix, #define this to b4_prefix[pull_parse] when both push and pull are requested. Don't define this as a function unless both push and pull are requested. Remove the yylexp argument and hard-code yylex invocation instead. * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of %push-parser. * src/getargs.c (pull_parser): New global initialized to true. * getargs.h (pull_parser): extern it. * src/output.c (prepare): Insert pull_flag muscle. * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token. (prologue_declaration): Set both push_parser and pull_parser = true for %push-pull-parser. Set push_parser = true and pull_parser = false for %push-parser. * src/scan-gram.l: Don't accept %push_parser as an alternative to %push-parser since there's no backward-compatibility concern here. Scan %push-pull-parser. * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser instead of %push-parser. * tests/headers.at (export YYLTYPE): Make yylex static, and don't prototype it in the module that calls yyparse. * tests/input.at (Torturing the Scanner): Likewise. * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
* * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoingPaul Eggert2006-11-081-0/+2
| | | | | | | the earlier change today), m4/intl.m4, m4/intldir.m4. This gives us a slightly cleaner distribution, and also works. * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent gnulib changes.
* * bootstrap.conf (gnulib_modules): Add config-h.Paul Eggert2006-10-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * djgpp/subpipe.c: Include <config.h> unconditionally; don't worry about HAVE_CONFIG_H. * lib/abitset.c: Likewise. * lib/bitset.c: Likewise. * lib/bitset_stats.c: Likewise. * lib/bitsetv-print.c: Likewise. * lib/bitsetv.c: Likewise. * lib/ebitset.c: Likewise. * lib/get-errno.c: Likewise. * lib/lbitset.c: Likewise. * lib/subpipe.c: Likewise. * lib/timevar.c: Likewise. * lib/vbitset.c: Likewise. * lib/bitset.c: Include "bitset.h" first, to test interface. * lib/bitset_stats.c: Include "bitset_stats.h" first. * lib/bitsetv-print.c: Include "bitsetv-print.h" first. * lib/bitsetv.c: Include "bitsetv.h" first. * lib/get-errno.c: Include "get-errno.h" first. * m4/.cvsignore: Add config-h.m4. * tests/actions.at (Default %printer and %destructor for ...): Adjust expected line numbers in output to reflect removal of #if HAVE_CONFIG_H lines. * tests/glr-regression.at (Missed %merge type warnings when ...): Likewise. * tests/regression.at (Braced code in declaration in rules section): Likewise. * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H. * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE): Include <config.h> unconditionally.
* Use some of gnulib's new modules, taken from coreutils.Paul Eggert2006-09-151-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bootstrap: Sync from coreutils, except add support for gnulib_files. * bootstrap.conf: New file. (gnulib_modules): Add configmake, inttypes, unistd. (XGETTEXT_OPTIONS): Add complain, complain_at, fatal, fatal_at, warn, warn_at, unexpected_end. * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here. (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this. (gl_EARLY): Add. (AM_STDBOOL_H): Remove; gl_INIT now dows this. (gl_INIT): Add (GNULIB_AUTOCONF_SNIPPET): Remove. (AM_GNU_GETTEXT): Add; require formatstring macros since that's the pickiest. * lib/.cvsignore: Add inttypes_.h. * lib/Makefile.am: Include gnulib.mk first so we can append to it. (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils. (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove no-longer-necessary initializations. (lib_SOURCES): Remove, replacing by libbison_a_SOURCES. * lib/subpipe.c: Include <unistd.h> unconditionally, now that we use the unistd module. * src/system.h: Likewise. * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4, ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4, gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4. * src/Makefile.am (DEFS): Remove, since configmake does this for us. (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us. * src/system.h: Include inttypes.h unconditionally, now that we use the inttypes module. Don't bother to include stdint.h, since inttypes.h now does that for us. (LOCALEDIR): Remove, now that we use the configmake module. * src/getargs.c: Include configmake.h. * src/main.c: Likewise. * src/output.c: Likewise. * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib, not from $abs_top_builddir, since config.h moved.
* Add argmatch.m4. Remove obstack.m4, strerror_r.m4.Paul Eggert2006-09-111-2/+1
| | | | This adjusts to recent gnulib changes.
* * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,Paul Eggert2006-08-021-0/+8
| | | | | | | | | po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4. * bootstrap (gnulib_tool): Stop using --assume-autoconf; the latest gnulib does this a different way. (get_translations): Sharuzzaman Ahmat Raslan reported that the ms translation was patched, so stop omitting it.
* Update to latest gnulib and gettext versions.Paul Eggert2006-07-252-34/+0
| | | | | | | | | | | | | | | | | | | | | | | | * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer. Add fopen-safer. (gnulib_files): Add m4/warning.m4. Don't worry about files overwritten by autopoint. Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4. Suppress "id", "ms", "tr" translations for now, since gettext 0.15 rejects them. Don't use autoreconf; instead, invoke autopoint etc. by hand, so that we can remove the intl files at a better time. (intl_files_to_remove): Remove aclocal.m4, since it gets rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4, m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4, m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4. Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4. Remove datarootdir hack; no longer needed. * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING. (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15. * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c, strdup.h. * m4/.cvsignore: Remove hard-locale.m4, strdup.m4. * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
* Adjust to Autoconf 2.60 and today's gnulib.Paul Eggert2006-07-091-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bootstrap (gnulib_modules): Add stdint. Remove special case for m4/onceonly_2_57.m4, since gnulib-tool no longer copies it. (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4, since stdint needs the former and wcwidth (which is now required by mbswidth) needs the latter. Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to work around a compatibility glitch between gettext 0.14.6 and Autoconf 2.60. * configure.ac (AC_PREREQ): Require Autoconf 2.60. Do not check for uintptr_t, since new stdint module does the right thing. * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h. Add stdint.h, stdint_.h, wcwidth.h. * m4/.cvsignore: Remove alloca.m4, onceonly.m4. Add absolute-header.m4, double-slash-root.m4, longlong.m4, stdint.m4, wchar_t.m4, wcwidth.m4. * src/files.c: Include <dirname.h> and <stdio-safer.h> in the usual order for ../lib/*.h files. (file_name_split): Use last_component, not base_name, to adjust to gnulib changes. * src/parse-gram.h: Include <strverscmp.h> in the usual order for ../lib/*.h files. (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8): Define unconditionally, since we now assume the stdint module. * src/scan-skel.l: Include <dirname.h>. (BASE_QPUTS): Use last_component, not base_name. * src/system.h: Include <unlocked-io.h> in the usual order for ../lib/*.h files. Include <stdint.h> unconditionally, since we now use the stdint module. (uintptr_t): Declare if UINTPTR_MAX is not defined, not HAVE_UINTPTR_T, since we now use the stdint module. (base_name): Remove decl, since files now include <dirname.h> to get the decl.
* Fix some nits reported by twlevo.Paul Eggert2006-03-081-0/+1
| | | | | | | | | * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure" and "POSIX". Use more-modern syntax for URLs. Mention C++ and ask for Java. Don't hardwire OS version numbers. Add copyright notice. * m4/.cvsignore: Add unistd_h.m4, for latest gnulib. * src/conflicts.c (solved_conflicts_obstack): Now static.
* * m4/c-working.m4: New file.Paul Eggert2006-02-121-0/+29
| | | | * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
* * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch aPaul Eggert2006-02-101-4/+8
| | | | | | | | configuration screwup "./configure CC=/opt/SUNWspro/bin/c89 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this messes up because C++ code is compiled in 32-bit mode but linked in 64-bit mode.
* * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check thatPaul Eggert2006-02-021-1/+9
| | | | '#include <map>' works and that you can apply ++ to iterators.
* * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): CheckPaul Eggert2006-02-021-0/+1
| | | | that '#include <string>' works.
* Fix some porting glitches found by Nelson H. F. Beebe.Paul Eggert2006-01-201-3/+4
| | | | | | | | | | | | * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from compilers that don't understand that abort () does not return. * src/state.c (transitions_to): Likewise. * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that '#include <cstdlib>' works. * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX): (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX): #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901, for the benefit of some pre-C99 compilers.
* * m4/cxx.m4, examples/Makefile.am: Don't buildPaul Eggert2005-11-101-0/+1
| | | | examples/calc++ if no C++ compiler is available.
* * bootstrap (gnulib_modules): Add strverscmp.Akim Demaille2005-10-021-0/+1
| | | | | | | | | | | | * lib/.cvsignore: Add strverscmp.c, strverscmp.h. * m4/.cvsignore: Add strverscmp.m4. * src/parse-gram.y (%require): New token, new rule. (version_check): New. * src/scan-gram.l (%require): Adjust. * tests/input.at (AT_REQUIRE): New. Use it. * doc/bison.texinfo (Require Decl): New. (Calc++ Parser): Use %require.
* Port to SunOS 4.1.4, which lacks strtoul and strerror.Paul Eggert2005-09-291-0/+3
| | | | | | * bootstrap (gnulib_modules): Add strerror, strtoul. * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
* * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.Paul Eggert2005-08-221-5/+0
| | | | | | Add strnlen.c. * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4, lib-prefix.m4, po.m4.
* * NEWS: Version 2.0b.Paul Eggert2005-07-241-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on the user's name space. All uses changed to __attribute__ ((__unused__)). (yyFail, yyMemoryExhausted, yyreportAmbiguity): Add __attribute__ ((__noreturn__)). * etc/clcommit: Remove. We weren't using it, and it failed "make maintainer-distcheck". * Makefile.maint: Merge from coreutils. (CVS_LIST, CVS_LIST_EXCEPT): New macros. (syntax-check-rules): Change list of rules as described below. (sc_cast_of_alloca_return_value, sc_dd_max_sym_length): (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof): (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope): (sc_trailing_space): New rules. (sc_xalloc_h_in_src): Remove. (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value): (sc_space_tab, sc_error_exit_success, sc_changelog): (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics): (makefile-check, po-check, author_mark_check): (makefile_path_separator_check, copyright-check): Use grep -n, to make it easier to find violations. Use CVS_LIST and CVS_LIST_EXCEPT. (header_regexp, h_re): Remove. (dd_c): New macro. (sc_dd_max_sym_length, .re-list, news-date-check): New rules. (my-distcheck): Use more-modern GCC flags. (signatures, %.asc): Remove. (rel-files, announcement): Remove signatures. Restore old updating code, even though we don't use it, so that we're the same as coreutils. (alpha, beta, major): Depend on news-date-check. Make the upload commands. * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space. * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise. * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise. * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise. * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise. * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise. * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise. * tests/sets.at: Likewise. * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that we comment out the Autoconf version number. * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as it's error-prone and "make maintainer-distcheck" rejects it. * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H. Indent calls to "error" to pacify "make maintainer-distcheck", when the calls are not intended to be translated. * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h. * src/Makefile.am (DEFS): Use +=, to pacify "make maintainer-distcheck". (bison_SOURCES): Add scan-skel.h. (sc_tight_scope): New rule, from coreutils. * src/files.c (src_extension, header_extension): Now static, not extern. * src/getargs.c (short_options): Likewise. * src/muscle_tab.c (muscle_table): Likewise. * src/parse-gram.y (current_class, current_type, current_prec): Likewise. * src/reader.c (grammar_end, previous_rule_end): Likewise. * src/getargs.h: Redo comments to pacify "make maintainer-distcheck". * src/main.c (main): Cast bindtextdomain and textdomain calls to void, to avoid warning when NLS is disabled. * src/output.c: Include scan-skel.h. (scan_skel): Remove decl, since scan-skel.h does this. (output_skeleton): Indent calls to "error" to pacify "make maintainer-distcheck". * src/print_graph.c: Don't include <obstack.h>, as system.h does this. * src/reader.h (gram_end, gram_lineno): New decls to pacify "make maintainer-distcheck". * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in): (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno): (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug): (skel_lex_destroy, scan_skel): Move these decls to... * src/scan-skel.h: New file. * src/uniqstr.c (uniqstr_assert): Indent calls to "error" to pacify "make maintainer-distcheck". * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR), not @VAR@. * tests/torture.at: Revamp to avoid misuse of atoi that "make maintainer-distcheck" complained about.
* * bootstrap: Get runtime translations into runtime-po.Paul Eggert2005-07-121-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create runtime-po files automatically, if possible. * configure.ac: Invoke BISON_I18N, so that we eat our own dog food. * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS does not infringe on the user's name space. (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS. * doc/bison.texinfo (Internationalization): Revamp the English and Texinfo syntax a bit, to try to make it clearer. (Bison Options, Option Cross Key): Mention --print-localedir. * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to YYENABLE_NLS. Quote a bit more. * runtime-po/.cvsignore: New file. * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot. * runtime-po/Rules-quot: Remove; now created by bootstrap. * runtime-po/quot.sed: Likewise. * runtime-po/boldquot.sed: Likewise. * runtime-po/en@quot.header: Likewise. * runtime-po/en@boldquot.header: Likewise. * runtime-po/insert-header.sin: Likewise. * runtime-po/remove-potcdate.sin: Likewise. * runtime-po/Makevars: Likewise. * runtime-po/LINGUAS: Likewise. * runtime-po/de.po: Likewise; we will rely on the translation project to maintain this, so "bootstrap" should get it. * src/getarg.s (PRINT_LOCALEDIR_OPTION): Let the C compiler determine its value. * src/main.c (main): Bind the bison-runtime domain, too. * data/yacc.c: Include <libintl.h> when NLS is enabled. (YYI18N): Renamed from _. Use dgettext when NLS is enabled. * po/POTFILES.in: Remove autogenerated file src/parse-gram.c. * runtime-po: New directory. * runtime-po/Makefile.in.in: New file, copied from po/, with modified $(DOMAIN).pot-update rule, so that old messages are never dropped. * runtime-po/Rules-quot: New file, copied from po/. * runtime-po/quot.sed: Likewise. * runtime-po/boldquot.sed: Likewise. * runtime-po/en@quot.header: Likewise. * runtime-po/en@boldquot.header: Likewise. * runtime-po/insert-header.sin: Likewise. * runtime-po/remove-potcdate.sin: Likewise. * runtime-po/Makevars: New file. * runtime-po/POTFILES.in: New file. * runtime-po/LINGUAS: New file. * runtime-po/bison-runtime.pot: New file. * runtime-po/de.po: New file. * m4/bison.m4: New file. * Makefile.am (SUBDIRS): Add runtime-po. (aclocaldir, aclocal_DATA): New variables. * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in. Define aclocaldir. * src/getargs.c (usage): Document --print-localedir option. (PRINT_LOCALEDIR_OPTION): New enum item. (long_options): Add --print-localedir option. (getargs): Handle --print-localedir option. * doc/bison.texinfo (Bison Parser): Remove paragraph about _(). (Internationalization): New section.