platform/upstream/bison.git
19 years agoRegenerate.
Paul Eggert [Sun, 24 Jul 2005 07:26:45 +0000 (07:26 +0000)]
Regenerate.

19 years ago* NEWS: Version 2.0b.
Paul Eggert [Sun, 24 Jul 2005 07:24:22 +0000 (07:24 +0000)]
* NEWS: Version 2.0b.

* 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.

19 years ago(ATTRIBUTE_UNUSED): Remove, since it infringes on
Paul Eggert [Sun, 24 Jul 2005 07:17:06 +0000 (07:17 +0000)]
(ATTRIBUTE_UNUSED): Remove, since it infringes on
the user's name space.  All uses changed to __attribute__
((__unused__)).
(yyFail, yyMemoryExhausted, yyreportAmbiguity):
Add __attribute__ ((__noreturn__)).

19 years ago(message): Don't print a message more than once,
Paul Eggert [Sat, 23 Jul 2005 17:06:41 +0000 (17:06 +0000)]
(message): Don't print a message more than once,
and omit line-number decoration that makes Emacs compile think
that informative messages are worth worrying about.

19 years ago(SUBDIRS): Add examples; somehow this got removed accidentally.
Paul Eggert [Fri, 22 Jul 2005 23:02:50 +0000 (23:02 +0000)]
(SUBDIRS): Add examples; somehow this got removed accidentally.

19 years agoUpdate copyright.
Paul Eggert [Fri, 22 Jul 2005 22:32:03 +0000 (22:32 +0000)]
Update copyright.

19 years ago* lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
Paul Eggert [Fri, 22 Jul 2005 22:30:13 +0000 (22:30 +0000)]
* lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
* lib/bitset_stats.c (bitset_stats_init): Likewise.
* lib/bitsetv.c (bitsetv_alloc): Likewise.

19 years ago(relation_transpose): Rewrite to avoid bogus complaint
Paul Eggert [Fri, 22 Jul 2005 21:56:20 +0000 (21:56 +0000)]
(relation_transpose): Rewrite to avoid bogus complaint
from maintainer-distcheck about casting the argument of 'free'.

19 years agoAdd *.yy.
Paul Eggert [Fri, 22 Jul 2005 21:46:02 +0000 (21:46 +0000)]
Add *.yy.

19 years agoMention lib/xalloc-die.c, not lib/xmalloc.c.
Paul Eggert [Fri, 22 Jul 2005 21:44:03 +0000 (21:44 +0000)]
Mention lib/xalloc-die.c, not lib/xmalloc.c.

19 years agoVersion 2.0b.
Paul Eggert [Fri, 22 Jul 2005 21:26:26 +0000 (21:26 +0000)]
Version 2.0b.

19 years agoAdd Anthony Heading, twlevo@xs4all.nl.
Paul Eggert [Fri, 22 Jul 2005 21:20:58 +0000 (21:20 +0000)]
Add Anthony Heading, twlevo@xs4all.nl.

19 years agoFor translations that have not yet been upgraded to
Paul Eggert [Fri, 22 Jul 2005 18:35:27 +0000 (18:35 +0000)]
For translations that have not yet been upgraded to
the new runtime-po domain, prime the pump by extracting the
relevant strings from the obsolete translations.  This code can be
removed once the bison-runtime domain has been translated by each
team.

19 years ago(<SC_PRE_CODE>.): Don't double-quote token names,
Paul Eggert [Fri, 22 Jul 2005 17:58:51 +0000 (17:58 +0000)]
(<SC_PRE_CODE>.): Don't double-quote token names,
now that token names are already quoted.

19 years ago* data/glr.c (YYTOKEN_TABLE): New macro.
Paul Eggert [Fri, 22 Jul 2005 17:07:31 +0000 (17:07 +0000)]
* data/glr.c (YYTOKEN_TABLE): New macro.
(yytname): Define if YYTOKEN_TABLE.
* data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
* data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
(YYERROR_VERBOSE): Define the same way the other skeletons do.
* src/output.c (prepare_symbols): Output token_table_flag.

19 years agoCatch up to last couple of days' checkins.
Paul Eggert [Fri, 22 Jul 2005 04:56:35 +0000 (04:56 +0000)]
Catch up to last couple of days' checkins.

