Commit Graph

3363 Commits

Author SHA1 Message Date
Joel E. Denny
dfff662817 Import M4 detection fix from Autoconf.
Reported by Eric Blake.
* m4/m4.m4: Copy serial 10.
2009-12-15 19:12:16 -05:00
Joel E. Denny
adf1725fdb Enable assertion output and --disable-assert for configure.
* 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 ca01f454f0)

Conflicts:

	src/system.h
2009-12-14 18:23:36 -05:00
Joel E. Denny
7aaf9ce758 portability: use va_start and va_end in the same function.
* src/complain.c (error_message): Move va_end from here...
(ERROR_MESSAGE): ... to here.
(cherry picked from commit 786578e394)
2009-10-11 16:34:44 -04:00
Joel E. Denny
2ceb8c617c tests: skip tests of file names that platform does not support.
Reported by Michael Raskin at
<http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
* THANKS (Michael Raskin): Add.
* tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix.  Cygwin used
to fail at least for file names containing ":" or "\".
2009-10-04 23:14:29 -04:00
Akim Demaille
87b9c9bc43 doc: spell checking.
* doc/bison.texinfo: here.
(cherry picked from commit c781580d07)

Conflicts:

	doc/bison.texinfo
2009-09-25 23:36:46 -04:00
Joel E. Denny
dc25ce6bb1 tests: clean up push.at test group titles.
* tests/push.at: Remove "Push Parsing: " from test group titles
because these are already under the banner "Push Parsing Tests".
(cherry picked from commit 00d80a9ced)
2009-09-13 15:26:34 -04:00
Akim Demaille
ace92a2691 NEWS: Internationalization.
* NEWS (2.4.2): Add "Internationalization" item.
(cherry picked from commit 2755de8fec)
2009-09-03 11:09:15 +02:00
Akim Demaille
397bb3932f bootstrap: fix/improve find_tool.
* bootstrap (find_tool): Improve error messages.
	Fix typo about find_tool_names.
2009-09-03 11:08:57 +02:00
Eric Blake
bbbbe221d7 scan-gram: avoid portability trap with ctype usage.
* src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
Avoid compiler warning.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-08-27 20:16:07 -06:00
Joel E. Denny
4d7b57b527 tests: use perl for printing special sequences to files.
And skip tests if perl is not available.  This is better than
playing tricks with shell portability.  Suggested by Akim
Demaille.
* tests/input.at (Bad escapes in literals): Use it here for special
characters.
(cherry picked from commit b70c7fb4e1)

Conflicts:

	tests/input.at
2009-08-27 03:59:06 -04:00
Joel E. Denny
321fe707f4 Use locale when quoting.
* src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
quote rather than implementing quoting here.
(cherry picked from commit e6c849d82a)
2009-08-21 20:37:26 -04:00
Eric Blake
1266b63674 Make previous patch more robust.
* src/output.c (ARRAY_CARDINALITY): New macro, copied from
argmatch.h.
(output_skeleton): Use it.
Suggested by Akim Demaille.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-08-20 16:43:07 -06:00
Eric Blake
b9ad39c1fb Import latest m4/m4.m4.
* m4/m4.m4: Copy from autoconf 2.64.
* configure.ac (M4_GNU_OPTION): New define.
* src/output.c (output_skeleton): Use it to resolve FIXME.
* NEWS: Mention this.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-08-20 08:44:40 -06:00
Joel E. Denny
b1a4261e6d Fix complaints about escape sequences.
Discussed starting at
<http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
* src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
For a \0 and similar escape sequences meaning the null
character, report an invalid escape sequence instead of an
invalid null character because the latter does not actually
appear in the user's input.
In all escape sequence complaints, don't escape the initial
backslash, and don't quote when the sequence appears at the end
of the complaint line unless there's whitespace that quotearg
won't escape.
Consistently say "invalid" not "unrecognized".
* tests/input.at (Bad escapes in literals): New.
(cherry picked from commit c2724603c9)

Conflicts:

	tests/input.at
2009-08-19 21:11:35 -04:00
Akim Demaille
a022ff4186 doc: %initial-action to initialize yylloc.
Reported by Bill Allombert.
	* doc/bison.texinfo: Set fill-column to 76.
	(Location Type): Document the use of %initial-action to initialize
	yylloc.

