Commit Graph

2502 Commits

Author SHA1 Message Date
Paul Eggert
f32c66b5f4 GXX -> CXX 2005-07-14 16:33:40 +00:00
Paul Eggert
71206cce8e (maintainer-check-g++): Fix a stray
$(GXX) that escaped the renaming of GXX to CXX.
2005-07-14 16:33:28 +00:00
Paul Eggert
d741bd1bfd * data/glr.c (yyuserAction): Fix uninitialized variable that caused
a valgrind failure.  Problem reported by twlevo@xs4all.nl.
2005-07-14 05:08:03 +00:00
Paul Eggert
0410a6e0cc * 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.
2005-07-13 18:16:30 +00:00
Paul Eggert
a7db4add01 Bison-generated C parser -> Bison-generated parser 2005-07-13 17:35:34 +00:00
Akim Demaille
d2aaf69e73 Update. 2005-07-13 11:55:16 +00:00
Paul Eggert
eb520e4cc0 Don't imply the latest change was in 2.0a. 2005-07-12 23:40:43 +00:00
Paul Eggert
baf785db2e * NEWS: Document recent i18n improvements. 2005-07-12 23:37:16 +00:00
Paul Eggert
f7ab6a5010 * 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.
2005-07-12 23:28:54 +00:00
Akim Demaille
22dda0f004 * 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.
2005-07-12 15:58:49 +00:00
Akim Demaille
82b248ada6 * src/parse-gram.y: Use %printer instead of YYPRINT. 2005-07-12 13:54:41 +00:00
Akim Demaille
2cbd078f51 Sync. 2005-07-12 13:48:48 +00:00
Akim Demaille
1c02d4bfbf 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.
2005-07-12 13:47:09 +00:00
Akim Demaille
716f248dcd Trailing trace. 2005-07-12 13:43:00 +00:00
Akim Demaille
867a3e0085 * 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.
2005-07-12 13:41:58 +00:00
Akim Demaille
fa0e93148c * data/glr.c (b4_syncline): Fix (swap) the definition of
b4_at_dollar and b4_dollar_dollar.
2005-07-12 13:39:38 +00:00
Paul Eggert
e054b19038 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
and Pennello's paper.
2005-07-11 22:29:55 +00:00
Paul Eggert
5f6da1c0f8 Regenerate. 2005-07-09 08:27:02 +00:00
Paul Eggert
407d4a75bb * data/yacc.c (yyparse): Undo previous patch. Instead,
set yylsp[0] and yyvsp[0] only if the initial action
sets yylloc and yylval, respectively.
2005-07-09 08:26:29 +00:00
Paul Eggert
34160ec4ec * 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.
2005-07-09 07:14:18 +00:00
Paul Eggert
6770ae09d3 Add *.ll. 2005-07-07 23:18:32 +00:00
Paul Eggert
b34d96c1c3 * 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.
2005-07-07 23:16:46 +00:00
Paul Eggert
c3d5a4a783 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
implied by the other modules.
2005-07-07 16:06:50 +00:00
Akim Demaille
828c373b6d 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.
2005-07-06 07:49:25 +00:00
Paul Eggert
fd2df2ede4 * 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.
2005-07-06 04:12:23 +00:00
Paul Eggert
63cb01d656 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.
2005-07-05 21:58:37 +00:00
Akim Demaille
1c59e0a121 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.
2005-07-05 07:21:30 +00:00
Akim Demaille
8a0adb0183 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
class typedefs.
2005-06-24 14:56:11 +00:00
Akim Demaille
12545799f9 * doc/bison.texinfo (C++ Language Interface): First stab.
(C++ Parsers): Remove.
2005-06-22 16:49:19 +00:00
Akim Demaille
99be023555 * data/lalr1.cc (yylex_): Honor %lex-param. 2005-06-22 15:37:22 +00:00
Akim Demaille
0ffd4fd1a2 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.
2005-06-22 15:32:10 +00:00
Paul Eggert
0925ebb4fa * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside extern "C" {}. 2005-06-09 20:44:28 +00:00
Paul Hilfinger
43d3b66471 data/glr.c: Modify treatment of unused parameters to permit use
of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
2005-06-07 02:47:12 +00:00
Paul Eggert
73e561d51a Regenerate. 2005-05-30 17:25:18 +00:00
Paul Eggert
3062864d2c Fix infringement on user name space reported by Janos Zoltan Szabo. 2005-05-30 17:23:52 +00:00
Paul Eggert
681c331d2c (yyparse): strlen -> yystrlen. 2005-05-30 17:22:55 +00:00
Akim Demaille
989b5b8e3d * data/lalr1.cc (_): New.
Translate the various messages.
2005-05-30 07:02:40 +00:00
Paul Eggert
4b43d40257 Regenerate. 2005-05-27 23:22:19 +00:00
Paul Eggert
bedf57f515 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.
2005-05-27 23:22:10 +00:00
Paul Eggert
4d1801f1a8 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.
2005-05-25 19:48:00 +00:00
Paul Eggert
85ac3861e7 * README: Mention m4 1.4.3. Remove obsolete advice about
Sun Forte Developer 6 update 2, VMS, and MS-DOS.
2005-05-23 23:19:55 +00:00
Paul Eggert
b94a9e1ed1 * bootstrap: Remove workaround for problem I encountered with
gettext 0.14.1; it seems to be fixed now.
2005-05-23 18:43:08 +00:00
Paul Eggert
009ce67dbe Version 2.0a. 2005-05-23 06:48:08 +00:00
Paul Eggert
f2a97c6294 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
the previous change.
2005-05-22 17:52:12 +00:00
Paul Eggert
c8775f9398 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.
2005-05-22 17:45:28 +00:00
Paul Eggert
3ea5f0ec81 * 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.
2005-05-22 08:04:06 +00:00
Paul Eggert
51c30d2144 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
yesterday's yacc.c fix.
2005-05-22 07:31:41 +00:00
Paul Eggert
ad7458633d (yy::]b4_parser_class_name[::parse): Port
yesterday's yacc.c fix.
2005-05-22 07:31:24 +00:00
Paul Eggert
010f91c341 Update copyright date. 2005-05-22 06:26:13 +00:00
Paul Eggert
bd134904da Regenerate. 2005-05-22 05:20:48 +00:00