Commit Graph

3662 Commits

Author SHA1 Message Date
Akim Demaille
b2577f024b maint: remove obsolete file.
* etc/make-ChangeLogs: Remove (used for rcs to cvs migration!).
	Reported by Tys Lefering.
(cherry picked from commit 3b4d62d526)
2012-02-14 20:09:52 +01:00
Akim Demaille
4c787a31df use a more consistent quoting style.
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.
(cherry picked from commit 4a9cd8f24a)

Conflicts:

	src/muscle-tab.c
2012-02-08 11:40:41 +01:00
Akim Demaille
270ff8be14 maint: remove stray debug code.
* src/Makefile.am (echo): Remove.
2012-01-31 09:42:56 +01:00
Akim Demaille
6e40b8d825 maint: space changes.
* src/Makefile.am: Use 2 leading spaces for variable definition
	spreading over several lines.
2012-01-31 09:42:04 +01:00
Akim Demaille
0802356481 maint: more silent-rules.
* doc/local.mk, src/local.mk, examples/calc++/Makefile.am: Use
	$(AM_V_GEN) and $(AM_V_at) where appropriate.
(cherry picked from commit f67c0a1c35)

Conflicts:

	doc/local.mk
	examples/calc++/Makefile.am
	src/local.mk
2012-01-31 09:41:25 +01:00
Jim Meyering
e187b40d31 do not ignore errors like ENOSPC,EIO when writing to stdout
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.
(cherry picked from commit acb5895680)

Conflicts:

	m4/.gitignore
2012-01-31 09:26:08 +01:00
Akim Demaille
ec94982bec tests: fix expected output.
* tests/actions.at (YYBACKUP): here.
(cherry picked from commit 888b6ddfe4)
2012-01-26 21:54:10 +01:00
Akim Demaille
94556574b5 yacc: fix YYBACKUP.
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.
(cherry picked from commit d115aad911)

Conflicts:

	TODO
	data/yacc.c
2012-01-26 21:36:35 +01:00
Akim Demaille
7aadf26359 maint: update TODO.
* TODO (Labeling the symbols): Remove, it's done ("Name references").
(cherry picked from commit 2c7f50be62)
2012-01-26 21:30:19 +01:00
Akim Demaille
48c4bf30fd maint: update THANKS.
* THANKS: Update Tys's address, on his request.
(cherry picked from commit 93ebddb11f)
2012-01-26 21:30:13 +01:00
Akim Demaille
ed2e77eae6 maint: fix --gcc-warnings support.
* configure.ac: Use enable_gcc_warnings instead of enableval,
	which is valid only with AC_ARG_ENABLE.
(cherry picked from commit 1890a2a816)

Conflicts:

	configure.ac
2012-01-26 21:29:50 +01:00
Akim Demaille
8ed97fd2b2 maint: silent-rules.
* configure.ac: Ask for silent-rules support.
	Enable it by default.
(cherry picked from commit da1eb15bc9)
2012-01-26 21:28:32 +01:00
Akim Demaille
e6070f227e maint: remove trailing blanks.
* src/scan-code.l: Here.
2012-01-26 21:27:49 +01:00
Paul Eggert
7a709ad88d tests: port to Solaris 10 'diff -u'
* 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>.
(cherry picked from commit 071ca141ec)
2012-01-25 10:52:39 +01:00
Jim Meyering
c373ab641b build: avoid possibly-replaced fprintf in liby-source, yyerror.c
* 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.
(cherry picked from commit fb9eea8885)
2012-01-25 08:50:14 +01:00
Jim Meyering
b359704747 maint: generate ChangeLog from git log
* Makefile.am (gen-ChangeLog): New rule.
(dist-hook): Depend on it.
(EXTRA_DIST): Distribute the two ChangeLog-* files.
* bootstrap.conf (gnulib_modules): Add gitlog-to-changelog.
(bootstrap_post_import_hook): Ensure that ChangeLog exists.
* build-aux/git-log-fix: New file.
* ChangeLog-2012: Renamed ...
* ChangeLog: ... from this.
* ChangeLog-1998: Renamed ...
* OChangeLog: ...from this
* .gitignore: Add ChangeLog.
(cherry picked from commit 5ef4a3c71c)