(cherry picked from commit d59e456dbf)
2009-08-19 13:37:20 +02:00
Joel E. Denny
b5b94bd5e6 maint: update for gnulib's recent update-copyright changes
* gnulib: Update.
* .x-update-copyright (COPYING): Add as it's no longer implied
when .x-update-copyright is present.
* cfg.mk (update-copyright-local): Remove, now ignored.
(update-copyright): Declare update-b4-copyright as a dependency.
(cherry picked from commit c67e466f9d)
2009-08-18 18:50:59 -04:00
Akim Demaille
b9e42bb439 build: lower gettext requirements.
Bison was uselessly requiring the formatstring macros from
gettext, which resulted in mo files not being installed on systems
that perfectly supported Bison mo files.  Lower the requirement.
http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html

	* configure.ac: Require need-ngettext instead of
	need-formatstring-macros.
	Reported by Martin Jabocs.
	Suggested by Bruno Haible.
	* INSTALL: Restructure.
	(Internationalization): New.
2009-08-17 09:48:11 +02:00
Joel E. Denny
75ac158b82 maint: fix use of copyright year intervals.
* 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.
2009-08-14 18:46:16 -04:00
Akim Demaille
f23cd66008 distcheck: fix.
* examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
2009-08-12 14:09:15 +02:00
Joel E. Denny
9874460819 maint: run "make update-copyright"
But first...
* .x-update-copyright (^data/m4sugar/): Add, because these
files are from Autoconf.
2009-08-06 20:17:42 -04:00
Joel E. Denny
915becaa5d maint: make update-b4-copyright easier to use
* build-aux/update-b4-copyright: In warnings, report line
numbers rather than character positions.
* cfg.mk (update-copyright-local): Set to update-b4-copyright so
that update-copyright runs it.
* gnulib: Update.
(cherry picked from commit a1a9422d4a)
2009-08-06 19:29:01 -04:00
Joel E. Denny
ae50972393 maint: clean up update-b4-copyright code
* build-aux/update-b4-copyright: Do not accept 2-digit
UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
Don't accept a `[' in a b4_copyright argument.
Format code more consistently.
Don't assume b4*copyright never occurs.
(cherry picked from commit 0b61a8ec18)
2009-08-05 20:02:16 -04:00
Joel E. Denny
c9e0a88079 maint: automate b4_copyright updates.
* Makefile.am (update-b4-copyright): New target rule.
* build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
* build-aux/update-b4-copyright: New.
* data/yacc.c: Remove stray characters around b4_copyright
invocations.
(cherry picked from commit ac2def5602)

Conflicts:

	data/yacc.c
2009-08-04 21:44:25 -04:00
Joel E. Denny
50bcb22c4c maint: automate annual package-wide copyright-year update.
* .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/gram.c: Add missing comma in copyright statement.
* src/gram.h: Likewise.
2009-08-04 18:00:39 -04:00
Joel E. Denny
cfc9e431c3 Fix "make distcheck".
* examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
of just calc.stamp.
2009-08-04 15:09:53 -04:00
Joel E. Denny
42f8609bbd Pacify "gcc -Wunused" for the input function from Flex.
Reported by Alex Rozenman.  This warning shows up with gcc-4.3.0
and later.
* src/scan-code.l: Add "%option noinput", which I cannot find in
the Flex manual, but which Flex has supported since at least as
far back as 2.5.4.  However, if any of our developers still use
Flex 2.5.4, they'll need to stop configuring with
--enable-gcc-warnings because "%option noinput" didn't work
correctly until Flex 2.5.6.
* src/scan-gram.l: Likewise.
* src/scan-skel.l: Likewise.
2009-08-01 18:03:45 -04:00
Akim Demaille
9e408f848d build: avoid concurrent extraction of calc++.
* examples/calc++/Makefile.am (calc.stamp): New.
	Depend on it to create the sources of calc++ so that concurrent
	builds don't launch several "extexi" in parallel.
	Not only this is inefficient, this also builds incorrect sources
	with several extractions mixed together.

Cherry-picked from 5ece73eaa1.
2009-06-29 20:41:55 +02:00
Akim Demaille
48578d6c12 hash: check insertion for memory exhaustion.
* src/uniqstr.c (uniqstr_new): New.
2009-06-25 06:57:26 +02:00
Akim Demaille
914e713d07 hash: check insertion for memory exhaustion.
* src/muscle-tab.c (muscle_insert, muscle_grow)
	* src/state.c (state_hash_insert): Check the return value of
	hash_insert.
