Commit Graph

904 Commits

Author SHA1 Message Date
Akim Demaille
0b3551fbee Really add it. 2002-02-25 14:01:26 +00:00
Akim Demaille
abe017f60d * m4/m4.m4: New, from CVS Autoconf.
* configure.in: Invoke it.
* src/output.c (output_skeleton): Use its result instead of the
hard coded name.
2002-02-25 14:00:57 +00:00
Akim Demaille
381fb12e1e * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
Fileutils 4.1.5.
* configure.in: Invoke UTILS_FUNC_MKSTEMP.
* src/output.c (output_skeleton): Use mkstemp to create a real
temporary file.
Move the filling of `skeleton' and its muscle to...
(prepare): here.
(output): Move the definition of the prologue muscle to...
(prepare): here.
* src/system.h (DEFAULT_TMPDIR): New.
2002-02-25 13:44:43 +00:00
Akim Demaille
10b6b2be55 Regen. 2002-02-25 13:44:36 +00:00
Paul Eggert
6f38107f80 Remove the support for C++ namespace cleanliness; it was
causing more problems than it was curing, since it didn't work
properly on some nonstandard C++ compilers.  This can wait
for a proper C++ parser.

* NEWS: Document this.
* doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
of C++, as it's treated like C now.
* src/bison.simple (YYSTD): Remove.
(YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
Treat C++ just like Standard C instead of trying to support
namespace cleanliness.
2002-02-14 20:29:31 +00:00
Paul Eggert
0179dd6542 Revert the C++ namespace changes introduced in 1.31, as they caused too
many portability hassles.
2002-02-14 20:28:37 +00:00
Paul Eggert
45119af166 (YYSTD): Remove.
(YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
Treat C++ just like Standard C instead of trying to support
namespace cleanliness.
2002-02-14 20:27:45 +00:00
Paul Eggert
e4e1a4dcb4 (Bison Parser, Debugging): Remove special mention of C++, as it's
treated like C now.
2002-02-14 20:26:54 +00:00
Akim Demaille
80cce3da95 * tests/regression.at (else): Adjust to Andreas' change. 2002-02-14 12:35:32 +00:00
Akim Demaille
842e86794f * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c. 2002-02-14 11:51:42 +00:00
Akim Demaille
3309b786a3 Regen. 2002-02-14 11:51:36 +00:00
Akim Demaille
4bda3f10ca * src/output.c (output_rule_data): Don't output NULL, it might
not be defined yet.
2002-02-13 18:35:03 +00:00
Akim Demaille
bd16a5dcf5 Fix ChangeLog. 2002-02-11 16:28:40 +00:00
Robert Anisko
4162fa07ae * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
(Copyright notice): Update.
2002-02-11 14:15:51 +00:00
Akim Demaille
b418ecd84f * tests/regression.at (%nonassoc and eof): Don't include
nonportable headers.
2002-02-11 13:38:43 +00:00
Robert Anisko
8d69a1a3ae * data/bison.c++: Correct error recovery. Make the user able to
initialize the starting location.
2002-02-08 14:07:10 +00:00
Akim Demaille
616429b508 Fix the previous test. 2002-02-07 17:22:50 +00:00
Akim Demaille
9b2d067768 * tests/input.at: New. 2002-02-07 17:18:49 +00:00
Robert Anisko
69e2658bf6 * data/bison.c++: Replace some direct m4 expansions by constants. Be
more consistent when naming methods and variables.  Put preprocessor
directives around tables only needed for debugging.
2002-02-07 16:41:23 +00:00
Robert Anisko
4aacc3a71d * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
C++ parsers.
(yy::b4_name::parse): Use print_.
2002-02-07 14:41:46 +00:00
Robert Anisko
762a801e00 * data/bison.c++ (yy::b4_name::parse): Error recovery is back. 2002-02-07 13:02:40 +00:00
Robert Anisko
4bb2bc3f61 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
C++ parsers.
(yy::b4_name::parse): Build verbose error messages, and use error_.
2002-02-07 11:35:40 +00:00
Akim Demaille
9f007dfecc Regen. 2002-02-06 17:21:18 +00:00
Robert Anisko
6b45a3ca82 * data/bison.c++: Fix m4 quoting in comments. 2002-02-06 15:17:57 +00:00
Robert Anisko
50997c6eeb * data/bison.c++: Adjust the parser code. Fix some muscles that were
not expanded by m4.
2002-02-06 14:22:44 +00:00
Akim Demaille
0d76958cf7 Really remove parse-skel.y. 2002-02-05 10:15:24 +00:00
Akim Demaille
11ee57d90c Really add readpipe to the repo. 2002-02-05 10:14:20 +00:00
Akim Demaille
ea6cfe9ebd Really add m4sugar to the repo. 2002-02-05 10:13:16 +00:00
Akim Demaille
3f3eed2770 * data/bison.c++: Adjust to the M4 back end.
More is certainly needed.
2002-02-05 10:09:49 +00:00
Akim Demaille
be2a1a68ef Give a try to M4 as a back end.
* lib/readpipe.c: New, from wdiff.
* src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
BISON_HAIRY.
* src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
specific values.  Now it is m4 that performs the lookup.
* src/parse-skel.y: Remove.
* src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
* src/output.c (actions_output, guards_output)
(token_definitions_output): No longer keeps track of the output
line number, hence remove the second argument.
(guards_output): Check against the guard member of a rule, not the
action member.
Adjust callers.
(output_skeleton): Don't look for the skeleton location, let m4 do
that.
Create `/tmp/muscles.m4'.  This is temporary, a proper temporary
file will be used.
Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
(prepare): Given that for the time being changesyntax is not
usable in M4, rename the muscles using `-' to `_'.
Define `defines_flag', `output_parser_name' and `output_header_name'.
* src/output.h (actions_output, guards_output)
(token_definitions_output): Adjust prototypes.
* src/scan-skel.l: Instead of scanning the skeletons, it now
processes the output of m4: `__oline__' and `#output'.
* data/bison.simple: Adjust to be used by M4(sugar).
* tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
to date.
* tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
* data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
shamelessly stolen from CVS Autoconf.
2002-02-05 10:08:59 +00:00
Akim Demaille
8e86444744 Revert the previous patch. before-m4-back-end 2002-02-05 10:04:24 +00:00
Akim Demaille
beda758b1f * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
* configure.in: Check for the declarations of free and malloc.
* src/muscle_tab.c: Adjust.
2002-02-05 10:00:47 +00:00
Akim Demaille
5ece6d436f * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
which have no values.
2002-02-05 09:58:57 +00:00
Akim Demaille
5bb18f9a19 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
* data/: here.
2002-02-05 09:57:52 +00:00
Paul Eggert
894dd62eb2 * src/bison.simple (YYSIZE_T): Do not define merely because
YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
On some platforms, <alloca.h> does not declare YYSTD (size_t).
2002-01-29 13:58:06 +00:00
Paul Eggert
2992e1e967 (YYSIZE_T): Do not define merely because YYSTACK_USE_ALLOCA is nonzero
or alloca or _ALLOCA_H are defined.  On some platforms, <alloca.h>
does not declare YYSTD (size_t).
2002-01-29 13:55:32 +00:00
Akim Demaille
82841af7d0 Fix `%nonassoc and eof'.
* src/state.c (errs_dup): Aaaah!  The failure was due to bytes
which were not properly copied!  Replace
memcpy (res->errs, src->errs, src->nerrs);
with
memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
!!!
* tests/regression.at (%nonassoc and eof): Adjust to newest
Autotest: `.' is not in the PATH.
2002-01-27 13:57:17 +00:00
Akim Demaille
318b76e913 * tests/sets.at (AT_EXTRACT_SETS): New.
(Nullable): Use it.
(Firsts): New.
2002-01-27 13:57:03 +00:00
Akim Demaille
30d2f3d50f * tests/actions.at, tests/calc.at, tests/headers.at,
* tests/torture.at: Adjust to the newest Autotest which no longer
forces `.' in the PATH.
2002-01-27 10:59:15 +00:00
Akim Demaille
30f8c3953f * tests/regression.at (%nonassoc and eof): New.
Suggested by Robert Anisko.
2002-01-25 16:24:40 +00:00
Akim Demaille
29ae55f112 Bison dumps core when trying to complain about broken input files.
Reported by Cris van Pelt.
* src/lex.c (parse_percent_token): Be sure to set token_buffer.
* tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
into...
(Invalid inputs): Strengthen: exercise parse_percent_token.
2002-01-24 17:09:34 +00:00
Robert Anisko
2b548aa648 * src/Makefile.am: Add bison.c++.
* src/bison.c++: New skeleton.
2002-01-24 16:50:07 +00:00
Akim Demaille
bb0146c2a9 * po/it.po: New. 2002-01-21 19:29:04 +00:00
Akim Demaille
4518a4baae Adjust. 2002-01-21 19:27:55 +00:00
Akim Demaille
bec30531f7 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition. 2002-01-21 15:50:39 +00:00
Marc Autret
fc6edc45c0 * src/files.c (compute_output_file_names): Fix 2002-01-20 15:59:34 +00:00
Marc Autret
5e5d541531 * tests/output.at: New test.
* src/files.c (compute_base_names): Don't map extensions when
the YACC flag is set, use defaults.
Reported by Evgeny Stambulchik.
2002-01-20 15:46:19 +00:00
Marc Autret
52d1aeee3d Update. 2002-01-20 14:37:39 +00:00
Marc Autret
44ea3fbdf5 * src/system.h: Need to define __attribute__ away for non-GCC
compilers as well (i.e.	the vendor C compiler).
Suggested by Albert Chin-A-Young.
2002-01-20 11:34:02 +00:00
Tim Van Holder
338963d177 * src/system.h, lib/hash.h, lib/hash.c: PARAMS fixes. 2002-01-11 15:32:06 +00:00