Conflicts:

	Makefile.am
	bootstrap.conf
	build-aux/.gitignore
2012-01-24 19:58:18 +01:00
Jim Meyering
abf3f74b21 change more quotes in source, and adjust tests to match
Run this command to change each `%s' to '%s' in source directories:
  git grep -l '`%s'\' src djgpp data \
    |xargs perl -pi -e '$q="'\''";s/`%s$q/$q%s$q/g'
* data/bison.m4: Affected per the above.
* djgpp/subpipe.c: Likewise.
* src/files.c: Likewise.
* src/getargs.c: Likewise.
* src/muscle-tab.c: Likewise.
* src/reader.c: Likewise.
* tests/glr-regression.at: Adjust to match.
* tests/input.at: Likewise.
* tests/push.at: Likewise.
* tests/skeletons.at: Likewise.
(cherry picked from commit 4aa9d1ff9c)

Conflicts:

	src/getargs.c
	src/muscle-tab.c
	src/reader.c
	tests/input.at
2012-01-24 19:31:27 +01:00
Jim Meyering
9874f80b2e quote consistently and make tests pass with new quoting from gnulib
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.
(cherry picked from commit ae93e4e4b8)

Conflicts:

	src/scan-code.l
	src/scan-gram.l
	src/symtab.c
	tests/output.at
2012-01-23 14:07:53 +01:00
Jim Meyering
14594e38ad build: update gnulib and autoconf submodules to latest
(cherry picked from commit 728415f885)
2012-01-23 13:37:14 +01:00
Jim Meyering
ee7e9e3b66 build: manually update bootstrap from gnulib, and adapt
Updating to the latest bootstrap from gnulib involves more of a
change than usual, and updating to the latest gnulib would involve
its own set of challenges with the upcoming quoting changes, so
we update bootstrap manually and separately.
* bootstrap: Update from gnulib.
* lib/Makefile.am: Initialize more variables to empty, so that gnulib.mk
can append to them with "+=".
* bootstrap.conf (gnulib_mk_hook): Remove.  No longer honored.
(gnulib_tool_option_extras): Generate gnulib.mk.
(cherry picked from commit 85ad742d4e)

Conflicts:

	Makefile.am
	bootstrap.conf
	etc/prefix-gnulib-mk
2012-01-23 13:33:00 +01:00
Jim Meyering
81c5003f91 maint: include <config.h> first
* cfg.mk (exclude_file_name_regexp--sc_require_config_h_first):
Exempt data/glr.c and data/yacc.c from the include-config.h-first
requirement.
(cherry picked from commit 77f114dd6e)
2012-01-23 11:30:49 +01:00
Jim Meyering
792aeb0017 build: include <config.h> from lib/yyerror.c
* lib/yyerror.c: Include <config.h>.
(cherry picked from commit cf33c228e0)
2012-01-23 11:29:45 +01:00
Jim Meyering
b6d4f2a27d maint: list djgpp/subpipe.c in po/POTFILES.in
* po/POTFILES.in: Add djgpp/subpipe.c.
(cherry picked from commit e7f5dbf82d)
2012-01-23 11:29:37 +01:00
Jim Meyering
b5e7f274a5 maint: placate the space-TAB syntax-check
* cfg.mk (exclude_file_name_regexp--sc_space_tab): Exempt
tests/input.at and tests/c++.at, since they appear to use
SP-TAB sequences deliberately.
* OChangeLog: Remove space-before-TAB.
(cherry picked from commit aebc430361)
2012-01-23 11:28:55 +01:00
Jim Meyering
d6864e191b doc: correct typo: s/can not/cannot/
* doc/bison.texinfo (Bug Reports): s/can not/cannot/
And remove trailing blanks.
(cherry picked from commit 411614fac4)

Conflicts:

	doc/bison.texinfo
2012-01-23 11:24:48 +01:00
Jim Meyering
10c4beb7ea maint: get gpl-3.0 from gnulib
* bootstrap.conf (gnulib_modules): Add gpl-3.0.
* doc/gpl-3.0.texi: Remove from version control, now that
we get it via gnulib.
* doc/.gitignore: Ignore it.
(cherry picked from commit b87414a05e)
2012-01-22 12:57:40 +01:00
Jim Meyering
2d48e62447 maint: get fdl.texi from gnulib
* bootstrap.conf (gnulib_modules): Add fdl.
* doc/fdl.texi: Remove file.
2012-01-15 10:58:35 +01:00
Jim Meyering
8cc3c80e8a maint: spell "file system" as two separate words
* doc/Doxyfile.in: Spell it "file system", to avoid a
"make syntax-check" failure.
2012-01-15 10:58:14 +01:00
Jim Meyering
77315a51c1 maint: avoid "the the"
* djgpp/README.in: s/the the/the/
* src/parse-gram.c (lloc_default): Likewise.
* src/parse-gram.y (lloc_default): Likewise, and remove a
trailing space.

Conflicts:

	ChangeLog
	src/parse-gram.y
2012-01-15 10:57:18 +01:00
Jim Meyering
e6062fb6da build: avoid warning from coverity about lbitset_elt_find
* 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.
2012-01-13 12:19:08 +01:00
Akim Demaille
3bce8ffc3d maint: factor copyright year.
* configure.ac: Use $PACKAGE_COPYRIGHT_YEAR instead of repeating it.
2012-01-13 12:02:36 +01:00
Akim Demaille
eba83258a3 maint: catch missing gnulib macros.
* configure.ac: Add m4_pattern_forbid.
2012-01-13 12:02:28 +01:00
Akim Demaille
c932d6135c maint: run "make update-copyright". 2012-01-13 11:48:14 +01:00
Tim Landscheidt
e4caef0ead java: remove unused variable.
* data/lalr1.java (yyresult): remove, unused.
2012-01-13 11:31:54 +01:00
Akim Demaille
33a1fa4e81 scanner: fix typo.
* src/scan-skel.l (@`): s/emtpy/empty/.
	Reported by Tim Landscheidt.
