Commit Graph

3699 Commits

Author SHA1 Message Date
Akim Demaille
041308d0c0 NEWS: update.
* NEWS: Java fixes, more about the doc changes, liby issues.
2012-03-27 15:21:29 +02:00
Tim Landscheidt
e34e97bcd7 Java: Fix syntax error handling without error token.
* data/lalr1.java (YYParser::parse): Here.
* tests/java.at: Add test case.
2012-03-27 15:21:28 +02:00
Akim Demaille
bbaf618c3e tests: beware of -pedantic on large #line numbers.
* tests/local.at (AT_TEST_TABLES_AND_PARSE): Don't pass -pedantic
when compiling large canonical-LR parsers.
Reported by Tys Lefering.
http://lists.gnu.org/archive/html/bug-bison/2012-03/msg00025.html
(cherry picked from commit 8ec3110a9e)
2012-03-24 14:38:58 +01:00
Akim Demaille
c84134b644 tests: when using the C++ compiler, use its flags too.
* tests/local.at: Go for colors.
(--compile-c-with-cxx): New option.
We used to pass "CC=$CXX" as command line argument,
but it was not possible to adjust CFLAGS accordingly
in atlocal, since it is loaded before assignments on
the command line are honored (so that the command line
takes precedence).
* tests/atlocal.in: Implement it.
* tests/local.mk: Use it.
(cherry picked from commit ac3f2e33b4)

Conflicts:

	tests/local.mk
2012-03-24 14:37:32 +01:00
Akim Demaille
84c1cdc71d doc: update the --verbose report format.
* doc/bison.texinfo (Understanding): Adjust to match the
current format.
(cherry picked from commit 29e20e22e0)
2012-03-19 11:13:27 +01:00
Akim Demaille
56da1e5288 doc: spell check.
* doc/bison.texinfo: here.
(cherry picked from commit 5a321748e2)

Conflicts:

	doc/bison.texinfo
2012-03-19 11:11:51 +01:00
Akim Demaille
0765d39396 doc: stmt, not stmnt.
* doc/bison.texinfo: s/stmnt/stmt/g.  This is a
much more common abbreviation for "statement".
(cherry picked from commit 0860e38311)
2012-03-19 11:11:09 +01:00
Akim Demaille
6528a99151 doc: save width.
* doc/bison.texinfo (Language and Grammar): Use the same
layout for an example in all the versions, i.e., keep
as general case what used to be used only for Info.
(cherry picked from commit 1d280c0999)
2012-03-19 11:10:50 +01:00
Akim Demaille
de6be119ca doc: reformat grammar snippets.
* doc/bison.texinfo: Convert the grammar examples to
use a narrower style.  This helps fitting into the
@smallbook constraints.
http://lists.gnu.org/archive/html/bison-patches/2012-03/msg00011.html
(cherry picked from commit 5e9b6624d7)

Conflicts:

	doc/bison.texinfo
2012-03-19 11:06:35 +01:00
Akim Demaille
ea118b7262 doc: use only @example, not @smallexample.
* doc/bison.texinfo: Convert all @smallexamples into @examples.
Adjust layout where needed.
(cherry picked from commit c93f22fcf7)

Conflicts:

	doc/bison.texinfo
2012-03-19 11:04:50 +01:00
Akim Demaille
2c0f97066e doc: style changes.
* doc/bison.texinfo: Avoid line width issues with TeX.
Upgrade ancient messages.
Move some comments to better looking places.
Add more @group.
(Mfcalc Symbol Table): Reduce variable scopes.
Prefer size_t for sizes.
Prefer declarations with an initial value.
Fix a @group environment.
(cherry picked from commit aaaa2aaef4)

Conflicts:

	doc/bison.texinfo
2012-03-19 10:57:16 +01:00
Paul Eggert
d13d14ccb2 doc: minor fixes to "Understanding" section
* doc/bison.texinfo (Understanding): Minor wording fixes and
improvements.  Fixes problems reported in
<https://savannah.gnu.org/patch/?4306>.
(cherry picked from commit 35880c82dc)
2012-03-19 10:51:32 +01:00
Akim Demaille
05061eca7c tests: minor fixes/simplifications
* tests/local.at (AT_BISON_CHECK_NO_XML): Simplify sed programs,
quotation, and default value assignments.
Ensure a proper value to the numeric variables.
Reported by Lie Yan.
http://lists.gnu.org/archive/html/bug-bison/2012-03/msg00000.html
2012-03-13 12:01:45 +01:00
Akim Demaille
06e0e52ca4 tests: be robust to quote style.
See <http://lists.gnu.org/archive/html/bug-bison/2012-01/msg00120.html>.

	* src/main.c (main): Define the quoting style we use.
	* tests/atlocal.in: Use ASCII style quotes during the tests.
(cherry picked from commit 39ac121457)
2012-03-09 08:28:31 +01:00
Akim Demaille
f0f62c8c4d maint: update gnulib.
* gnulib: update.
	* src/scan-gram.l: Don't use the (former version of) STREQ.
2012-03-09 08:28:31 +01:00
Akim Demaille
c14ceb55b9 tests: be robust to POSIXLY_CORRECT being defined.
* tests/local.at (AT_BISON_CHECK_NO_XML): Check if
POSIXLY_CORRECT is defined, not if it is defined to 1.
Reported by Lie Yan.
http://lists.gnu.org/archive/html/bug-bison/2012-03/msg00000.html
2012-03-06 09:16:38 +01:00
Akim Demaille
ab8932bfd9 doc: fix environment issues.
* doc/bison.texinfo: Do not use @verbatim, in particular when
	we use @group inside.
	Use @quotation instead of @display for frequently asked questions,
	it looks much nicer.