19 years ago(yyinitGLRStack, yyreturn): Don't call malloc again if the first call
Paul Eggert [Fri, 22 Jul 2005 04:56:14 +0000 (04:56 +0000)]
(yyinitGLRStack, yyreturn): Don't call malloc again if the first call
fails.

19 years agoRegenerate.
Paul Eggert [Thu, 21 Jul 2005 20:55:33 +0000 (20:55 +0000)]
Regenerate.

19 years ago* data/glr.c (yytnamerr): New function.
Paul Eggert [Thu, 21 Jul 2005 20:53:03 +0000 (20:53 +0000)]
* data/glr.c (yytnamerr): New function.
(yyreportSyntaxError): Use it to dequote most string literals.
* data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
with other skeletons.  All uses changed.
(yytnameerr_): New function.
(yyreport_syntax_error): Use it to dequote most string literals.
* data/yacc.c (yytnamerr): New function.
(yyerrlab): Use it to decode most string literals.
* doc/bison.texinfo (Decl Summary, Calling Convention):
Clarify quoting convention of yytname.
* src/output.c (prepare_symbols): Quote all names.  This undoes
the 2005-04-17 change, which is now accomplished (mostly) via
changes in the parsers as described above.
* tests/regression.at (Token definitions, Web2c Actions):
Undo most 2005-04-17 change here, too.

19 years agoDon't pipe output of ./types through sed to
Paul Eggert [Wed, 20 Jul 2005 22:01:47 +0000 (22:01 +0000)]
Don't pipe output of ./types through sed to
remove trailing spaces.  This loses the exit status of ./types,
and isn't needed since ./types shouldn't be emitting trailing
spaces.

19 years ago(yyreturn): Don't pop stack if yyinitStateSet failed,
Paul Eggert [Wed, 20 Jul 2005 21:43:32 +0000 (21:43 +0000)]
(yyreturn): Don't pop stack if yyinitStateSet failed,
as the stack isn't valid in that case.