2012-01-11 16:46:36 +01:00
Jim Meyering
847480ae0f build: avoid warnings about set-but-not-used variables
* 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".
2012-01-11 16:40:06 +01:00
Joel E. Denny
5422d56a71 tests: add -pedantic for --enable-gcc-warnings.
This should help to avoid some portability problems.  For example,
it would have revealed the empty unions fixed by the last patch
* configure.ac (WARN_CFLAGS_TESTS, WARN_CXXFLAGS_TEST): Implement.
* tests/synclines.at (AT_TEST_SYNCLINE): Avoid -pedantic warning
about an empty translation unit.
2011-08-21 16:23:11 -04:00
Joel E. Denny
7451638148 tests: fix empty unions.
Empty unions are not accepted by the ISO C99 grammar or by at
least some versions of Sun Studio.  Reported by Wolfgang S. Kechel
at
<http://lists.gnu.org/archive/html/bug-bison/2011-08/msg00003.html>.
* NEWS (2.5.1): Document fix.
* THANKS (Wolfgang S. Kechel): Add.
* tests/existing.at (GNU Cim Grammar)
(GNU pic (Groff 1.18.1) Grammar.): Remove empty %union.
2011-08-21 14:45:03 -04:00
Joel E. Denny
845346b3bb build: avoid YACC typo inherited from Autoconf.
The typo shows up in the `configure --help' output.  Reported by
W.C.A. Wijngaards and Paul Eggert at
<http://lists.gnu.org/archive/html/bug-bison/2011-07/msg00000.html>.
* README-hacking (Release Procedure): Remind about updating
maintainer tools before a release.
* THANKS (W.C.A. Wijngaards): Add.
* configure.ac (AC_PREREQ): Set to 2.68, which fixes the YACC
typo.
2011-07-10 13:42:12 -04:00
Joel E. Denny
abd189e8dc build: create xz instead of bzip2 tarballs.
Suggested by Jim Meyering at
<http://lists.gnu.org/archive/html/bug-bison/2011-06/msg00012.html>.
* README-hacking (Release Procedure): Update example.
* configure.ac (AM_INIT_AUTOMAKE): Replace dist-bzip2 with
dist-xz.
2011-07-10 12:38:57 -04:00
Joel E. Denny
8348436580 doc: clean up references to `Locations Overview'.
* doc/bison.texinfo (Locations Overview): Rename node to...
(Locations): ... this, which is its section name.  Update menus to
match that and not to use the title `Tracking Locations', which is
a different section.
2011-05-29 22:32:56 -04:00
Joel E. Denny
7404cdf3a1 doc: clean up references to `Tracking Locations'.
* doc/bison.texinfo (Locations): Rename node to...
(Tracking Locations): ... this, which is its section name, and
update all cross references.  The trouble is that there is another
node about locations.  Its section name is `Locations', which was
easily confused with the node name of this node.  Moreover, its
node name is `Locations Overview', which was mistakenly used to
label some cross references to this node.
2011-05-29 22:32:56 -04:00
Joel E. Denny
ce24f7f59b doc: clean up `Named References' a little.
* doc/bison.texinfo (Named References): Rename section to match
the node name, and update all cross references.  Don't use the
acronyms RHS and LHS given that we don't expand them anywhere in
the manual.  Try to use @samp and @code properly.  Mention that
named references are experimental as we've already stated in NEWS.
(Destructor Decl): Expand the only remaining use of RHS or LHS.
2011-05-29 22:32:32 -04:00
Joel E. Denny
7d31f09289 doc: motivate named references.
Suggested by Hans Aberg at
<http://lists.gnu.org/archive/html/bug-bison/2011-05/msg00008.html>.
* doc/bison.texinfo (Named References): Explain briefly how
they're better than the traditional positional references.
2011-05-29 20:52:42 -04:00
Joel E. Denny
908c8647de doc: discuss named references after locations.
Reported by Hans Aberg at
<http://lists.gnu.org/archive/html/bug-bison/2011-05/msg00008.html>.
* NEWS (2.5.1): Document.
* doc/bison.texinfo (Named References): Because it discusses
locations in addition to semantic values, move this subsection out
of the section `Defining Language Semantics', where locations have
not yet been introduced, to be a new section after the following
section, `Tracking Locations'.
2011-05-29 20:52:00 -04:00
Joel E. Denny
90dcd4156c Prepare for the possibility of a 2.5.1 release.
* NEWS (2.5.1): New heading.
2011-05-29 20:49:16 -04:00
Joel E. Denny
b2bc8a1ba0 Version 2.5.
* NEWS (2.5): Set date.
v2.5
2011-05-14 18:14:52 -04:00
Joel E. Denny
77bb73e7af Don't use IF_LINT in Bison sources.
It creates unnecessary differences between the sources that Bison
maintainers build and test (given that maintainers normally
configure with --enable-gcc-warnings) and the sources that Bison
users build.  Instead, use PACIFY_CC, which doesn't.  This change
fixes compiler warnings reported by Tys Lefering at
<http://lists.gnu.org/archive/html/bison-patches/2011-05/msg00004.html>.
* configure.ac: Don't AC_DEFINE lint regardless of the configure
options.  This change affects imported gnulib sources, where
IF_LINT still appears and depends on lint.
* src/scan-gram.l, src/scan-skel.l: Replace uses of IF_LINT with
PACIFY_CC.
* src/system.h (IF_LINT): Remove cpp macro.
(PACIFY_CC): New cpp macro.
2011-05-14 16:26:11 -04:00
Joel E. Denny
9d6af15318 Fix precedence for end token.
Since Bison 2.3b, which restored the ability of precedence
directives to assign user token numbers, doing so for user token
number 0 has produced an assertion failure.
* NEWS (2.5): Document fix.
* src/symtab.c (symbol_user_token_number_set): In the case of the
end token, don't decrement ntokens if it was never incremented.
* tests/regression.at (Token number in precedence declaration):
Extend.
2011-05-01 22:20:15 -04:00
Joel E. Denny
441735026b Prepare for 2.5 release.
* NEWS (2.5_rc1): Rename back to...
(2.5): ... this, and unset date.
2011-05-01 18:41:34 -04:00