(cherry picked from commit 71b52b1342)

Conflicts:

	doc/bison.texinfo
2012-02-23 17:57:31 +01:00
Akim Demaille
6c6f6f4b23 regen.
* src/parse-gram.h, src/parse-gram.c: regen.
2012-02-23 16:10:12 +01:00
Akim Demaille
da209f943b tests: fix regressions.
Exit status 63 is documented for version-mismatch.
	* bootstrap.conf (gnulib_modules): Remove sysexits.
	* src/system.h (EX_MISMATCH): Define.
	* src/parse-gram.y (version_check): Use it instead of EX_CONFIG.

Missing includes.
	* tests/calc.at, tests/named-refs.at: Include assert.h.
(cherry picked from commit 459a57a90f)
2012-02-23 16:10:08 +01:00
Akim Demaille
71cbc1ac1a glr: fix ambiguity reports.
* tests/glr-regression.at (Ambiguity reports): New.
(cherry picked from commit a6b2f4fc02)
2012-02-21 14:44:15 +01:00
Akim Demaille
98842516e1 doc: stylistic improvements.
* doc/bison.texinfo: Prefer "continue" to empty loop bodies.
	Add some @group/@end group to avoid poor page breaks.
(cherry picked from commit d4fca42763)

Conflicts:

	doc/bison.texinfo
2012-02-19 18:29:05 +01:00
Akim Demaille
14f4455e43 maint: address sc_prohibit_doubled_word.
* data/yacc.c, doc/bison.texinfo: Reword to avoid having to
	disable that check.
	* cfg.mk: No longer skip this test.
(cherry picked from commit 762caaf639)

Conflicts:

	data/yacc.c
2012-02-19 18:26:01 +01:00
Akim Demaille
43e9e2a113 maint: address sc_prohibit_always-defined_macros.
* 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.

Conflicts:

	cfg.mk
2012-02-19 18:25:24 +01:00
Akim Demaille
a055b2f07d maint: address sc_bindtextdomain, sc_program_name and sc_prohibit_HAVE_MBRTOWC.
* 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.
(cherry picked from commit 4d699f44e6)

Conflicts:

	cfg.mk
2012-02-19 18:24:17 +01:00
Akim Demaille
95f14eb228 maint: remove stray file.
* config.hin: Remove.
(cherry picked from commit 222342aa67)
2012-02-19 18:21:56 +01:00
Akim Demaille
e0e2b93355 maint: address some syntax-issues remaining after cherry-picking from master.
* cfg.mk: Skip bison generated files, 2.5 is generating trailing
	blanks.  This is already fixed in master.
	* tests/conflicts.at, tests/java.at: Fix white space issues.
2012-02-19 10:29:24 +01:00
Akim Demaille
f95faa25ae regen.
* src/parse-gram.c, src/parse-gram.h: Regen.
2012-02-19 10:22:51 +01:00
Akim Demaille
bd65f25570 bitset: fix an incorrect error message.
* lib/bitset_stats.c: here.
	Reported by Stefano Lattarini.
2012-02-19 10:21:32 +01:00
Jim Meyering
7880130e3e maint: reenable sc_m4_quote_check
* cfg.mk (local-checks-to-skip): Reenable sc_m4_quote_check.
* m4/dmalloc.m4: Add quotes.

Conflicts:

	cfg.mk
2012-02-19 10:21:32 +01:00
Akim Demaille
fe40b679d7 maint: remove trailing empty lines.
* 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.

Conflicts:

	examples/mfcalc/.gitignore
2012-02-19 10:21:29 +01:00
Akim Demaille
dd5611579b maint: avoid "magic number exit".
* 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.

Conflicts:

	doc/bison.texinfo
	src/parse-gram.y
2012-02-19 10:21:06 +01:00
Akim Demaille
24bb5f8fb7 maint: fix some syntax-check issues.
* 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.
2012-02-19 10:21:06 +01:00
Akim Demaille
6487c0b370 maint: address a couple of syntax-check errors.
* 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.

Conflicts:

	cfg.mk
	lib/bitset_stats.c
	tests/glr-regression.at
2012-02-19 10:21:06 +01:00
Akim Demaille
1cd5bad9b8 maint: gnulib: upgrade. 2012-02-19 10:21:06 +01:00
Akim Demaille
3f3e78dc89 maint: rely on Automake for parsers.
* Makefile.am (AM_YFLAGS): Automake looks for "-d" alone.
	Move other options in here.
	(BISON): New.
	(YACC): Use it.
	(bison_SOURCES): Now that automake can see `-d' in AM_YFLAGS,
	we can rely on it to compile and ship the parser header
	files.

Based on commit 737406a32c and
commit 3d6ca33908.
2012-02-15 13:46:05 +01:00
Akim Demaille
4e8ec90f24 maint: more authors.
* AUTHORS: here.
	Suggested by Tys Lefering.
(cherry picked from commit bdf66d1db4)
2012-02-14 20:12:56 +01:00
Akim Demaille
a34e8b242e maint: add license headers.
* examples/calc++/test, examples/variant.yy, AUTHORS, THANKS,
	* tests/atlocal.in, tests/bison.in: Add license headers.
	Reported by Tys Lefering.
(cherry picked from commit 3272a7256f)

Conflicts:

	examples/variant.yy
	tests/bison.in
2012-02-14 20:12:34 +01:00
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