2009-06-25 06:57:26 +02:00
Akim Demaille
94505fb7e2 gnulib: update.
* 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.
2009-06-25 06:57:25 +02:00
Joel E. Denny
1bcbca4368 * data/c++.m4: Update copyright year. 2009-05-22 01:49:01 -04:00
Joel E. Denny
a17352a9da Handle a trailing `:' in a user-supplied C++ namespace better.
* data/c++.m4 (b4_namespace_close): Don't let it be printed
among the closing braces here.  This fix might make the
generated code easier to debug, but otherwise it should be
insignificant because a trailing `:' is a C++ error already.
(cherry picked from commit 8c221795af)
2009-05-19 18:21:07 -04:00
Akim Demaille
c984dee8d1 doc: use C++ headers.
* doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
	headers.
2009-05-11 08:52:26 +02:00
Joel E. Denny
cefb18280b Declare %code to be a permanent feature.
* NEWS (2.4.2): Here.
* doc/bison.texinfo (Prologue Alternatives): Don't say it's
experimental.
(Decl Summary): Likewise.
2009-05-01 02:51:31 -04:00
Akim Demaille
2f3064f08e doc: minor fixes.
* doc/bison.texinfo (Decl Summary): Fix entry about %debug.
	(Table of Symbols): Remove duplicate entry for %debug.
2009-04-14 08:27:55 +02:00
Eric Blake
ab3a683f05 Work around autoconf 2.63b bug in testsuite.
* tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
autoconf bug related to # in test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-08 21:29:54 -06:00
Joel E. Denny
ecd1b61cd4 Fix options documentation.
* build-aux/cross-options.pl: As in --help output, write optional
arguments as [=ARG] not =[ARG].
* doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2009-04-06 02:54:38 -04:00
Akim Demaille
f67c40374e Fix --help.
* src/getargs.c (usage): Fix help string for -W.
(cherry picked from commit 9b9e0a7d46)
2009-04-06 00:54:55 -04:00
Akim Demaille
0213d65176 Handle more general types of option arguments.
* build-aux/cross-options.pl: The argument ends at the first
	space, not the first non-symbol character.
	Use @var for each word appearing the argument description.
(cherry picked from commit 74eae918c3)
2009-04-06 00:50:21 -04:00
Joel E. Denny
c19178bfaf Remove spurious initial empty lines.
* data/location.cc: End the @output lines with an @.
2009-04-06 00:39:49 -04:00
Akim Demaille
0d2b2ab033 Remove spurious initial empty lines.
* data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
	* data/yacc.c: End the @output lines with an @.
2009-04-06 00:36:42 -04:00
Joel E. Denny
8ba62e3e10 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
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.
2009-04-04 21:12:23 -04:00
Joel E. Denny
f490771b4b * ChangeLog: Update copyright. 2009-04-04 02:46:19 -04:00
Joel E. Denny
5bc993d947 Help with updating web manual.
* HACKING: Incorporate instructions from gnulib/doc/README.
* bootstrap.conf (gnulib_modules): Add gendocs.
2009-04-03 18:46:58 -04:00
Joel E. Denny
580c075d7f Fix strange %define locations for default values.
Reported by Akim Demaille at
<http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
and discussed again starting at
<http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
* data/bison.m4 (b4_percent_define_default): Leave syncline blank
because location information is bogus.
Use angle brackets to delimit fake file name because square brackets
look like over-quoted m4.  Choose a better fake file name.
Use negative line numbers.
* src/muscle_tab.c (muscle_percent_define_default): Likewise.
* src/location.c (location_print): If line for a boundary is negative,
only print that boundary's file name.
* src/location.h: Document that.
* tests/skeletons.at (%define Boolean variables: invalid skeleton
defaults): Update output.
2009-04-03 03:56:58 -04:00
Akim Demaille
5d3a1ecbbe Locations without columns for command line arguments.
* src/location.c (location_print): Don't display negative columns.
	* src/location.h: Document this.
(cherry picked from commit 56c5eca973)
2009-04-03 02:24:48 -04:00
Joel E. Denny
015e86a7b2 Add reminder about uploading public key to keys.gnupg.net.
* HACKING (Release Procedure): Here.
(cherry picked from commit 06c3084fb5)
2009-04-02 18:14:52 -04:00
Akim Demaille
c1455babda bootstrap: --help to stdout.
* bootstrap (usage): Don't send --help to stderr.
	Use a here doc instead of a long string.
2009-03-31 10:44:33 +02:00
Akim Demaille
2075a82a18 bootstrap: README-hacking no longer exists
* bootstrap (checkout_only_file): Set to HACKING.
2009-03-31 10:44:00 +02:00
Akim Demaille
26fccd4d7b doc: merge HACKING and README-hacking.
Two files is confusing.
Reported by Alexandre Duret-Lutz.

	* README-hacking: Merge into...
	* HACKING (Working from the repository): here.
2009-03-26 23:52:00 +01:00