19 years ago* src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
Paul Eggert [Wed, 20 Jul 2005 21:23:35 +0000 (21:23 +0000)]
* src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
(gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
(gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
is used.
* src/scan-skel.l (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):
Likewise.

19 years ago(_AT_TEST_GLR_CXXTYPES): Work even with
Paul Eggert [Wed, 20 Jul 2005 21:19:40 +0000 (21:19 +0000)]
(_AT_TEST_GLR_CXXTYPES): Work even with
overly-picky compilers that reject 'char *foo = "bar";'.

19 years ago(SYMBOL_ATTR_PRINT, symbol_print): Direct output
Paul Eggert [Wed, 20 Jul 2005 21:17:04 +0000 (21:17 +0000)]
(SYMBOL_ATTR_PRINT, symbol_print): Direct output
to FILE * parameter, not to stderr.

19 years ago(create_subpipe): Rewrite slightly to avoid warnings from GCC 4.
Paul Eggert [Wed, 20 Jul 2005 21:12:54 +0000 (21:12 +0000)]
(create_subpipe): Rewrite slightly to avoid warnings from GCC 4.

19 years ago(yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
Paul Eggert [Wed, 20 Jul 2005 21:06:26 +0000 (21:06 +0000)]
(yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
(yyglrShiftDefer, yysplitStack):
Remove unused parameters b4_pure_formals.  All uses changed.
(yyglrShift): Remove unused parameters b4_user_formals.
All uses changed.
(yyglrReduce): Removed unused parameter yylocp.  All uses changed.

19 years agoRegenerate.
Paul Eggert [Tue, 19 Jul 2005 07:10:32 +0000 (07:10 +0000)]
Regenerate.

19 years agoDestructor cleanups and regularization among the three skeletons.
Paul Eggert [Tue, 19 Jul 2005 06:56:44 +0000 (06:56 +0000)]
Destructor cleanups and regularization among the three skeletons.
* NEWS: Document the behavior changes.
* data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
stack before failing, as the cleanup code will do it for us now.
* data/lalr1.cc (yyerrlab): Likewise.
* data/glr.c (yyparse): Pop everything off the stack before
freeing it, so that destructors get called properly.
* data/lalr1.cc (yyreturn): Likewise.
* data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
This is more consistent.
* doc/bison.texinfo (Destructor Decl): Mention more reasons
why destructors might be called.  1.875 -> 2.1.
(Destructor Decl, Decl Summary, Table of Symbols):
Some English-language cleanups for %destructor.
* tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
Add output line for destructor of start symbol.
* tests/calc.at (AT_CHECK_CALC): Add one to line counts,
because of that same extra output line.

19 years agoRegenerate.
Paul Eggert [Tue, 19 Jul 2005 03:38:13 +0000 (03:38 +0000)]
Regenerate.

19 years ago(_AT_TEST_GLR_CXXTYPES): Don't try to have yyerror return 0, now that
Paul Eggert [Tue, 19 Jul 2005 03:32:40 +0000 (03:32 +0000)]
(_AT_TEST_GLR_CXXTYPES): Don't try to have yyerror return 0, now that
it returns void.

19 years ago* NEWS: Document minor wording changes in diagnostics of
Paul Eggert [Tue, 19 Jul 2005 00:05:57 +0000 (00:05 +0000)]
* NEWS: Document minor wording changes in diagnostics of
Bison-generated parsers.
* data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
Remove unused formals.  All uses changed.
(yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
(yyparse): Rename yyoverflowlab to yyexhaustedlab.
* data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
Rename yyoverflowab to yyexhaustedlab.
When memory exhaustion occurs during syntax-error reporting,
report it separately rather than in a single diagnostic; this
eases translation.
* doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
(Memory Exhausted): Renamed from Parser Stack Overflow.
Revamp wording slightly to prefer "memory exhaustion".
* tests/actions.at: "parser stack overflow" -> "memory exhausted".

19 years agoAdd bison-runtime.pot; remove bison-runtime.old.pot.
Paul Eggert [Mon, 18 Jul 2005 22:25:54 +0000 (22:25 +0000)]
Add bison-runtime.pot; remove bison-runtime.old.pot.

19 years agoAdd Makefile.in.in.
Paul Eggert [Mon, 18 Jul 2005 22:22:49 +0000 (22:22 +0000)]
Add Makefile.in.in.

19 years ago* data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
Paul Eggert [Mon, 18 Jul 2005 22:16:44 +0000 (22:16 +0000)]
* data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.

19 years agoUpdate copyright.
Paul Eggert [Mon, 18 Jul 2005 22:14:15 +0000 (22:14 +0000)]
Update copyright.

19 years agoAdd i18n support to the GLR skeleton. Partially fix the C++
Paul Eggert [Mon, 18 Jul 2005 22:10:15 +0000 (22:10 +0000)]
Add i18n support to the GLR skeleton.  Partially fix the C++
skeleton; a C++ expert needs to finish this.  Remove debugging
msgids; there's little point to having them translated, since they
can be understood only by someone who can read the
(English-language) source code.

Generate runtime-po/bison-runtime.pot automatically, so that we
don't have to worry about garbage getting in that file.  We'll
make sure after the next official release that old msgids don't
get lost.  See
<http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.

* runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
Now auto-generated.
* PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
Fix typos in explanations of the runtime file.
* bootstrap: Change gettext keyword from YYI18N to YY_.
Use standard Makefile.in.in in runtime-po, since we'll arrange
for backward-compatible bison-runtime.po files in a different way.
* data/glr.c (YY_): New macro, from yacc.c.
(yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
Translate messages intended for users.
(yyreportSyntaxError): Change "virtual memory" to "memory" to match
the wording in the other skeletons.  We don't know that the memory
is virtual.
* data/lalr1.cc (YY_): Renamed from _.  All uses changed.
Use same method that yacc.c uses.
Don't translate debugging messages.
(yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
it doesn't work (yet), and requires C++ expertise to fix.
* data/yacc.c (YY_): Renamed from YY18N.  All uses changed.
Move defn to a more logical place, to be consistent with other
skeletons.
Don't translate debugging messages.
Don't assume line numbers fit in unsigned int; use unsigned long fmts.
* doc/bison.texinfo: Mention <libintl.h>.  Change glibc cross reference
to gettext cross reference.  Add indexing terms.  Mention YYENABLE_NLS.
* runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.

19 years agoFix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
Paul Eggert [Mon, 18 Jul 2005 18:39:01 +0000 (18:39 +0000)]
Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
* tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
void, not int.
* tests/glr-regression.at (Badly Collapsed GLR States):
Likewise.
(Improper handling of embedded actions and dollar(-N) in GLR parsers):
yylex should return 0 at EOF rather than aborting.

19 years agoImprove tests for stack overflow in GLR parser.
Paul Eggert [Mon, 18 Jul 2005 18:09:40 +0000 (18:09 +0000)]
Improve tests for stack overflow in GLR parser.
Problem reported by twlevo@xs4all.nl.
* data/glr.c (struct yyGLRStack): Remove yyerrflag member.
All uses removed.
(yyStackOverflow): Just longjmp, but with value 2 so that caller
can handle the problem.
(YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
(yyparse): New local variable yyresult to record the result.
Use result of setjmp to set it, rather than storing itinto
struct.
(yyDone): Remove label.
(yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
to mimic yacc.c.  Do not discard lookahead if it's EOF (possible
if YYABORT is used).
* tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
yyparse status; put status > 1 into diagnostic.
Check that status==2 works.
* tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
Use exit status 3 for failure to open (which shouldn't happen).

19 years ago* tests/conflicts.at (%nonassoc and eof): Don't exit with status
Paul Eggert [Mon, 18 Jul 2005 06:14:16 +0000 (06:14 +0000)]
* tests/conflicts.at (%nonassoc and eof):  Don't exit with status
1 on syntax error; just let yyparse do its thing.
* tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
* tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
(Exploding the Stack Size with Alloca):
(Exploding the Stack Size with Malloc):
Expect exit status 2, not 1, since the parser is supposed to blow
its stack.  Problem reported by twlevo@xs4all.nl.

19 years ago* data/glr.c (yyparse): Don't assume that the initial calls
Paul Eggert [Sun, 17 Jul 2005 07:30:38 +0000 (07:30 +0000)]
* data/glr.c (yyparse): Don't assume that the initial calls
to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
Print a stack-overflow message and fail instead.
Initialize the line-number information before creating the stack,
so that the stack-overflow message can report line zero safely.

19 years agoMore changes to pacify C++ compilers.
Paul Eggert [Thu, 14 Jul 2005 23:57:45 +0000 (23:57 +0000)]
More changes to pacify C++ compilers.

19 years ago* data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
Paul Eggert [Thu, 14 Jul 2005 23:15:47 +0000 (23:15 +0000)]
* data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
(yyuserMerge): Provide a default case if b4_mergers is empty.
* tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
* tests/glr-regression.at
(Improper handling of embedded actions and dollar(-N) in GLR parsers):
YYSTYPE is char *, not char const *, so that strcpy ($$, ...) works.

19 years ago* tests/glr-regression.at (Improper merging of GLR delayed action
Paul Eggert [Thu, 14 Jul 2005 21:42:40 +0000 (21:42 +0000)]
* tests/glr-regression.at (Improper merging of GLR delayed action
sets): Declare yylex before using it.

19 years ago* tests/Makefile.am (maintainer-check-g++): Remove bogus
Paul Eggert [Thu, 14 Jul 2005 17:27:01 +0000 (17:27 +0000)]
* tests/Makefile.am (maintainer-check-g++): Remove bogus
test for valgrind; valgrind is independent of g++.
(maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
for compatibility with POSIX 1003.1-2001 (if running coreutils).
* tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
Use a destructor, so that we can expand the stack.  Change
YYSTYPE to char * so that we can free it.  Cast result of malloc.

19 years agoUpdate copyright.
Paul Eggert [Thu, 14 Jul 2005 16:34:15 +0000 (16:34 +0000)]
Update copyright.

19 years agoGXX -> CXX
Paul Eggert [Thu, 14 Jul 2005 16:33:40 +0000 (16:33 +0000)]
GXX -> CXX

19 years ago(maintainer-check-g++): Fix a stray
Paul Eggert [Thu, 14 Jul 2005 16:33:28 +0000 (16:33 +0000)]
(maintainer-check-g++): Fix a stray
$(GXX) that escaped the renaming of GXX to CXX.

19 years ago* data/glr.c (yyuserAction): Fix uninitialized variable that caused
Paul Eggert [Thu, 14 Jul 2005 05:08:03 +0000 (05:08 +0000)]
* data/glr.c (yyuserAction): Fix uninitialized variable that caused
a valgrind failure.  Problem reported by twlevo@xs4all.nl.

19 years ago* PACKAGING: New file, suggested by Bruno Haible and taken from
Paul Eggert [Wed, 13 Jul 2005 18:16:30 +0000 (18:16 +0000)]
* PACKAGING: New file, suggested by Bruno Haible and taken from
similar wording in gettext's PACKAGING file.
* NEWS: Mention PACKAGING.
* Makefile.am (EXTRA_DIST): Add PACKAGING.

19 years agoBison-generated C parser -> Bison-generated parser
Paul Eggert [Wed, 13 Jul 2005 17:35:34 +0000 (17:35 +0000)]
Bison-generated C parser -> Bison-generated parser

19 years agoUpdate.
Akim Demaille [Wed, 13 Jul 2005 11:55:16 +0000 (11:55 +0000)]
Update.

19 years agoDon't imply the latest change was in 2.0a.
Paul Eggert [Tue, 12 Jul 2005 23:40:43 +0000 (23:40 +0000)]
Don't imply the latest change was in 2.0a.

19 years ago* NEWS: Document recent i18n improvements.
Paul Eggert [Tue, 12 Jul 2005 23:37:16 +0000 (23:37 +0000)]
* NEWS: Document recent i18n improvements.

19 years ago* bootstrap: Get runtime translations into runtime-po.
Paul Eggert [Tue, 12 Jul 2005 23:28:54 +0000 (23:28 +0000)]
* bootstrap: Get runtime translations into runtime-po.
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.

19 years ago* src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
Akim Demaille [Tue, 12 Jul 2005 15:58:49 +0000 (15:58 +0000)]
* src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
for consistency with the rest of the code.
* src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
Add separators.

19 years ago* src/parse-gram.y: Use %printer instead of YYPRINT.
Akim Demaille [Tue, 12 Jul 2005 13:54:41 +0000 (13:54 +0000)]
* src/parse-gram.y: Use %printer instead of YYPRINT.

19 years agoSync.
Akim Demaille [Tue, 12 Jul 2005 13:48:48 +0000 (13:48 +0000)]
Sync.

19 years ago2005-07-12 Akim Demaille <akim@epita.fr>
Akim Demaille [Tue, 12 Jul 2005 13:47:09 +0000 (13:47 +0000)]
2005-07-12  Akim Demaille  <akim@epita.fr>

* data/glr.c (b4_syncline): Fix (swap) the definitions of
b4_at_dollar and b4_dollar_dollar.

19 years agoTrailing trace.
Akim Demaille [Tue, 12 Jul 2005 13:43:00 +0000 (13:43 +0000)]
Trailing trace.

19 years ago* src/symtab.h, src/symtab.c (symbol_print): New.
Akim Demaille [Tue, 12 Jul 2005 13:41:58 +0000 (13:41 +0000)]
* src/symtab.h, src/symtab.c (symbol_print): New.
* src/symlist.h, src/symlist.c (symbol_list_print): New.
* src/symlist.c (symbol_list_n_type_name_get): Report the culprit.

19 years ago* data/glr.c (b4_syncline): Fix (swap) the definition of
Akim Demaille [Tue, 12 Jul 2005 13:39:38 +0000 (13:39 +0000)]
* data/glr.c (b4_syncline): Fix (swap) the definition of
b4_at_dollar and b4_dollar_dollar.

19 years ago* doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
Paul Eggert [Mon, 11 Jul 2005 22:29:55 +0000 (22:29 +0000)]
* doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
and Pennello's paper.

19 years agoRegenerate.
Paul Eggert [Sat, 9 Jul 2005 08:27:02 +0000 (08:27 +0000)]
Regenerate.

19 years ago* data/yacc.c (yyparse): Undo previous patch. Instead,
Paul Eggert [Sat, 9 Jul 2005 08:26:29 +0000 (08:26 +0000)]
* data/yacc.c (yyparse): Undo previous patch.  Instead,
set yylsp[0] and yyvsp[0] only if the initial action
sets yylloc and yylval, respectively.

19 years ago* data/yacc.c (yyparse): In the initial action, set
Paul Eggert [Sat, 9 Jul 2005 07:14:18 +0000 (07:14 +0000)]
* data/yacc.c (yyparse): In the initial action, set
yylsp[0] and yyvsp[0] rather than yylloc and yylval.
This avoids the use of undefined variables if the initial
action does not set yylloc and/or yylval.

19 years agoAdd *.ll.
Paul Eggert [Thu, 7 Jul 2005 23:18:32 +0000 (23:18 +0000)]
Add *.ll.

19 years ago* examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
Paul Eggert [Thu, 7 Jul 2005 23:16:46 +0000 (23:16 +0000)]
* examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
* examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
Remove from CVS.  These files are automatically generated.
* examples/extexi: Clarify that this file is now part of Bison,
not GNU M4, and that it works with any POSIX-compatible Awk.
* examples/calc++/Makefile.am (run_extexi): Remove; not used.
($(calc_extracted)): Renamed from $(calc_sources_extracted),
so that we also get calc++-parser.yy.  Geneate it.
Use $(AWK), not gawk, since any conforming Awk will do.
Put comment before action, since older 'make' can't handle comment
in action.
$(BUILT_SOURCES): List all built sources, not just some of them.
$(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
$($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
$($(calc_sources_generated)): Remove unnecessary test for existence
of target.  (This had a shell syntax error anyway; a stray "x".)
(calc_extracted): List $(srcdir)/calc++-parser.yy, not
calc++-parser.yy.
* examples/.cvsignore, examples/calc++/.cvsignore: New files.

19 years ago* bootstrap (gnulib_modules): Add gettext, now that it's no longer
Paul Eggert [Thu, 7 Jul 2005 16:06:50 +0000 (16:06 +0000)]
* bootstrap (gnulib_modules): Add gettext, now that it's no longer
implied by the other modules.

19 years agoBind examples/calc++ to the package.
Akim Demaille [Wed, 6 Jul 2005 07:49:25 +0000 (07:49 +0000)]
Bind examples/calc++ to the package.
* examples/calc++/Makefile: Remove, replaced by...
* examples/calc++/Makefile.am: ... this new file.
* examples/calc++/test: Remove input.
* examples/calc++/compile: Remove.
* examples/Makefile.am: New.
* configure.ac, Makefile.am: Adjust.
* doc/Makefile.am (clean-local): New, for more recent texi2dvis.

19 years ago* data/glr.c (yyFail): Drastically simplify; since the format argument
Paul Eggert [Wed, 6 Jul 2005 04:12:23 +0000 (04:12 +0000)]
* data/glr.c (yyFail): Drastically simplify; since the format argument
never had any % directives, we can simply pass it to yyerror.
(yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
be modified later, as that is the usual style in glr.c.

19 years agoRewrite GLR parser to catch more buffer overrun, storage exhaustion,
Paul Eggert [Tue, 5 Jul 2005 21:58:37 +0000 (21:58 +0000)]
Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
and size overflow errors.
* data/glr.c: Include <stdio.h> etc. after user prolog, not before,
in case the user prolog sets feature-test macros like _GNU_SOURCE.
(YYSIZEMAX): New macro.
(yystpcpy): New function, taken from yacc.c.
(struct yyGLRStack.yyspaceLeft): Now size_t, not int.
(yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
so that we don't have to maintain their signatures.
(yyFail): Check for buffer overflow, by using vsnprintf rather
than vsprintf.  Allocate a bigger buffer if possible.
Report an error if buffer allocation fails.
(yyStackOverflow): New function.
(yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
the initialization was successful.  It might fail if storage was
exhausted.
(yyexpandGLRStack): Add more checks for storage allocation failure.
Use yyStackOverflow to report failures.
(yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
(yysplitStack, yyprocessOneStack, yyparse, yypstack):
Don't assume stack number fits in int.
(yysplitStack): Check for storage allocation failure.
(yysplitStack, yyprocessOneStack): Add pure_formals, so that we
can print diagnostics on storage allocation failure.  All callers
changed.
(yyresolveValue): Use yybool for boolean.
(yyreportSyntaxError): Check for size-calculation overflow.
This code is taken from yacc.c.
(yyparse): Check for storage allocation errors when allocating
the initial stack.

19 years agoExtract calc++ from the documentation.
Akim Demaille [Tue, 5 Jul 2005 07:21:30 +0000 (07:21 +0000)]
Extract calc++ from the documentation.
* doc/bison.texinfo (Calc++): Add the extraction marks.
* examples/extexi: New, from the aborted GNU Programming 2E.
Separate the different paragraph of a file with empty lines.
* examples/Makefile: Use it to extract the whole calc++ example.

19 years ago* doc/bison.texinfo (C++ Parser Interface): Use defcv to define
Akim Demaille [Fri, 24 Jun 2005 14:56:11 +0000 (14:56 +0000)]
* doc/bison.texinfo (C++ Parser Interface): Use defcv to define
class typedefs.

19 years ago* doc/bison.texinfo (C++ Language Interface): First stab.
Akim Demaille [Wed, 22 Jun 2005 16:49:19 +0000 (16:49 +0000)]
* doc/bison.texinfo (C++ Language Interface): First stab.
(C++ Parsers): Remove.

19 years ago* data/lalr1.cc (yylex_): Honor %lex-param.
Akim Demaille [Wed, 22 Jun 2005 15:37:22 +0000 (15:37 +0000)]
* data/lalr1.cc (yylex_): Honor %lex-param.

19 years agoStart a set of simple examples.
Akim Demaille [Wed, 22 Jun 2005 15:32:10 +0000 (15:32 +0000)]
Start a set of simple examples.
* examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
* examples/calc++/calc++-driver.hh,
* examples/calc++/calc++-parser.yy,
* examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
* examples/calc++/compile, examples/calc++/test: New.

19 years ago* data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside extern "C" {}.
Paul Eggert [Thu, 9 Jun 2005 20:44:28 +0000 (20:44 +0000)]
* data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside extern "C" {}.

19 years agodata/glr.c: Modify treatment of unused parameters to permit use
Paul Hilfinger [Tue, 7 Jun 2005 02:47:12 +0000 (02:47 +0000)]
data/glr.c: Modify treatment of unused parameters to permit use
  of g++ (which doesn't allow __attribute__ ((unused)) for parameters).

19 years agoRegenerate.
Paul Eggert [Mon, 30 May 2005 17:25:18 +0000 (17:25 +0000)]
Regenerate.

19 years agoFix infringement on user name space reported by Janos Zoltan Szabo.
Paul Eggert [Mon, 30 May 2005 17:23:52 +0000 (17:23 +0000)]
Fix infringement on user name space reported by Janos Zoltan Szabo.

19 years ago(yyparse): strlen -> yystrlen.
Paul Eggert [Mon, 30 May 2005 17:22:55 +0000 (17:22 +0000)]
(yyparse): strlen -> yystrlen.

19 years ago* data/lalr1.cc (_): New.
Akim Demaille [Mon, 30 May 2005 07:02:40 +0000 (07:02 +0000)]
* data/lalr1.cc (_): New.
Translate the various messages.

19 years agoRegenerate.
Paul Eggert [Fri, 27 May 2005 23:22:19 +0000 (23:22 +0000)]
Regenerate.

19 years agoFix infringement on user name space reported by Bruno Haible.
Paul Eggert [Fri, 27 May 2005 23:22:10 +0000 (23:22 +0000)]
Fix infringement on user name space reported by Bruno Haible.
* data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
the user's name space.
(alloca): Include <stdlib.h> to get it, if it's not built in.
(YYMALLOC, YYFREE): Define only if needed.
(malloc, free): Declare, but only if needed, as this infringes on
the user name space.

19 years agoFix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
Paul Eggert [Wed, 25 May 2005 19:48:00 +0000 (19:48 +0000)]
Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
* lib/bitset.c (bitset_print): Don't assume size_t can be printed
with %d format.
* lib/ebitset.c (min, max): Undef before defining.
* lib/vbitset.c (min, max): Likewise.
* lib/subpipe.c (create_subpipe): Save local variables in case
vfork clobbers them.
* tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
error message syntax used by gcc-4.0.

19 years ago* README: Mention m4 1.4.3. Remove obsolete advice about
Paul Eggert [Mon, 23 May 2005 23:19:55 +0000 (23:19 +0000)]
* README: Mention m4 1.4.3.  Remove obsolete advice about
Sun Forte Developer 6 update 2, VMS, and MS-DOS.

19 years ago* bootstrap: Remove workaround for problem I encountered with
Paul Eggert [Mon, 23 May 2005 18:43:08 +0000 (18:43 +0000)]
* bootstrap: Remove workaround for problem I encountered with
gettext 0.14.1; it seems to be fixed now.

19 years agoVersion 2.0a.
Paul Eggert [Mon, 23 May 2005 06:48:08 +0000 (06:48 +0000)]
Version 2.0a.

19 years ago* src/files.c: Include "stdio-safer.h"; this fixes a typo in
Paul Eggert [Sun, 22 May 2005 17:52:12 +0000 (17:52 +0000)]
* src/files.c: Include "stdio-safer.h"; this fixes a typo in
the previous change.

19 years agoVarious maintainer cleanups.
Paul Eggert [Sun, 22 May 2005 17:45:28 +0000 (17:45 +0000)]
Various maintainer cleanups.
* .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
conftest*, for benefit of CVS commands run at the same time as
"configure".  Add build-aux, since "bootstrap" now creates it and
its subfiles.
* Makefile.cfg (move_if_change): Remove.
* Makefile.maint: Remove the update stuff; we now use "bootstrap".
(ftp-gnu, www-gnu, move_if_change, local_updates, update):
(po_repo, do-po-update, po-update, wget_files, get-targets):
(config.guess-url_prefix, config.sub-url_prefix):
(ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
(standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
Remove.
* configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
this is now the recommended name.
* config/.cvsignore: Remove config.guess, config.rpath, config.sub,
depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
ylwrap.  These files now go into build-aux.
* config/move-if-change: Remove.
* config/prev-version.txt: Bump from 1.75 to 2.0.

19 years ago* bootstrap: Add stdio-safer, unistd-safer modules.
Paul Eggert [Sun, 22 May 2005 08:04:06 +0000 (08:04 +0000)]
* bootstrap: Add stdio-safer, unistd-safer modules.
Remove m4/glibc2.m4 (introduced by latest gnulib, but
we don't need it).
* lib/.cvsignore: Add dup-safer.c, fd-safer.c,
fopen-safer.c, stdio-safer.h, unistd-safer.h.
* lib/subpipe.c: Include "unistd-safer.h".
(create_subpipe): Make sure all the newly-created
file descriptors are > 2, so that diagnostics don't
get sent down them (which might cause Bison to hang, in theory).
* m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
* src/files.c (xfopen): Use fopen_safer, not fopen.

19 years ago* data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
Paul Eggert [Sun, 22 May 2005 07:31:41 +0000 (07:31 +0000)]
* data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
yesterday's yacc.c fix.

19 years ago(yy::]b4_parser_class_name[::parse): Port
Paul Eggert [Sun, 22 May 2005 07:31:24 +0000 (07:31 +0000)]
(yy::]b4_parser_class_name[::parse): Port
yesterday's yacc.c fix.

19 years agoUpdate copyright date.
Paul Eggert [Sun, 22 May 2005 06:26:13 +0000 (06:26 +0000)]
Update copyright date.

19 years agoRegenerate.
Paul Eggert [Sun, 22 May 2005 05:20:48 +0000 (05:20 +0000)]
Regenerate.

19 years agoFix a destructor bug reported by Wolfgang Spraul in
Paul Eggert [Sun, 22 May 2005 05:20:01 +0000 (05:20 +0000)]
Fix a destructor bug reported by Wolfgang Spraul in
<http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
* data/yacc.c (yyabortlab): Don't call destructor, and
don't set yychar to EMPTY.
(yyoverflowlab): Don't call destructor.
(yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
* tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
since we no longer output the message "discarding lookahead token
end of input ()".

19 years ago* data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
Paul Hilfinger [Sat, 21 May 2005 08:35:51 +0000 (08:35 +0000)]
* data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
fix a small glitch in debugging output.
(yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
after YY_SYMBOL_PRINT where needed.

(struct yyGLRState): Add some comments.
(struct yySemanticOption): Add some comments.
(union yyGLRStackItem): Add comment.

(yymergeOptionSets): Correct this to properly perform the union,
avoiding infinite reported by Michael Rosien.
Update comment.

* tests/glr-regression.at: Add test for GLR merging error reported
by M. Rosien.

19 years agoUpdate FSF postal mail address.
Paul Eggert [Sat, 14 May 2005 06:49:48 +0000 (06:49 +0000)]
Update FSF postal mail address.

19 years ago* tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
Paul Eggert [Wed, 11 May 2005 19:38:24 +0000 (19:38 +0000)]
* tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
Problem reported by Ralf Menzel.

19 years agoRegenerate.
Paul Eggert [Mon, 2 May 2005 04:56:45 +0000 (04:56 +0000)]
Regenerate.