Compare commits

...
293 Commits
Author SHA1 Message Date
Akim Demaille 0d240c12ba Version 1.34. 2002-03-12 15:51:40 +00:00
Akim Demaille eda67e575d Fix errors. 2002-03-12 15:48:16 +00:00
Akim Demaille b286091ee2 Update. 2002-03-11 19:19:37 +00:00
Akim Demaille 83eda11059 . 2002-03-04 18:29:56 +00:00
Akim Demaille d0f19d6f43 Version 1.33b. 2002-03-04 18:25:24 +00:00
Akim Demaille f443a1eb89 Update. 2002-03-04 18:21:08 +00:00
Akim Demaille 4eeb7bc9a2 * tests/output.at (AT_CHECK_OUTPUT): Another test, making sure
bison fails when trying to output a parser and a header under the
same name.
* src/files.c (compute_output_file_names): Refuse when parser and
header have the same name.
2002-03-04 18:06:42 +00:00
Akim Demaille 5d08b24fba * src/reader.c (readgram): A missing `;' is a warning, not an
error!
2002-03-04 17:00:45 +00:00
Akim Demaille 3af141b0e3 Regen. 2002-03-04 16:21:52 +00:00
Akim Demaille bae3c8d209 * tests/sets.at (Broken Closure): Add the ending `;'.
* tests/input.at (Invalid $n, Invalid @n): Likewise.
* tests/output.at (AT_CHECK_OUTPUT): Likewise.
* src/reader.at (readgram): Complain if a rule is not ended with a
semi-colon.
2002-03-04 14:57:46 +00:00
Akim Demaille 6f8dd2075e * tests/Makefile.am (check_SCRIPTS): New. 2002-02-28 15:47:55 +00:00
Akim Demaille 5327d634b3 . 2002-02-28 15:20:49 +00:00
Akim Demaille 3491db2e44 Regen. 2002-02-28 15:16:44 +00:00
Akim Demaille 9fef6a2a0b Version 1.33a. 2002-02-28 15:12:19 +00:00
Akim Demaille fe24ffa45a Update. 2002-02-28 15:11:44 +00:00
Akim Demaille 28f490e38d * src/bison.simple (yydebug): Fix the comment.
From Bruce Lilly.
2002-02-25 18:02:06 +00:00
Juan Manuel Guerrero 48dccdf81a DJGPP spicific: NULL pointer fix 2002-02-21 12:13:50 +00:00
Paul Eggert 039e51a37c 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:17:53 +00:00
Paul Eggert 20b9de21c7 Revert the C++ namespace changes introduced in 1.31. 2002-02-14 20:16:29 +00:00
Paul Eggert 26ae304aa6 (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:10:54 +00:00
Paul Eggert 2d0bf7bdd5 (Bison Parser, Debugging): Remove special mention of C++, as it's
treated like C now.
2002-02-14 20:09:29 +00:00
Akim Demaille e1fe241dc8 * tests/regression.at (else): Adjust to Andreas' change. 2002-02-14 12:37:44 +00:00
Akim Demaille e334b4a99b * src/output.c (output_rule_data): Don't output NULL, it might
not be defined yet.
2002-02-13 18:34:59 +00:00
Akim Demaille 1bb14a172a Typo. 2002-02-13 18:34:40 +00:00
Juan Manuel Guerrero cc20bc3166 DJGPP support added 2002-02-13 16:13:31 +00:00
Akim Demaille 9cbe3c4878 * tests/regression.at (%nonassoc and eof): Don't include non
portable headers.
2002-02-11 13:31:14 +00:00
Akim Demaille d961d172be Bump to 1.33a. 2002-02-11 13:28:56 +00:00
Akim Demaille dbbe1eb433 . 2002-02-07 17:44:12 +00:00
Akim Demaille 0e25677ee2 Version 1.33. 2002-02-07 17:39:57 +00:00
Akim Demaille e89a22bfab * tests/regression.at, tests/torture.at, tests/calc.at: Adjust to
newest Autotest, where `.' is not in the PATH.
2002-02-07 17:30:49 +00:00
Akim Demaille f5c0dc4880 * src/reader.c (copy_at): Detect invalid @N values. 2002-02-07 17:17:16 +00:00
Akim Demaille 7307a21a45 * tests/input.at: New. 2002-02-07 17:13:46 +00:00
Akim Demaille 63f7fb275a Update. 2002-02-07 14:59:47 +00:00
Paul Eggert 4f55c2577d * 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:52:05 +00:00
Paul Eggert 62a21d52ce (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:50:11 +00:00
Akim Demaille 27fb1c24b7 * tests/regression.at (%nonassoc and eof): New.
Suggested by Robert Anisko.
2002-01-25 16:24:21 +00:00
Akim Demaille 281a98c77a 1.32a. 2002-01-25 11:29:31 +00:00
Akim Demaille 83ce390155 Adjust. 2002-01-24 18:57:32 +00:00
Akim Demaille c96ef8e0b9 Update. 2002-01-24 18:51:04 +00:00
Akim Demaille 501cc96c68 . 2002-01-23 13:31:25 +00:00
Akim Demaille a69417c066 Version 1.32. 2002-01-23 13:27:47 +00:00
Akim Demaille d138fdbf19 Update. 2002-01-23 13:24:22 +00:00
Akim Demaille 9326268a46 * src/getargs.c (version): Bump to 2002.
Patch the PO files to help translators.
2002-01-23 13:14:56 +00:00
Akim Demaille 88964d04d9 Update. 2002-01-22 17:14:38 +00:00
Akim Demaille e803581008 Missing ]. 2002-01-22 14:29:56 +00:00
Akim Demaille 015af8c168 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-22 10:29:28 +00:00
Akim Demaille 3a48f72d7e Regen. 2002-01-21 19:33:36 +00:00
Akim Demaille 3e0f96bc08 * po/it.po: New. 2002-01-21 19:27:34 +00:00
Akim Demaille ef1a77c2c9 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition. 2002-01-21 15:48:25 +00:00
Akim Demaille 2842171a4c Regen. 2002-01-21 14:09:53 +00:00
Marc Autret 64fa1ea1b8 * 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 10:59:44 +00:00
Marc Autret 7700a71572 * 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-19 12:50:56 +00:00
Marc Autret 7baed3bf89 * configure.in, doc/version.texi: Bump to 1.31a. 2002-01-19 12:47:28 +00:00
Akim Demaille 1710ea3d30 . 2002-01-14 10:58:00 +00:00
Akim Demaille 12de352a6f Bump to 1.31. 2002-01-14 10:28:31 +00:00
Akim Demaille 6fc75bfd3a * tests/regression.at (Invalid CPP headers): Remove. 2002-01-14 10:16:49 +00:00
Akim Demaille 96df91407c Bump to 1.30m. 2002-01-14 10:16:41 +00:00
Akim Demaille b30efba0d0 . 2002-01-12 11:45:03 +00:00
Akim Demaille fd2d280114 Version 1.30l. 2002-01-12 11:41:45 +00:00
Akim Demaille 68e202f30f * lib/Makefile.am (EXTRA_DIST): Add strnlen.c: Automake is still
not using Autoconf traces and does not see Autoconf's AC_LIBOBJ.
2002-01-12 11:39:54 +00:00
Akim Demaille d7848b138c . 2002-01-11 13:46:33 +00:00
Akim Demaille 40c6b975e9 Update. 2002-01-11 13:42:16 +00:00
Akim Demaille a5fb3dead0 Version 1.30k. 2002-01-11 13:37:00 +00:00
Akim Demaille ac5ff6a908 * configure.in: Use AC_FUNC_STRNLEN. 2002-01-11 13:31:33 +00:00
Akim Demaille 0b1cb33137 . 2002-01-09 15:17:22 +00:00
Akim Demaille 9f3c97f74f Version 1.30j. 2002-01-09 15:12:39 +00:00
Akim Demaille a99566be67 * configure.in (WERROR_CFLAGS): Compute it.
* src/Makefile.am (CFLAGS): Pass it.
* tests/atlocal.in (CFLAGS): Idem.
2002-01-09 15:06:25 +00:00
Akim Demaille ca66b45a86 Update. 2002-01-09 14:56:07 +00:00
Akim Demaille 55601256c2 * lib/Makefile.am (libbison_a_SOURCES): Add xstrndup.c.
* src/getargs.c (AS_FILE_NAME): New.
(getargs): Use it to convert DOSish file names.
* src/files.c (base_name): Rename as full_base_name to avoid
clashes with `base_name ()'.
(get_extension_index): Remove.
(filename_split): New.
(compute_base_names): N-th rewrite, using filename_split.
2002-01-08 17:41:38 +00:00
Akim Demaille 43cc2463d2 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c,
* lib/xstrndup.c, lib/strchr.c:
New, stolen from the Fileutils 4.1.
* lib/Makefile.am (libbison_a_SOURCES): Adjust.
* configure.in: Check for the presence of memrchr, strchr,
strnlen, and of their prototypes.
Don't check for strndup: we no longer use it.
* src/system.h: Adjust the prototypes.
2002-01-08 17:30:53 +00:00
Akim Demaille 25a46077de * src/conflicts.c (count_rr_conflicts): The previous RR conflicts
patch was improperly applied: fix it.
2002-01-07 08:42:59 +00:00
Akim Demaille 62d3162c4c Revert the previous patch which was meant for the trunk only. 2002-01-07 08:40:29 +00:00
Akim Demaille 3f2f7848cc * src/reader.c (parse_braces): Don't fetch the next char, the
convention is to fetch on entry.
* tests/torture.at (GNU Cim Grammar): Reintroduce their weird
'switch' without a following semicolon.
* tests/regression.at (braces parsing): New.
2002-01-06 20:59:30 +00:00
Akim Demaille c4267a3d35 Bison is dead wrong in its RR conflict reports.
* tests/torture.at (GNU Cim Grammar): New.
* src/conflicts.c (count_rr_conflicts): Fix.
2002-01-06 20:59:12 +00:00
Akim Demaille ae774286e8 Creating package.m4 from configure.ac causes too many problems.
* tests/Makefile.am (package.m4): Create it by hand,
AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
2002-01-06 20:57:20 +00:00
Akim Demaille 43f8a3245a Regen. 2002-01-06 20:56:42 +00:00
Paul Eggert a22d7bd8d6 * doc/bison.texinfo (Debugging):
Remove YYSTDERR; it's no longer defined or used.
Also, s/cstdio.h/cstdio/.
2002-01-05 01:20:57 +00:00
Paul Eggert f36280e16e (Debugging): Remove YYSTDERR; it's no longer defined or used.
Also, s/cstdio.h/cstdio/.
2002-01-05 01:18:26 +00:00
Akim Demaille 38612b10a3 * src/files.h: Add it prototype. 2002-01-03 13:55:09 +00:00
Akim Demaille ffc03584ad * src/files.c, src/files.h (strsuffix): Not static.
* src/conflicts.c (conflicts_print): Don't consider it is an error
to have a %expectation violation on a file ending by `plural.y'.
Eek.
2002-01-03 13:39:20 +00:00
Akim Demaille dd3c3f3006 * tests/bison.in: Adjust to CVS Autoconf.
* tests/calc.at (exp): We no longer need to special case GCC as
the warning flags are passed by configure.
* tests/atlocal.in: Adjust.
* configure.in: Bump to 1.30j.
2002-01-03 11:10:50 +00:00
Akim Demaille f1d93aa21c Regen. 2002-01-03 11:09:47 +00:00
Akim Demaille a4f0747a2a . 2002-01-03 10:45:14 +00:00
Akim Demaille ca69f83c53 Version 1.30i. 2002-01-03 10:42:17 +00:00
Akim Demaille b06c1dfb75 Update. 2002-01-03 10:40:03 +00:00
Akim Demaille 7525f95ed5 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
The ISO C++ standard is extremely clear about it: stderr is
considered a macro, not a regular symbol (see table 94 `Header
<cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
Therefore std:: does not apply to it.  It still does with fprintf.
Also, s/cstdio.h/cstdio/.
2002-01-03 09:48:08 +00:00
Akim Demaille 1daed0de8a * lib/quotearg.c: Use #include "..."' instead of #include <...>'
for non system headers.
2002-01-03 09:27:34 +00:00
Akim Demaille 32e175835b Regen. 2002-01-03 09:24:59 +00:00
Akim Demaille ea04a14c5c * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
Sparc, as they were causing more porting problems than the
(minor) performance improvement was worth.
2001-12-27 18:30:40 +00:00
Akim Demaille d6b12c2d8b * src/output.c (output_short_table, output_short_or_char_table):
Change the prototype to use `int' for array ranges: some
invocations do pass an int, not a short.
Reported by Wayne Green.
2001-12-27 18:28:23 +00:00
Akim Demaille f4ffa313a2 Regen. 2001-12-22 15:13:48 +00:00
Akim Demaille 1214dfb03b Some actions of web2c.y are improperly triggered.
Reported by Mike Castle.
* src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
* tests/regression.at (Web2c): Rename as...
(Web2c Report): this.
(Web2c Actions): New.
2001-12-22 14:44:25 +00:00
Akim Demaille 55b4181996 Reductions in web2c.y are improperly reported.
Reported by Mike Castle.
* src/conflicts.c (print_reductions): Fix.
* tests/regression.at (Web2c): New.
2001-12-22 14:41:15 +00:00
Akim Demaille 12a04365ce Bump to 1.30i 2001-12-22 14:39:44 +00:00
Akim Demaille 6929a4a0e8 Adjust. 2001-12-18 09:58:07 +00:00
Akim Demaille 07cccc8bc6 . 2001-12-18 09:51:33 +00:00
Akim Demaille 36791b5576 Version 1.30h. 2001-12-18 09:46:36 +00:00
Akim Demaille dba44a1367 Update. 2001-12-18 09:42:58 +00:00
Akim Demaille d4593e87be Some host fail on `assert (!"foo")', which expands to
((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
Reported by Nelson Beebee.
* src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
`#define it_succeeded 0' and `assert (it_succeeded)'.
2001-12-18 09:33:23 +00:00
Paul Eggert 6b1ec1fb33 * src/bison.simple (YYSTD): New macro.
(YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE, YYFPRINTF, YYSTDERR): Use
it to simplify macros, and fix some C++ porting problems reported
by Hans Aberg.
2001-12-17 23:51:46 +00:00
Paul Eggert bfb74f79b8 (YYSTD): New macro.
(YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE, YYFPRINTF, YYSTDERR): Use it to
simplify macros, and fix some C++ porting problems reported by Hans Aberg.
2001-12-17 23:50:16 +00:00
Paul Eggert c520f816b1 * src/output.c (output): Define YYDEBUG to 0 if it is not defined
and if we are not debugging.  POSIX requires this.
* NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document this.

* src/output.c (output_gram, output_rule_data): Do not assume that
the user defines YYDEBUG to a properly parenthesized expression.
2001-12-17 18:49:14 +00:00
Paul Eggert cc6ed5f7f1 Define YYDEBUG to 0 if it is not defined and if we are not debugging.
POSIX requires this.
2001-12-17 18:48:43 +00:00
Paul Eggert ac28f67c0b (output): Define YYDEBUG to 0 if it is not defined and if we are not
debugging.  POSIX requires this.

(output_gram, output_rule_data): Do not assume that
the user defines YYDEBUG to a properly parenthesized expression.
2001-12-17 18:45:59 +00:00
Akim Demaille f30e1ab65c * src/nullable.c (set_nullable): Useless rules must be skipped,
otherwise, since we range over their symbols, we might look at a
nonterminal which no longer ``exists'', i.e., it is not counted in
`nvars', hence we overflow our arrays.
2001-12-15 16:22:13 +00:00
Akim Demaille 52e9776027 * src/reader.c (copy_action): When --yacc, don't append a `;'
to the user action: let it fail if lacking.
Suggested by Aharon Robbins and Tom Tromey.
2001-12-15 11:07:56 +00:00
Akim Demaille 21292982fe Regen. 2001-12-15 10:59:00 +00:00
Akim Demaille 9f0938ad32 Bump to 1.30h. 2001-12-13 12:07:48 +00:00
Akim Demaille cb948818d0 . 2001-12-13 11:18:19 +00:00
Akim Demaille c0760f18e0 Version 1.30g. 2001-12-13 11:14:19 +00:00
Akim Demaille c884affb0b Update. 2001-12-13 11:06:18 +00:00
Akim Demaille f7e7f57941 The computation of nullable is broken: it doesn't handle empty
RHS's properly.
* tests/torture.at (GNU AWK Grammar): New.
* tests/sets.at (Nullable): New.
* src/nullable.c (set_nullable): Instead of blindly looping over
`ritems', loop over the rules, and then over their rhs's.
Work around Autotest bugs.
* src/warshall.c (bitmatrix_print): Don't use `+--+' as table
frame, because Autotest understand lines starting with a `+' as
traces from the shell.  Then, they are not processed properly.
Admittedly an Autotest bug, but we don't have time to wait for
Autotest to catch up.
* tests/regression.at (Broken Closure): Adjust to the new table
frames.
Move to...
* tests/sets.at: here.
2001-12-13 10:59:37 +00:00
Paul Eggert d1210d1d6e Document YYPRINTF, YYSTDERR. 2001-12-13 02:45:14 +00:00
Paul Eggert d5c2eff246 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
Do not infringe on the global user namespace when using C++.
	(YYFPRINTF, YYSTDERR): New macros, needed for the above.
	All uses of `fprintf' and `stderr' changed.

	* src/output.c (output): Do not output "#include <stdio.h>"; that
	is bison.simple's job.  stdio.h should be included only if
	necessary, to avoid infringing on the user name space when
	possible.
2001-12-13 02:22:05 +00:00
Paul Eggert b59b91bb6e (output): Do not output "#include <stdio.h>"; that is bison.simple's
job.  stdio.h should be included only if necessary, to avoid
infringing on the user name space when possible.
2001-12-13 02:21:12 +00:00
Paul Eggert 63e75f2e38 (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
Do not infringe on the global user namespace when using C++.
(YYFPRINTF, YYSTDERR): New macros, needed for the above.
All uses of `fprintf' and `stderr' changed.
2001-12-13 02:20:28 +00:00
Akim Demaille 69dc1147ba * src/complain.h, src/complain.c: Remove error_one_per_line, rely
on that of lib/error.c.
2001-12-12 15:21:59 +00:00
Akim Demaille 3d9d5d34ff Regen. 2001-12-12 15:19:25 +00:00
Akim Demaille 701d80ffa0 Regen. 2001-12-12 12:01:09 +00:00
Akim Demaille 88f06d2beb Some hosts don't like `/' in includes.
* src/system.h: Include libgettext.h without qualifying the path.
* src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
$(top_srcdir).
2001-12-12 11:55:56 +00:00
Akim Demaille daa938e7f0 Regen. 2001-12-12 11:55:29 +00:00
Akim Demaille ed45e93ed8 Bison dumps core on bash.y.
Reported by Pascal Bart.
* src/warshall.c (bitmatrix_print): New.
(TC): Use it.
When performing a transitive closure R(i, j) && R(j, k) => R(i,	k),
j must be the outer loop.
* tests/regression.at (Broken Closure): New.
2001-12-10 08:43:38 +00:00
Akim Demaille 74d757ab92 Fix an es.po problem. 2001-12-06 14:24:41 +00:00
Akim Demaille 4be25f1591 Version 1.30g. 2001-12-05 15:24:53 +00:00
Akim Demaille b7008317cf . 2001-12-05 12:01:24 +00:00
Akim Demaille 3f66ed1c8b Update. 2001-12-05 11:57:46 +00:00
Akim Demaille 58dce15432 Version 1.30f. 2001-12-05 11:46:05 +00:00
Akim Demaille e6970f2ed0 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
its argument.
Reported by Peter Hámorský.
2001-12-05 10:58:44 +00:00
Akim Demaille b9866ce4da Regen. 2001-12-05 09:30:34 +00:00
Akim Demaille b32ba448c8 * src/conflicts.c (err_table): Remove.
(resolve_sr_conflict): Adjust.
* src/lalr.h (state_t.reduction_table, state_t.shift_table):
Rename as...
(state_t.reductions, state_t.shifts): this.
2001-12-05 09:24:54 +00:00
Akim Demaille 5844cd0cfa * src/reduce.c (reduce_grammar_tables): No longer disable the
removal of useless rules via CPP but via `if (0)', so that the
compiler still check the code is valid.
For instance, it should have noticed `rline' no longer exists: use
the `line' member of rule_t.
* src/gram.c (dummy, rline): Remove, unused.
2001-12-05 09:24:35 +00:00
Akim Demaille 0fc1a97d9f * src/output.c (pack_vector): Use assert, not berror.
* src/main.c (berror): Remove, unused.
2001-12-05 09:24:21 +00:00
Akim Demaille 84b6f48351 New experimental feature: if --verbose --trace output all the
items of a state, not only its kernel.
* src/print.c (print_core): If `trace_flag', then invoke closure
before outputting the items of the state (print_core is no longer
a correct name them).
(print_results): Invoke new_closure/free_closure if needed.
2001-12-05 09:24:06 +00:00
Akim Demaille b6a70d99a6 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
* src/closure.c, src/closure.h (itemsetsize): Rename as...
(nitemset): for consistency with the rest of the project.
2001-12-05 09:23:52 +00:00
Akim Demaille 66d35de779 * src/closure.c (print_closure): Improve.
(closure): Use it for printing input and output.
2001-12-05 09:23:38 +00:00
Akim Demaille 5e5b240715 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
indexed by nonterminals.
2001-12-05 09:23:24 +00:00
Akim Demaille aaf7be2c4b * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
what it was!).
* src/warshall.h: Remove accidental duplication of the content.
2001-12-05 09:23:10 +00:00
Akim Demaille 0ea80316a9 * src/closure.c (set_fderives): De-obfuscate. 2001-12-05 09:22:55 +00:00
Akim Demaille 09b2117db7 * src/closure.c (print_firsts, print_fderives): De-obfuscate. 2001-12-05 09:22:40 +00:00
Akim Demaille 78fc5ce865 * src/closure.c (set_firsts): De-obfuscate. 2001-12-05 09:22:27 +00:00
Akim Demaille 766ffc1523 * src/output.c (action_row): De-obfuscate
using the good o' techniques: arrays not pointers, variable
locality, BITISSET, RESETBIT etc.
2001-12-05 09:22:14 +00:00
Akim Demaille 06a2f464b1 Pessimize the code to simplify it: from now on, all the states
have a valid SHIFTS, which NSHIFTS is possibly 0.
* src/LR0.c (shifts_new): Be global and move to..
* src/state.c, src/state.h: here.
* src/conflicts, src/lalr.c, src/output.c, src/print.c,
* src/print_graph: Adjust.
2001-12-05 09:21:55 +00:00
Akim Demaille 15ab9127f5 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
* src/conflicts.c: Use it.
Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
incorrectly ``simplified''.
2001-12-05 09:21:15 +00:00
Akim Demaille 32f18df511 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
using the good o' techniques: arrays not pointers, variable
locality, BITISSET, RESETBIT etc.
2001-12-05 09:20:55 +00:00
Akim Demaille 19f8d30b9c * src/state.h (SHIFT_SYMBOL): New.
* src/conflicts.c: Use it to deobfuscate.
2001-12-05 09:20:41 +00:00
Akim Demaille 7b106ce5f0 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
(print_reductions): De-obfuscate using the good o' techniques:
arrays not pointers, variable locality, BITISSET.
2001-12-05 09:20:22 +00:00
Akim Demaille b5c15946a1 * src/conflicts.c (print_reductions): Arrays, not pointers.
Use BITISSET.
2001-12-05 09:20:07 +00:00
Akim Demaille 980929ba0b * src/conflicts.c (print_reductions): Pessimize, but clarify. 2001-12-05 09:19:53 +00:00
Akim Demaille 4c3791f08d * src/conflicts.c (print_reductions): Improve variable locality. 2001-12-05 09:19:41 +00:00
Akim Demaille a8355549a5 * src/conflicts.c (print_reductions): Pessimize, but clarify. 2001-12-05 09:19:27 +00:00
Akim Demaille 2883204382 * src/conflicts.c (print_reductions): Improve variable locality. 2001-12-05 09:19:13 +00:00
Akim Demaille 825b9e4ef4 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
* src/lalr.c: Use them.
2001-12-05 09:18:57 +00:00
Akim Demaille 57339f0421 * src/LR0.c (augment_automaton): Formatting changes.
Better variable locality.
2001-12-05 09:18:39 +00:00
Akim Demaille 963c0cf62f * src/lalr.c (matrix_print): New.
(transpose): Use it.
Use arrays instead of pointers.
2001-12-05 09:18:25 +00:00
Akim Demaille 6a1e01f060 * src/lalr.c (maxrhs): Move to...
* src/gram.c, src/gram.h (ritem_longest_rhs): here.
* src/lalr.c (build_relations): Adjust.
2001-12-05 09:18:12 +00:00
Akim Demaille 4cecb5a248 * src/lalr.c (transpose): Free the memory allocated to the
argument, as it is replaced by the results by the unique caller.
(build_relations): Merely invoke transpose: it handles the memory
deallocation.
Improve variable locality.
Avoid variables used as mere abbreviations.
(compute_lookaheads): Use arrays instead of pointers.
2001-12-05 09:17:50 +00:00
Akim Demaille 76c97f6a39 * src/lalr.c (initialize_F): Improve variable locality.
Avoid variables used as mere abbreviations.
2001-12-05 09:17:34 +00:00
Akim Demaille e4ef7aa1c9 * src/derives.c (print_derives): Display the ruleno.
* src/lalr.c (initialize_F, transpose): Better variable locality
to improve readability.
Avoid variables used as mere abbreviations.
2001-12-05 09:17:20 +00:00
Akim Demaille 3557477440 * src/lalr.c (traverse): Use arrays instead of pointers. 2001-12-05 09:17:05 +00:00
Akim Demaille 4b412c9eca * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
the handling of squeue.
`symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
2001-12-05 09:16:51 +00:00
Akim Demaille fa7f94f217 Because useless nonterminals are now kept alive (instead of being
`destroyed'), we now sometimes examine them, and store information
related to them.  Hence we need to know their number, and adjust
memory allocations.
* src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
static.
* src/LR0.c (allocate_itemsets): The memory allocated to
`symbol_count' was used for two different purpose: once to count
the number of occurrences of each symbol, and later reassigned to
`shift_symbol', containing the symbol that can be shifted from a
given state.
Deobfuscate, i.e., allocate, use and free `symbol_count' here
only, and...
(new_itemsets): Allocate `shift_symbol' here.
(allocate_itemsets): symbol_count includes useless nonterminals.
Make room for them.
(free_storage): Use `free', not `XFREE', for pointers that cannot
be null.
2001-12-05 09:16:37 +00:00
Akim Demaille d854cc9e5a * src/nullable.c (set_nullable): Deobfuscate the handling of
ritem.
`symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
2001-12-05 09:16:22 +00:00
Akim Demaille 2dfb4daf9b * src/gram.c, src/gram.h (ritem_print): New.
* src/gram.c (dummy): Remove, now there is actual code in gram.c.
(This useless function was defined only to work around VMS linkers
that can't handle compilation units with variables only).
* src/reduce.c (dump_grammar): Use it to trace the construction of
ritem.
2001-12-05 09:16:07 +00:00
Paul Eggert cc904af579 * src/bison.simple (union yyalloc): Change member names
to be the same as the stack names.
(yyparse): yyptr is now union yyalloc *, not char *.
(YYSTACK_RELOCATE): Likewise.  This avoids a GCC warning,
and may generate better code on some machines.
2001-12-04 14:06:43 +00:00
Paul Eggert 716c50b877 * src/bison.simple (union yyalloc): Change member names
to be the same as the stack names.
(YYPOINTER): Remove.
(yyparse): yyptr is now union yyalloc *, not char *.
(YYSTACK_RELOCATE): Likewise.  This avoids a GCC warning,
and may generate better code on some machines.
2001-12-04 14:06:06 +00:00
Paul Eggert 9f41bcaae8 * src/bison.simple (YYPOINTER): New macro.
(YYSTACK_RELOCATE): Use it to avoid a GCC warning.
(yystpcpy): Use prototype if __STDC__ is defined, not just
if __cplusplus is defined.
2001-12-04 13:28:51 +00:00
Paul Eggert 1ccbf4bb8b (YYPOINTER): New macro.
(YYSTACK_RELOCATE): Use it to avoid a GCC warning.
(yystpcpy): Use prototype if __STDC__ is defined, not just
if __cplusplus is defined.
2001-12-04 13:28:18 +00:00
Akim Demaille a69f6fa569 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
(CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
Gettext doesn't compile cleanly, and dies with -Werror.
* src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
Include WARNING_CFLAGS here.
* lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
before being defined.
2001-11-30 14:23:47 +00:00
Akim Demaille 3757d84e90 * lib/quotearg.h (quotearg_n, quotearg_n_style):
First arg is int, not unsigned.
* lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
(SIZE_MAX, UINT_MAX): New macros.
(quotearg_n_options): Abort if N is negative.
Avoid overflow check on hosts where size_t is 64 bits and int
is 32 bits, as overflow is impossible there.
Fix off-by-one typo that caused unnecessary reallocation.
2001-11-30 14:04:22 +00:00
Akim Demaille cac4f75e15 Add the missing ChangeLog of the previous checkin. 2001-11-30 13:15:39 +00:00
Akim Demaille fc7ddd2818 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
if body instead of `;' to pacify GCC's warnings.
2001-11-30 13:14:10 +00:00
Akim Demaille 0ffdf37212 Regen. 2001-11-30 13:10:01 +00:00
Akim Demaille 9e55edfc29 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
if body instead of `;' to pacify GCC's warnings.
2001-11-30 11:11:08 +00:00
Akim Demaille d39a6b7ca9 Instead of mapping the LHS of unused rules to -1, keep the LHS
valid, but flag the rules as invalid.
* src/gram.h (rule_t): `useful' is a new member.
* src/print.c (print_grammar): Adjust.
* src/derives.c (set_derives): Likewise.
* src/reader.c (packgram, reduce_output): Likewise.
* src/reduce.c (reduce_grammar_tables): Likewise.
* tests/reduce.at (Underivable Rules, Useless Rules): New.
2001-11-30 10:46:08 +00:00
Akim Demaille d287d66a69 * src/reduce.c (reduce_output): Formatting changes.
* src/print.c (print_results, print_grammar): Likewise.
* tests/regression.at (Rule Line Numbers)
(Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
2001-11-30 10:45:45 +00:00
Akim Demaille ea451a17d7 * src/reduce.c (nonterminals_reduce): Instead of throwing away
useless nonterminals, move them at the end of the symbol arrays.
(reduce_output): Adjust.
* tests/reduce.at (Useless Nonterminals): Adjust.
2001-11-30 10:45:28 +00:00
Akim Demaille 24b1e65f04 * src/reduce.c: Various comment/formatting changes.
(nonterminals_reduce): New, extracted from...
(reduce_grammar_tables): here.
(reduce_grammar): Call nonterminals_reduce.
2001-11-30 10:45:14 +00:00
Paul Eggert 7ad28769d6 (YYSTACK_REALLOC): Remove.
(YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
(YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
New macros.
(union yyalloc): New type.
(__yy_memcpy): Last arg is size_t, not unsigned int, to remove
an arbitrary restriction on hosts where size_t is wider than int.

(yyparse): Don't dump core if alloca or malloc fails; instead, report
a parser stack overflow.  Allocate just one block of memory for all
three stacks, instead of allocating three blocks; this typically is
faster and reduces fragmentation.

Do not limit the number of items in the stack to a value that fits
in 'int', as this is an arbitrary limit on hosts with 64-bit
size_t and 32-bit int.
2001-11-30 02:47:56 +00:00
Paul Eggert 57d4ee2b82 * src/bison.simple (YYSTACK_REALLOC): Remove.
(YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
(YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
New macros.
(union yyalloc): New type.
(__yy_memcpy): Last arg is size_t, not unsigned int, to remove
an arbitrary restriction on hosts where size_t is wider than int.

(yyparse): Don't dump core if alloca or malloc fails; instead, report
a parser stack overflow.  Allocate just one block of memory for all
three stacks, instead of allocating three blocks; this typically is
faster and reduces fragmentation.

Do not limit the number of items in the stack to a value that fits
in 'int', as this is an arbitrary limit on hosts with 64-bit
size_t and 32-bit int.
2001-11-30 02:45:34 +00:00
Akim Demaille d8a9ec00b8 Regen. 2001-11-28 14:59:32 +00:00
Akim Demaille 872e1b86c4 Typo. 2001-11-28 14:58:05 +00:00
Akim Demaille ad4c2c7a57 * src/LR0.c (shifts_new): New.
(save_shifts, insert_start_shift, augment_automaton): Use it.
2001-11-28 14:57:44 +00:00
Akim Demaille 0785dec2c8 * src/closure.c (closure): b' and ruleno' denote the same value:
keep ruleno only.
2001-11-28 14:57:30 +00:00
Akim Demaille e1828f4f07 * src/closure.c (closure): Instead of looping over word in array
then bits in words, loop over bits in array.
2001-11-28 14:57:16 +00:00
Akim Demaille a816bf3eac * src/closure.c (closure): No longer optimize the special case
where all the bits of `ruleset[r]' are set to 0, to make the code
clearer.
2001-11-28 14:57:02 +00:00
Akim Demaille 2ce6476804 * src/closure.c (closure): r' and c' are new variables, used to
de-obfuscate accesses to RULESET and CORE.
2001-11-28 14:55:38 +00:00
Akim Demaille 457b6d1e72 * src/reduce.c (reduce_print): Use ngettext.
(dump_grammar): Improve the trace accuracy.
2001-11-28 13:38:15 +00:00
Akim Demaille 79ebbdb36a * src/reduce.c (dump_grammar): Don't translate trace messages. 2001-11-28 11:58:00 +00:00
Akim Demaille 0aa2ac9063 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
* src/reduce.c (reduce_grammar_tables): Do not free useless tags,
as all tags are free'ed afterwards.
From Enrico Scholz.
2001-11-28 11:42:56 +00:00
Akim Demaille e7d79012ae * src/system.h: Use intl/libgettext.h.
* src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
2001-11-28 10:32:48 +00:00
Paul Eggert eb4a4d73bc * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
use alloca when we didn't want to, and vice versa.
2001-11-27 23:31:47 +00:00
Akim Demaille dee96b5a07 * tests/torture.at (Exploding the Stack Size with Malloc):
s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
2001-11-27 18:57:02 +00:00
Akim Demaille 4bfeeafb00 * src/files.c: Include error.h.
From Hans Aberg.
2001-11-27 18:42:32 +00:00
Marc Autret c18cf8cb26 Revert doc patch. 2001-11-26 19:19:21 +00:00
Akim Demaille 54b982ae70 Bump to 1.30f. 2001-11-26 17:13:05 +00:00
Akim Demaille cf2e198269 Version 1.30e. 2001-11-26 16:47:53 +00:00
Akim Demaille af4483a0ab Typo. 2001-11-26 15:25:10 +00:00
Akim Demaille 674fd9acbc * src/reader.c (readgram): Make sure rules for mid-rule actions
have a lineno equal to that of their host rule.
Reported by Hans Aberg.
* tests/regression.at (Rule Line Numbers): New.
2001-11-26 15:24:06 +00:00
Akim Demaille 6fedd4d1d6 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
size_ts.
Reported by Hans Aberg.
2001-11-26 13:01:10 +00:00
Akim Demaille abe1baa044 * src/complain.c, src/complain.h (error): Remove, provided by
lib/error.[ch].
2001-11-26 11:26:35 +00:00
Akim Demaille 33285af04d * src/reader.c (read_declarations): Don't abort on tok_illegal,
issue an error message.
* tests/regression.at (Invalid %directive): New.
Reported by Hans Aberg.
2001-11-26 09:49:58 +00:00
Akim Demaille cd7f95831e * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
* lib/Makefile.am (libbison_a_SOURCES): Adjust.
2001-11-26 09:19:56 +00:00
Akim Demaille 1b9a8440cd * src/conflicts.c (conflicts_print): Don't complain at all when
there are no reduce/reduce conflicts, and as many shift/reduce
conflicts as expected.
* tests/regression.at (%expect right): Adjust.
2001-11-26 09:18:40 +00:00
Marc Autret aead559e00 * doc/bison.texinfo (Mystery Conflicts): Hint '-v' use.
From Golubev I. N.
2001-11-25 12:57:33 +00:00
Akim Demaille 92b69b7f09 * lib/alloca.c: Update, from fileutils. 2001-11-23 14:55:36 +00:00
Akim Demaille 6e303f08d6 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@. 2001-11-23 14:18:36 +00:00
Akim Demaille 3dfc01e247 Regen. 2001-11-23 14:17:53 +00:00
Akim Demaille 1503820f54 1.30e. 2001-11-23 14:15:42 +00:00
Akim Demaille bc9bb28004 Update. 2001-11-23 14:15:08 +00:00
Akim Demaille 16c4a35041 * src/system.h: Include alloca.h.
* src/main.c (main) [C_ALLOCA]: Call alloca (0).
2001-11-23 14:13:19 +00:00
Akim Demaille f0451dba71 * src/print_graph.c (print_actions): Remove `rule', unused.
* src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
pacify GCC's signed < unsigned warnings.
* src/closure.c (itemsetsize): Likewise.
* src/reader.c (symbol_list_new): Static.
2001-11-23 14:04:08 +00:00
Akim Demaille a9f37dee0c Attaching lineno to buckets is stupid, since only one copy of each
symbol is kept, only the line of the first occurrence is kept too.
* src/symtab.h, src/symtab.c (bucket): Remove the line member.
* src/reader.c (rline_allocated): Remove, unused.
(symbol_list): Have a `line' member.
(symbol_list_new): New.
(readgram): Use it.
* src/print.c (print_grammar): Output the rule line numbers.
* tests/regression.at (Solved SR Conflicts)
(Unresolved SR Conflicts): Adjust.
Reported by Hans Aberg.
2001-11-23 14:03:43 +00:00
Akim Demaille 4b0979fcf3 Englishoes reported by Jim. 2001-11-21 11:45:51 +00:00
Akim Demaille cc35239e1b Remove all po/ generated files from repository. 2001-11-20 13:30:31 +00:00
Akim Demaille 2e2cbb3fad Remove doc/ generated files from the repository. 2001-11-20 13:29:40 +00:00
Akim Demaille adb4edee47 Version 1.30d. 2001-11-20 13:26:58 +00:00
Akim Demaille 65490badba . 2001-11-20 13:21:23 +00:00
Akim Demaille 8b044b8540 Adjust. 2001-11-20 13:14:13 +00:00
Akim Demaille 0704bc9b8e * po/sv.po: New.
* configure.in (ALL_LINGUAS): Adjust.
* po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
longer contains strings to translate.
2001-11-20 13:10:12 +00:00
Akim Demaille 2b7c2ef124 * src/conflicts.c (conflicts_print): Add a missing n. 2001-11-19 11:07:50 +00:00
Akim Demaille 48e38d301e Formatting changes. 2001-11-19 10:28:25 +00:00
Akim Demaille 560757768c * src/nullable.c (nullable_print): New.
(set_nullable): Call it when tracing.
Better locality of variables.
2001-11-19 09:27:37 +00:00
Akim Demaille 238b8134ec * src/print.c (print_actions): Better locality of variables. 2001-11-19 09:27:24 +00:00
Akim Demaille 483642486d * src/derives.c (print_derives): Fix and enrich.
* src/closure.c (print_fderives): Likewise.
2001-11-19 09:27:11 +00:00
Akim Demaille 146ad4c8d0 * src/closure.c (itemsetend): Remove, replaced with...
(itemsetsize): new.
2001-11-19 09:26:57 +00:00
Akim Demaille f2a4c94506 * src/LR0.c (kernel_end): Remove, replaced with...
(kernel_size): new.
2001-11-19 09:26:43 +00:00
Akim Demaille 65fae038b9 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
to clarify.
2001-11-19 09:26:30 +00:00
Akim Demaille e1cb5fb523 * src/closure.c (closure): Use arrays instead of pointers to clarify. 2001-11-19 09:26:17 +00:00
Akim Demaille 64fabbb49f * src/closure.c, src/derives.c, src/nullable.c: Adjust various
trace messages.
* src/LR0.c: Likewise.
(allocate_itemsets): Use arrays instead of pointers to clarify.
2001-11-19 09:25:36 +00:00
Akim Demaille 3b2925a060 * src/getargs.c (statistics_flag): Replace with...
(trace_flag): New.
(longopts): Accept --trace instead of --statistics.
* src/getargs.h: Adjust.
* src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
* src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
2001-11-19 09:21:26 +00:00
Akim Demaille 83bcf86639 * src/LR0.c (new_itemsets, get_state): Use more arrays and less
pointers to clarify the code.
(save_reductions, save_shifts): Factor common parts of alternatives.
2001-11-19 09:17:53 +00:00
Akim Demaille 8639df64a6 * src/LR0.c (new_state, get_state): Complete TRACE code.
* src/closure.c: Include `reader.h' to get `tags', needed by the
trace code.
Rename the conditional DEBUG as TRACE.
Output consistently TRACEs to stderr, not stdout.
* src/derives.c: Likewise.
* src/reduce.c: (inaccessable_symbols): Using if is better style
than goto.
Use `#if TRACE' instead of `#if 0' for tracing code.
2001-11-19 09:16:24 +00:00
Akim Demaille 377bd7c9a2 * src/system.h (LIST_FREE, shortcpy): New.
* src/LR0.c: Use them.
* src/output.c (free_itemsets, free_reductions, free_shifts):
Remove, replaced by LIST_FREE.
2001-11-19 09:14:54 +00:00
Akim Demaille b4a7a230f1 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
(REDUCTIONS_ALLOC):  New.
* src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
allocation.
2001-11-19 09:14:26 +00:00
Akim Demaille c1586e58fe * src/LR0.c (new_state): Complete trace code.
* src/nullable.c (set_nullable): Don't translate traces.
2001-11-19 09:14:07 +00:00
Akim Demaille 50766eee39 * src/print_graph.c (print_core): Better locality of variables.
* src/print.c (print_core): Likewise.
2001-11-19 09:13:53 +00:00
Akim Demaille dc3b81cd67 * src/vcg.c: You do the output, so you are responsible of the
handling of VCG syntax, in particular: use quotearg.
* src/print_graph.c: Don't.
(print_actions): Don't output the actions as part of the nodes,
since that's the job of the edges.
(print_state): Don't output by hand: fill the node description,
and ask for its output.
2001-11-19 09:13:40 +00:00
Akim Demaille c555896775 * src/bison.simple (yyparse): When reporting verbosely an error,
no longer issue additional quotes around token names.
* tests/calc.at: Adjust.
2001-11-19 09:13:26 +00:00
Akim Demaille 35f61cb998 * src/symtab.h, src/symtab.c: line' is a new member of bucket'.
* src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
* src/output.c: Adjust.
2001-11-19 09:13:12 +00:00
Akim Demaille 9291f914de * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
(rule_t): this.
* src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
2001-11-19 09:12:49 +00:00
Akim Demaille ff1581dddb * src/gram.h (rule_t): New.
(rule_table): New.
(rrhs, rlhs): Remove, part of state_t.
* src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
* src/lalr.c, src/nullable.c, src/output.c, src/print.c,
* src/reader.c, src/reduce.c: Adjust.
2001-11-19 09:12:25 +00:00
Akim Demaille 4b9170b2c0 * src/reader.c (symbols_output): New, extracted from...
(packsymbols): Here.
(reader): Call it.
2001-11-19 09:12:02 +00:00
Akim Demaille 523a9eafdc * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
(maxrhs): this new function.
2001-11-19 09:11:47 +00:00
Akim Demaille bcdf932ed9 * src/lalr.c (F): New macro to access to the variable F.
Adjust.
2001-11-19 09:11:34 +00:00
Akim Demaille e2aabb3dc6 * src/lalr.h (LA): New macro to access to the variable LA.
* src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
* src/lalr.c: Adjust.
2001-11-19 09:11:21 +00:00
Akim Demaille e8ebe4b0c7 * src/lalr.c (initialize_LA): Only initialize LA. Let...
(set_state_table): handle the `lookaheads' members.
2001-11-19 09:11:03 +00:00
Akim Demaille 9043475828 * src/lalr.h (lookaheads): Removed array, which contents is now
member of...
(state_t): this structure.
* src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
Adjust.
2001-11-19 09:10:47 +00:00
Akim Demaille d80a86e0b5 * src/lalr.h (consistent): Removed array, which contents is now
member of...
(state_t): this structure.
* src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
Adjust.
2001-11-19 09:10:30 +00:00
Akim Demaille cfc3acf242 * src/lalr.h (reduction_table, shift_table): Removed arrays, which
contents is now members of...
(state_t): this structure.
* src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
Adjust.
2001-11-19 09:10:12 +00:00
Akim Demaille 93337ac41c * src/lalr.h (state_t): New.
(state_table): Be a state_t * instead of a core **.
(accessing_symbol): Remove, part of state_t.
* src/lalr.c: Adjust.
(set_accessing_symbol): Merge into...
(set_state_table): this.
* src/print_graph.c, src/conflicts.c: Adjust.
2001-11-19 09:08:44 +00:00
Akim Demaille 0d7803637b Bump to 1.30d. 2001-11-14 17:52:37 +00:00
Akim Demaille a62c863ec3 . 2001-11-14 15:35:09 +00:00
Akim Demaille 1e883de90c Version 1.30c. 2001-11-14 15:25:51 +00:00
Akim Demaille efcff8cd5c * tests/calc.at, tests/output.at, tests/regression.at,
* tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
now the tests are run in private dirs, therefore AC_CLEANUP and
family can be simplified to 0-ary.
* tests/atlocal.in: Now that we run `elsewhere' than in tests/,
use abs. path to find config.h.
2001-11-14 15:16:40 +00:00
Akim Demaille 3e85a00236 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
defined only if yyoverflow is defined, to avoid `warning: unused
variable `yyvs1''.
Reported by The Test Suite.
2001-11-14 14:57:06 +00:00
Akim Demaille f85c981ac1 * src/print.c: Include reduce.h.
Reported by Hans Aberg.
2001-11-14 14:43:29 +00:00
Akim Demaille 5cb10dae3c * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
Revert a previous patch:  these are really const.
* src/conflicts.c (conflict_report): Additional useless pair of
braces to pacify GCC's warnings for `if () if () {} else {}'.
* src/lex.c (parse_percent_token): Replace equal_offset with
arg_offset.
arg is const.
Be sure to strdup `arg' when used, since there is no reason for
token_buffer not to change.
2001-11-14 14:42:14 +00:00
Akim Demaille 26e1ca45ba * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
definition.
* src/main.c (main): Use them.
Suggested by Hans Aberg.
2001-11-14 14:14:48 +00:00
Akim Demaille 8888e43b2c Bump to 1.30c. 2001-11-12 10:31:00 +00:00
Akim Demaille d9ca2df2aa . 2001-11-12 10:21:45 +00:00
Akim Demaille e8def3ff6e Version 1.30b. 2001-11-12 10:16:50 +00:00
Akim Demaille 76e734e5ed Adjust ngettext default. 2001-11-12 10:11:49 +00:00
Akim Demaille b8b4a730a0 Typo. 2001-11-12 09:58:30 +00:00
Akim Demaille b9d2d2a881 Version 1.30b.
* config/config.guess, config/config.sub, po/*.po: Update.
* src/system.h (ngettext): Now that we use ngettext, be sure to
provide a default definition when NLS are not used.
2001-11-12 09:56:20 +00:00
Akim Demaille 78986eff74 Version 1.30b.
* config/config.guess, config/config.sub, po/*.po: Update.
2001-11-12 09:42:14 +00:00
Akim Demaille 1393a78454 Typos. 2001-11-12 09:36:17 +00:00
Akim Demaille de11686376 * doc/bison.texinfo: Use $' as shell prompt, not %'.
Use @kbd to denote user input.
(Language and Grammar): ANSIfy the example.
Adjust its layout for info/notinfo.
(Location Tracking Calc): Output error messages to stderr.
Output locations in a more GNUtically correct way.
Fix a couple of Englishos.
Adjust @group/@end group pairs.
2001-11-12 09:20:35 +00:00
Akim Demaille badfc69c26 %expext was not functioning at all.
* src/conflicts.c (expected_conflicts): Set to -1.
(conflict_report): Use ngettext.
(conflicts_print): Check %expect and make its violation an error.
* doc/bison.texinfo (Expect Decl): Adjust.
* configure.in (AM_GNU_GETTEXT): Ask for ngettext.
* tests/regression.at (%expect not enough, %expect right)
(%expect too much): New.
2001-11-12 09:19:48 +00:00
Akim Demaille fb28699f95 * tests/regression.at (Conflicts): Rename as...
(Unresolved SR Conflicts): this.
(Solved SR Conflicts): New.
2001-11-12 09:16:10 +00:00
Akim Demaille 6b307af66c * src/reduce.c (print_results): Rename as...
(reduce_output): This.
Output to OUT, passed as argument, instead of output_obstack.
(dump_grammar): Likewise.
(reduce_free): New.
Also free V1.
(reduce_grammar): No longer call reduce_output, since...
* src/print.c (print_results): do it.
* src/main.c (main): Call reduce_free;
2001-11-12 09:15:57 +00:00
Akim Demaille dad56b10d3 * src/conflicts.c (print_reductions): Accept OUT as argument.
Output to it, not to output_obstack.
* src/print.c (print_actions): Adjust.
2001-11-12 09:15:43 +00:00
Akim Demaille 5f1ff7cd74 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
the result instead of using...
(src_total, rrc_total, src_count, rrc_count): Remove.
(any_conflicts): Remove.
(print_conflicts): Split into...
(conflicts_print, conflicts_output): New.
* src/conflicts.h: Adjust.
* src/main.c (main): Invoke both conflicts_output and conflicts_print.
* src/print.c (print_grammar): Issue `n' between to rule outputs.
* tests/regression.at (Conflicts): New.
Reported by Tom Lane.
2001-11-12 09:15:25 +00:00
Akim Demaille b6cac93afa * tests/regression.at (Invalid input): Remove, duplicate with
``Invalid input: 1''.
2001-11-12 09:15:03 +00:00
Akim Demaille 86d5a1ed5c * tests/torture.at (AT_DATA_STACK_TORTURE)
(Exploding the Stack Size with Alloca)
(Exploding the Stack Size with Malloc): New.
2001-11-12 09:14:50 +00:00
Akim Demaille 97e9ee3ad5 * src/bison.simple (YYSTACK_REALLOC): New.
(yyparse) [!yyoverflow]: Use it and free the old stack.
Reported by FIXME: Who.
2001-11-12 09:14:35 +00:00
Akim Demaille d81e5db73f Bump to 1.30b. 2001-11-05 15:15:47 +00:00
Akim Demaille 029806c785 . 2001-11-05 10:15:57 +00:00
Akim Demaille a2874a4e5d Regen. 2001-11-05 10:12:42 +00:00
Akim Demaille d54387b4bc Version 1.30a.
* src/lex.c (parse_percent_token): s/quotearg/quote/.
2001-11-05 10:06:27 +00:00
Akim Demaille a4c22fa4bf Version 1.30a. 2001-11-05 09:55:38 +00:00
Akim Demaille 0d214b93b0 Regen. 2001-11-05 09:29:10 +00:00
Akim Demaille 3c5d71ca8b * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
pattern.
2001-11-05 09:18:31 +00:00
Akim Demaille d61c57b70c * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
with yyltype/YYLTYPE.  This allows inclusion of the generated
header within the parser if the compiler, such as GGC, accepts
multiple equivalent #defines.
2001-11-05 09:12:38 +00:00
Akim Demaille ea57e0a3c4 * src/getargs.c (longopts): Support `--output'. getopt is now
able to understand that `--out' is OK: the two racing long options
are aliases.
(usage): Adjust.
* src/lex.h (tok_setopt): Remove, replaced with...
(tok_intopt, tok_stropt): these new guys.
* src/lex.c (getopt.h): Not needed.
(token_buffer, unlexed_token_buffer): Not const.
(percent_table): Promote `-' over `_' in directive names.
Active `%name-prefix', `file-prefix', and `output'.
(parse_percent_token): Accept possible arguments to directives.
Promote `-' over `_' in directive names.
* doc/bison.texinfo (Decl Summary): Split the list into
`directives for grammars' and `directives for bison'.
Sort'em.
Add description of `%name-prefix', `file-prefix', and `output'.
Promote `-' over `_' in directive names.
(Bison Options): s/%locactions/%locations/.  Nice Freudian slip.
Simplify the description of `--name-prefix'.
Promote `-' over `_' in directive names.
Promote `--output' over `--output-file'.
Fix the description of `--defines'.
* tests/output.at: Exercise %file-prefix and %output.
2001-11-04 16:26:59 +00:00
Akim Demaille 57c429f305 * doc/refcard.tex: Update. 2001-11-02 17:18:52 +00:00
Akim Demaille 239e5c1a9a * src/symtab.h (SUNDEF): New.
* src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
stand for `uninitialized', instead of 0.
* src/reader.c (packsymbols, parse_thong_decl): Adjust.
* src/lex.c (lex): Adjust.
* tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
Number it 0.
Let yylex return it instead of a plain 0.
Reported by Dick Streefland.
2001-11-02 15:26:33 +00:00
Akim Demaille ae9b5e5a4f * tests/regression.at (Mixing %token styles): New test. 2001-11-02 14:12:42 +00:00
Akim Demaille 7ae1c5929e * src/reader.c (parse_thong_decl): Formatting changes.
(token_translations_init): New, extracted from...
(packsymbols): Here.
Adjust.
2001-11-02 14:02:31 +00:00
Akim Demaille 1d708336d4 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
Check that `9foo.y' produces correct cpp guards.
* src/files.c (compute_header_macro): Prepend `BISON_' to CPP
guards.
Reported by Wwp.
2001-11-01 18:29:36 +00:00
Akim Demaille 705131d1de * tests/regression.at (Invalid input: 2): New.
* src/lex.c (unlexed_token_buffer): New.
(lex, unlex): Adjust: when unlexing, be sure to save token_buffer
too.
Reported by Wwp.
2001-11-01 18:03:46 +00:00
Akim Demaille 5c2a5a8970 Update. 2001-11-01 14:35:28 +00:00
Akim Demaille 6b784f8552 * configure.in: Bump to 1.30a.
Adjust to newer Autotest.
2001-11-01 14:27:42 +00:00
Akim Demaille 32a1edfccd . 2001-10-29 09:01:49 +00:00
116 changed files with 13871 additions and 13352 deletions
+1362
View File
File diff suppressed because it is too large Load Diff
+15
View File
@@ -1,3 +1,18 @@
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
## 02111-1307 USA
## Process this file with automake to produce Makefile.in -*-Makefile-*-
AUTOMAKE_OPTIONS = 1.5 check-news readme-alpha dist-bzip2
+50 -30
View File
@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.5a from Makefile.am.
# Makefile.in generated by automake 1.5c from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,7 +13,6 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -48,6 +47,7 @@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
@@ -84,19 +84,21 @@ INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIB = @LIB@
LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
WERROR_CFLAGS = @WERROR_CFLAGS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
@@ -149,7 +151,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $@
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
@@ -234,16 +236,19 @@ tags-recursive:
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ETAGS = etags
ETAGSFLAGS =
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique $(LISP)
mkid -fID $$unique
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@@ -254,14 +259,15 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
list='$(SOURCES) $(HEADERS) config.hin $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)config.hin$$unique$(LISP)$$tags" \
|| etags $(ETAGS_ARGS) $$tags config.hin $$unique $(LISP)
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
@@ -270,14 +276,18 @@ GTAGS:
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = .
# Avoid unsightly `./'.
distdir = $(PACKAGE)-$(VERSION)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
GZIP_ENV = --best
distcleancheck_listfiles = find . -type f -print
distdir: $(DISTFILES)
@if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" >/dev/null; \
@@ -285,17 +295,20 @@ distdir: $(DISTFILES)
echo "NEWS not updated; not releasing" 1>&2; \
exit 1; \
fi
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
$(am__remove_distdir)
mkdir $(distdir)
$(mkinstalldirs) $(distdir)/intl $(distdir)/po $(distdir)/tests
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
cp -pR $$d/$$file $(distdir)$$dir \
|| exit 1; \
else \
test -f $(distdir)/$$file \
@@ -303,7 +316,7 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
for subdir in $(SUBDIRS); do \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
@@ -323,22 +336,22 @@ distdir: $(DISTFILES)
|| chmod -R a+r $(distdir)
dist-gzip: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
$(am__remove_distdir)
dist-bzip2: distdir
$(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
$(am__remove_distdir)
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/=build
@@ -348,6 +361,7 @@ distcheck: dist
&& cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
--with-included-gettext \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
@@ -359,15 +373,20 @@ distcheck: dist
find $$dc_install_base -type f -print ; \
exit 1; } >&2 ) \
&& $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
&& $(MAKE) $(AM_MAKEFLAGS) distclean \
&& rm -f $(distdir).tar.gz \
&& (test `find . -type f -print | wc -l` -eq 0 \
|| { echo "ERROR: files left after distclean:" ; \
find . -type f -print ; \
exit 1; } >&2 )
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
@echo "$(distdir).tar.gz is ready for distribution" | \
sed 'h;s/./=/g;p;x;p;x'
distcleancheck: distclean
if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile config.h
@@ -385,6 +404,7 @@ install-am: all-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -439,9 +459,9 @@ uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
clean-generic clean-recursive dist dist-all dist-bzip2 \
dist-gzip distcheck distclean distclean-generic distclean-hdr \
distclean-recursive distclean-tags distdir dvi dvi-am \
dvi-recursive info info-am info-recursive install install-am \
install-data install-data-am install-data-recursive \
distclean-recursive distclean-tags distcleancheck distdir dvi \
dvi-am dvi-recursive info info-am info-recursive install \
install-am install-data install-data-am install-data-recursive \
install-exec install-exec-am install-exec-recursive \
install-info install-info-am install-info-recursive install-man \
install-recursive install-strip installcheck installcheck-am \
+135 -8
View File
@@ -1,7 +1,129 @@
Bison News
----------
Changes in version 1.30:
Changes in version 1.34, 2002-03-12:
* File name clashes are detected
$ bison foo.y -d -o foo.x
fatal error: header and parser would be both named `foo.x'
* A missing `;' ending a rule triggers a warning
In accordance with POSIX, and in agreement with other
Yacc implementations, Bison will mandate this semicolon in a near
future. This eases the implementation of a Bison parser of Bison
grammars by making this grammar LALR(1) instead of LR(2). To
facilitate the transition, this release introduces a warning.
* Revert the C++ namespace changes introduced in 1.31, as they caused too
many portability hassles.
* DJGPP support added.
* Fix test suite portability problems.
Changes in version 1.33, 2002-02-07:
* Fix C++ issues
Groff could not be compiled for the definition of size_t was lacking
under some conditions.
* Catch invalid @n
As is done with $n.
Changes in version 1.32, 2002-01-23:
* Fix Yacc output file names
* Portability fixes
* Italian, Dutch translations
Changes in version 1.31, 2002-01-14:
* Many Bug Fixes
* GNU Gettext and %expect
GNU Gettext asserts 10 s/r conflicts, but there are 7. Now that
Bison dies on incorrect %expectations, we fear there will be
too many bug reports for Gettext, so _for the time being_, %expect
does not trigger an error when the input file is named `plural.y'.
* Use of alloca in parsers
If YYSTACK_USE_ALLOCA is defined to 0, then the parsers will use
malloc exclusively. Since 1.29, but was not NEWS'ed.
alloca is used only when compiled with GCC, to avoid portability
problems as on AIX.
* When the generated parser lacks debugging code, YYDEBUG is now 0
(as POSIX requires) instead of being undefined.
* User Actions
Bison has always permitted actions such as { $$ = $1 }: it adds the
ending semicolon. Now if in Yacc compatibility mode, the semicolon
is no longer output: one has to write { $$ = $1; }.
* Better C++ compliance
The output parsers try to respect C++ namespaces.
[This turned out to be a failed experiment, and it was reverted later.]
* Reduced Grammars
Fixed bugs when reporting useless nonterminals.
* 64 bit hosts
The parsers work properly on 64 bit hosts.
* Error messages
Some calls to strerror resulted in scrambled or missing error messages.
* %expect
When the number of shift/reduce conflicts is correct, don't issue
any warning.
* The verbose report includes the rule line numbers.
* Rule line numbers are fixed in traces.
* Swedish translation
* Parse errors
Verbose parse error messages from the parsers are better looking.
Before: parse error: unexpected `'/'', expecting `"number"' or `'-'' or `'(''
Now: parse error: unexpected '/', expecting "number" or '-' or '('
* Fixed parser memory leaks.
When the generated parser was using malloc to extend its stacks, the
previous allocations were not freed.
* Fixed verbose output file.
Some newlines were missing.
Some conflicts in state descriptions were missing.
* Fixed conflict report.
Option -v was needed to get the result.
* %expect
Was not used.
Mismatches are errors, not warnings.
* Fixed incorrect processing of some invalid input.
* Fixed CPP guards: 9foo.h uses BISON_9FOO_H instead of 9FOO_H.
* Fixed some typos in the documentation.
* %token MY_EOF 0 is supported.
Before, MY_EOF was silently renumbered as 257.
* doc/refcard.tex is updated.
* %output, %file-prefix, %name-prefix.
New.
* --output
New, aliasing `--output-file'.
Changes in version 1.30, 2001-10-26:
* `--defines' and `--graph' have now an optionnal argument which is the
output file name. `-d' and `-g' do not change, they do not take any
@@ -10,11 +132,9 @@ Changes in version 1.30:
* `%source_extension' and `%header_extension' are removed, failed
experiment.
* The test suite is more portable.
* Better portability.
Changes in version 1.29:
* Portability fixes.
Changes in version 1.29, 2001-09-07:
* The output file does not define const, as this caused problems when used
with common autoconfiguration schemes. If you still use ancient compilers
@@ -45,8 +165,11 @@ Changes in version 1.29:
* New directives.
`%yacc', `%fixed_output_files', `%defines', `%no_parser', `%verbose',
`%debug', `%source_extension' and `%header_extension'.
* @$
Automatic location tracking.
Changes in version 1.28:
Changes in version 1.28, 1999-07-06:
* Should compile better now with K&R compilers.
@@ -78,7 +201,7 @@ Changes in version 1.26:
* Generated parsers should now work even on operating systems which do
not provide alloca().
Changes in version 1.25:
Changes in version 1.25, 1995-10-16:
* Errors in the input grammar are not fatal; Bison keeps reading
the grammar file, and reports all the errors found in it.
@@ -119,3 +242,7 @@ Changes in version 1.22:
Changes in version 1.20:
Output file does not redefine const for C++.
Local Variables:
mode: outline
End:
+20 -1
View File
@@ -2,27 +2,46 @@ Bison was originally written by Robert Corbett. It would not be what
it is today without the invaluable help of these people:
Airy Andre [email protected]
Akim Demaille akim@epita.fr
Akim Demaille akim@freefriends.org
Albert Chin-A-Young [email protected]
Alexander Belopolsky [email protected]
Andreas Schwab [email protected]
Arnold Robbins [email protected]
Bruce Lilly [email protected]
Cris van Pelt [email protected]
Daniel Hagerty [email protected]
David J. MacKenzie [email protected]
Dick Streefland [email protected]
Enrico Scholz [email protected]
Evgeny Stambulchik [email protected]
Fabrice Bauzac [email protected]
Florian Krohm [email protected]
H. Merijn Brand [email protected]
Hans Aberg [email protected]
Jesse Thilo [email protected]
Jim Meyering [email protected]
Juan Manuel Guerrero [email protected]
Kees Zeelenberg [email protected]
Keith Browne [email protected]
Laurent Mascherpa [email protected]
Marc Autret [email protected]
Mike Castle [email protected]
Neil Booth [email protected]
Nelson H. F. Beebe [email protected]
Noah Friedman [email protected]
Pascal Bart [email protected]
Paul Eggert [email protected]
Per Allansson [email protected]
Peter Hámorský [email protected]
Piotr Gackiewicz [email protected]
Richard Stallman [email protected]
Robert Anisko [email protected]
Shura [email protected]
Tom Lane [email protected]
Tom Tromey [email protected]
Wayne Green [email protected]
Wolfram Wagner [email protected]
Wwp [email protected]
Many people are not named here because we lost track of them. We
thank them! Please, help us keeping this list up to date.
Vendored
+141 -35
View File
@@ -1,6 +1,6 @@
# aclocal.m4 generated automatically by aclocal 1.5a -*- Autoconf -*-
# aclocal.m4 generated automatically by aclocal 1.5c -*- Autoconf -*-
# Copyright 1996, 1997, 1998, 1999, 2000, 2001
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,8 @@
# This macro actually does too much some checks are only needed if
# your package does certain things. But this isn't really a big deal.
# Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -33,7 +34,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 6
# serial 8
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
@@ -48,30 +49,46 @@ AC_PREREQ([2.52])
# the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
# AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
# ----------------------------------------------
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
# The call with PACKAGE and VERSION arguments is the old style
# call (pre autoconf-2.50), which is being phased out. PACKAGE
# and VERSION should now be passed to AC_INIT and removed from
# the call to AM_INIT_AUTOMAKE.
# We support both call styles for the transition. After
# the next Automake release, Autoconf can make the AC_INIT
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_REQUIRE([AC_PROG_INSTALL])dnl
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
# test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
# Define the identity of the package.
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])dnl
ifelse([$3],,
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
_AM_IF_OPTION([no-define],,
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
AM_MISSING_PROG(ACLOCAL, aclocal)
AM_MISSING_PROG(ACLOCAL, "aclocal-${am__api_version}")
AM_MISSING_PROG(AUTOCONF, autoconf)
AM_MISSING_PROG(AUTOMAKE, automake)
AM_MISSING_PROG(AUTOMAKE, "automake-${am__api_version}")
AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo)
AM_MISSING_PROG(AMTAR, tar)
@@ -81,9 +98,9 @@ AM_PROG_INSTALL_STRIP
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
AC_REQUIRE([AM_SET_DEPDIR])dnl
AC_PROVIDE_IFELSE([AC_PROG_][CC],
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_][CC],
[_AM_DEPENDENCIES(CC)],
[define([AC_PROG_][CC],
defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
@@ -92,6 +109,80 @@ AC_PROVIDE_IFELSE([AC_PROG_][CXX],
[define([AC_PROG_][CXX],
defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
])
])
# Copyright 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.5c"])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.5c])])
# Helper functions for option handling. -*- Autoconf -*-
# Copyright 2001, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 2
# _AM_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME)
# ------------------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
# _AM_SET_OPTIONS(OPTIONS)
# ----------------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
# -------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
#
# Check to make sure that the build environment is sane.
@@ -177,7 +268,7 @@ AC_MSG_RESULT(yes)])
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 2
# serial 3
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
@@ -199,8 +290,7 @@ if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
am_backtick='`'
AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
AC_MSG_WARN([`missing' script is too old or missing])
fi
])
@@ -323,6 +413,14 @@ AC_SUBST(install_sh)])
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
# Installed binaries are usually stripped using `strip' when the user
# run `make install-strip'. However `strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
# will honor the `STRIP' environment variable to overrule this program.
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
@@ -357,7 +455,7 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
# _AM_DEPENDENCIES(NAME)
# ----------------------
# See how the compiler implements dependency checking.
# NAME is "CC", "CXX" or "OBJC".
# NAME is "CC", "CXX", "GCJ", or "OBJC".
# We try a few techniques and use that to set a single cache variable.
#
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
@@ -495,11 +593,13 @@ AC_SUBST([AMDEPBACKSLASH])
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[for mf in $CONFIG_FILES; do
case $mf in
Makefile) dirpart=.;;
*/Makefile) dirpart=`AS_DIRNAME("$mf")`;;
*) continue;;
esac
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
if (head -1 $mf | fgrep 'generated by automake') > /dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
dirpart=
fi
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
# Extract the definition of DEP_FILES from the Makefile without
# running `make'.
@@ -546,11 +646,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
# Copyright 2001 Free Software Foundation, Inc.
# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -567,6 +663,11 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 2
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
@@ -575,7 +676,7 @@ doit:
END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
am__include='#'
am__include="#"
am__quote=
_am_result=none
# First try GNU make style include.
@@ -595,7 +696,7 @@ if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
am__include=.include
am__quote='"'
am__quote="\""
_am_result=BSD
fi
fi
@@ -642,7 +743,12 @@ if $2; then
else
$1_TRUE='#'
$1_FALSE=
fi])
fi
AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
AC_MSG_ERROR([conditional \"$1\" was never defined.
Usually this means the macro was only invoked conditionally.])
fi])])
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
+95 -71
View File
@@ -5,39 +5,48 @@
*/
#undef CRAY_STACKSEG_END
/* Define if using `alloca.c'. */
/* Define to 1 if using `alloca.c'. */
#undef C_ALLOCA
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#undef ENABLE_NLS
/* Define if you have `alloca', as a function or macro. */
/* Define to 1 if you have `alloca', as a function or macro. */
#undef HAVE_ALLOCA
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
#undef HAVE_ALLOCA_H
/* Define if you have the <argz.h> header file. */
/* Define to 1 if you have the <argz.h> header file. */
#undef HAVE_ARGZ_H
/* Define if you have the <ctype.h> header file. */
/* Define to 1 if you have the <ctype.h> header file. */
#undef HAVE_CTYPE_H
/* Define if backslash-a works in C strings. */
#undef HAVE_C_BACKSLASH_A
/* Define if you have the `dcgettext' function. */
/* Define to 1 if you have the `dcgettext' function. */
#undef HAVE_DCGETTEXT
/* Define to 1 if you have the declaration of `memchr', and to 0 if you don't.
*/
#undef HAVE_DECL_MEMCHR
/* Define to 1 if you have the declaration of `memrchr', and to 0 if you
don't. */
#undef HAVE_DECL_MEMRCHR
/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't.
*/
#undef HAVE_DECL_STPCPY
/* Define to 1 if you have the declaration of `strchr', and to 0 if you don't.
*/
#undef HAVE_DECL_STRCHR
/* Define to 1 if you have the declaration of `strerror', and to 0 if you
don't. */
#undef HAVE_DECL_STRERROR
@@ -46,60 +55,60 @@
don't. */
#undef HAVE_DECL_STRERROR_R
/* Define to 1 if you have the declaration of `strndup', and to 0 if you
don't. */
#undef HAVE_DECL_STRNDUP
/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
don't. */
#undef HAVE_DECL_STRNLEN
/* Define to 1 if you have the declaration of `strspn', and to 0 if you don't.
*/
#undef HAVE_DECL_STRSPN
/* Define if the malloc check has been performed. */
#undef HAVE_DONE_WORKING_MALLOC_CHECK
/* Define if the realloc check has been performed. */
#undef HAVE_DONE_WORKING_REALLOC_CHECK
/* Define if you have the `doprnt' function. */
/* Define to 1 if you have the `doprnt' function. */
#undef HAVE_DOPRNT
/* Define if you have the `feof_unlocked' function. */
/* Define to 1 if you have the `feof_unlocked' function. */
#undef HAVE_FEOF_UNLOCKED
/* Define if you have the `fgets_unlocked' function. */
/* Define to 1 if you have the `fgets_unlocked' function. */
#undef HAVE_FGETS_UNLOCKED
/* Define if you have the `getcwd' function. */
/* Define to 1 if you have the `getcwd' function. */
#undef HAVE_GETCWD
/* Define if you have the `getegid' function. */
/* Define to 1 if you have the `getegid' function. */
#undef HAVE_GETEGID
/* Define if you have the `geteuid' function. */
/* Define to 1 if you have the `geteuid' function. */
#undef HAVE_GETEUID
/* Define if you have the `getgid' function. */
/* Define to 1 if you have the `getgid' function. */
#undef HAVE_GETGID
/* Define if you have the `getpagesize' function. */
/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
/* Define if you have the `getuid' function. */
/* Define to 1 if you have the `getuid' function. */
#undef HAVE_GETUID
/* Define if you have the iconv() function. */
#undef HAVE_ICONV
/* Define if you have the <inttypes.h> header file. */
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define if you have the `isascii' function. */
/* Define to 1 if you have the `isascii' function. */
#undef HAVE_ISASCII
/* Define if you have the `iswprint' function. */
/* Define to 1 if you have the `iswprint' function. */
#undef HAVE_ISWPRINT
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
@@ -108,127 +117,127 @@
/* Define if your <locale.h> file defines LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
/* Define if you have the <limits.h> header file. */
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define if you have the <locale.h> header file. */
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define if you have the <malloc.h> header file. */
/* Define to 1 if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
#undef HAVE_MBRTOWC
/* Define if you have the `mbsinit' function. */
/* Define to 1 if you have the `mbsinit' function. */
#undef HAVE_MBSINIT
/* Define if you have the `memchr' function. */
/* Define to 1 if you have the `memchr' function. */
#undef HAVE_MEMCHR
/* Define if you have the <memory.h> header file. */
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define if you have the `mempcpy' function. */
/* Define to 1 if you have the `mempcpy' function. */
#undef HAVE_MEMPCPY
/* Define if you have the `mkstemp' function. */
/* Define to 1 if you have the `memrchr' function. */
#undef HAVE_MEMRCHR
/* Define to 1 if you have the `mkstemp' function. */
#undef HAVE_MKSTEMP
/* Define if you have a working `mmap' system call. */
/* Define to 1 if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define if you have the `munmap' function. */
/* Define to 1 if you have the `munmap' function. */
#undef HAVE_MUNMAP
/* Define if you have the <nl_types.h> header file. */
/* Define to 1 if you have the <nl_types.h> header file. */
#undef HAVE_NL_TYPES_H
/* Define if you have the `putenv' function. */
/* Define to 1 if libc includes obstacks. */
#undef HAVE_OBSTACK
/* Define to 1 if you have the `putenv' function. */
#undef HAVE_PUTENV
/* Define if you have the `setenv' function. */
/* Define to 1 if you have the `setenv' function. */
#undef HAVE_SETENV
/* Define if you have the `setlocale' function. */
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
/* Define if you have the <stddef.h> header file. */
/* Define to 1 if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
/* Define if you have the <stdint.h> header file. */
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define if you have the <stdlib.h> header file. */
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define if you have the `stpcpy' function. */
/* Define to 1 if you have the `stpcpy' function. */
#undef HAVE_STPCPY
/* Define if you have the `strcasecmp' function. */
/* Define to 1 if you have the `strcasecmp' function. */
#undef HAVE_STRCASECMP
/* Define if you have the `strchr' function. */
/* Define to 1 if you have the `strchr' function. */
#undef HAVE_STRCHR
/* Define if you have the `strdup' function. */
/* Define to 1 if you have the `strdup' function. */
#undef HAVE_STRDUP
/* Define if you have the `strerror' function. */
/* Define to 1 if you have the `strerror' function. */
#undef HAVE_STRERROR
/* Define if you have the `strerror_r' function. */
/* Define to 1 if you have the `strerror_r' function. */
#undef HAVE_STRERROR_R
/* Define if you have the <strings.h> header file. */
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define if you have the <string.h> header file. */
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define if you have the `strndup' function. */
#undef HAVE_STRNDUP
/* Define if you have the `strnlen' function. */
#undef HAVE_STRNLEN
/* Define if you have the `strspn' function. */
/* Define to 1 if you have the `strspn' function. */
#undef HAVE_STRSPN
/* Define if you have the `strtoul' function. */
/* Define to 1 if you have the `strtoul' function. */
#undef HAVE_STRTOUL
/* Define if you have the <sys/param.h> header file. */
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define if you have the <sys/stat.h> header file. */
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define if you have the <sys/types.h> header file. */
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define if you have the `tsearch' function. */
/* Define to 1 if you have the `tsearch' function. */
#undef HAVE_TSEARCH
/* Define if you have the <unistd.h> header file. */
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if you have the `vprintf' function. */
/* Define to 1 if you have the `vprintf' function. */
#undef HAVE_VPRINTF
/* Define if you have the <wchar.h> header file. */
/* Define to 1 if you have the <wchar.h> header file. */
#undef HAVE_WCHAR_H
/* Define if you have the <wctype.h> header file. */
/* Define to 1 if you have the <wctype.h> header file. */
#undef HAVE_WCTYPE_H
/* Define if you have the `__argz_count' function. */
/* Define to 1 if you have the `__argz_count' function. */
#undef HAVE___ARGZ_COUNT
/* Define if you have the `__argz_next' function. */
/* Define to 1 if you have the `__argz_next' function. */
#undef HAVE___ARGZ_NEXT
/* Define if you have the `__argz_stringify' function. */
/* Define to 1 if you have the `__argz_stringify' function. */
#undef HAVE___ARGZ_STRINGIFY
/* Define as const if the declaration of iconv() needs const. */
@@ -237,6 +246,21 @@
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define if compiler has function prototypes */
#undef PROTOTYPES
@@ -248,7 +272,7 @@
STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION
/* Define if you have the ANSI C header files. */
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to 1 if strerror_r returns char *. */
@@ -263,14 +287,14 @@
/* Define to 1 for GNU C library extensions. */
#undef _GNU_SOURCE
/* Define if on MINIX. */
/* Define to 1 if on MINIX. */
#undef _MINIX
/* Define if the system does not provide POSIX.1 features except with this
defined. */
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#undef _POSIX_1_SOURCE
/* Define if you need to in order for `stat' and other things to work. */
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE
/* Define to empty if `const' does not conform to ANSI C. */
+14 -10
View File
@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.5a from Makefile.am.
# Makefile.in generated by automake 1.5c from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,7 +13,6 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -48,6 +47,7 @@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
@@ -84,23 +84,24 @@ INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIB = @LIB@
LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
WERROR_CFLAGS = @WERROR_CFLAGS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
EXTRA_DIST = move-if-change prev-version.txt
subdir = config
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
@@ -116,12 +117,11 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu config/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
uninstall-info-am:
tags: TAGS
TAGS:
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
@@ -129,13 +129,16 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
cp -pR $$d/$$file $(distdir)$$dir \
|| exit 1; \
else \
test -f $(distdir)/$$file \
@@ -160,6 +163,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
+72 -59
View File
@@ -1,9 +1,9 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002 Free Software Foundation, Inc.
timestamp='2001-10-05'
timestamp='2002-03-04'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ timestamp='2001-10-05'
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Per Bothner <bothner@cygnus.com>.
# Originally written by Per Bothner <per@bothner.com>.
# Please send patches to <[email protected]>. Submit a context
# diff and a properly formatted ChangeLog entry.
#
@@ -135,23 +135,22 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# object file format. This provides both forward
# compatibility and a consistent mechanism for selecting the
# object file format.
# Determine the machine/vendor (is the vendor relevant).
case "${UNAME_MACHINE}" in
amiga) machine=m68k-unknown ;;
arm32) machine=arm-unknown ;;
atari*) machine=m68k-atari ;;
sun3*) machine=m68k-sun ;;
mac68k) machine=m68k-apple ;;
macppc) machine=powerpc-apple ;;
hp3[0-9][05]) machine=m68k-hp ;;
ibmrt|romp-ibm) machine=romp-ibm ;;
sparc*) machine=`uname -p`-unknown ;;
*) machine=${UNAME_MACHINE}-unknown ;;
#
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
case "${UNAME_MACHINE_ARCH}" in
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently, or will in the future.
case "${UNAME_MACHINE}" in
i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
case "${UNAME_MACHINE_ARCH}" in
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep __ELF__ >/dev/null
@@ -291,6 +290,9 @@ EOF
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos
exit 0 ;;
*:[Mm]orph[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-morphos
exit 0 ;;
*:OS/390:*:*)
echo i370-ibm-openedition
exit 0 ;;
@@ -339,7 +341,7 @@ EOF
echo m68k-sun-sunos${UNAME_RELEASE}
exit 0 ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
@@ -508,7 +510,7 @@ EOF
fi
exit 0 ;;
*:AIX:*:[45])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
@@ -682,9 +684,6 @@ EOF
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
exit 0 ;;
CRAY*X-MP:*:*:*)
echo xmp-cray-unicos
exit 0 ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
@@ -706,9 +705,6 @@ EOF
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY-2:*:*:*)
echo cray2-cray-unicos
exit 0 ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
@@ -736,6 +732,9 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit 0 ;;
x86:Interix*:3*)
echo i386-pc-interix3
exit 0 ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -767,10 +766,24 @@ EOF
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
mips:Linux:*:*)
case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
big) echo mips-unknown-linux-gnu && exit 0 ;;
little) echo mipsel-unknown-linux-gnu && exit 0 ;;
esac
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef mips
#undef mipsel
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=mipsel
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=mips
#else
CPU=
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
rm -f $dummy.c
test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
@@ -819,7 +832,8 @@ EOF
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
# problems with other programs or directories called `ld' in the path.
ld_supported_targets=`cd /; ld --help 2>&1 \
# Set LC_ALL=C to ensure ld outputs messages in English.
ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
| sed -ne '/supported targets:/!d
s/[ ][ ]*/ /g
s/.*supported targets: *//
@@ -843,32 +857,29 @@ EOF
esac
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
cat >$dummy.c <<EOF
#include <features.h>
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
printf ("%s-pc-linux-gnu\n", argv[1]);
# else
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
# endif
# else
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
# endif
#else
printf ("%s-pc-linux-gnuaout\n", argv[1]);
#endif
return 0;
}
sed 's/^ //' << EOF >$dummy.c
#include <features.h>
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
LIBC=gnu
# else
LIBC=gnulibc1
# endif
# else
LIBC=gnulibc1
# endif
#else
#ifdef __INTEL_COMPILER
LIBC=gnu
#else
LIBC=gnuaout
#endif
#endif
EOF
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
rm -f $dummy.c
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
;;
i*86:DYNIX/ptx:4*:*)
@@ -947,7 +958,7 @@ EOF
exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1050,13 +1061,15 @@ EOF
*:procnto*:*:* | *:QNX:[0123456789]*:*)
if test "${UNAME_MACHINE}" = "x86pc"; then
UNAME_MACHINE=pc
echo i386-${UNAME_MACHINE}-nto-qnx
else
echo `uname -p`-${UNAME_MACHINE}-nto-qnx
fi
echo `uname -p`-${UNAME_MACHINE}-nto-qnx
exit 0 ;;
*:QNX:*:4*)
echo i386-pc-qnx
exit 0 ;;
NSR-[KW]:NONSTOP_KERNEL:*:*)
NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
*:NonStop-UX:*:*)
+85 -55
View File
@@ -1,9 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002 Free Software Foundation, Inc.
timestamp='2001-10-05'
timestamp='2002-03-07'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -118,7 +118,7 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -227,6 +227,7 @@ case $basic_machine in
1750a | 580 \
| a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| c4x | clipper \
| d10v | d30v | dsp16xx \
@@ -234,25 +235,24 @@ case $basic_machine in
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| m32r | m68000 | m68k | m88k | mcore \
| mips16 | mips64 | mips64el | mips64orion | mips64orionel \
| mips | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
| mips64vr4100 | mips64vr4100el | mips64vr4300 \
| mips64vr4300el | mips64vr5000 | mips64vr5000el \
| mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
| mipsisa32 \
| mipsisa32 | mipsisa64 \
| mn10200 | mn10300 \
| ns16k | ns32k \
| openrisc \
| openrisc | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| s390 | s390x \
| sh | sh[34] | sh[34]eb | shbe | shle \
| sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
| stormy16 | strongarm \
| sh | sh[34] | sh[34]eb | shbe | shle | sh64 \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic80 | tron \
| v850 \
| v850 | v850e \
| we32k \
| x86 | xscale \
| x86 | xscale | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
@@ -279,12 +279,13 @@ case $basic_machine in
580-* \
| a29k-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alphapca5[67]-* | arc-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armv*-* \
| avr-* \
| bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c54x-* \
| clipper-* | cray2-* | cydra-* \
| clipper-* | cydra-* \
| d10v-* | d30v-* \
| elxsi-* \
| f30[01]-* | f700-* | fr30-* | fx80-* \
@@ -292,7 +293,7 @@ case $basic_machine in
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| m32r-* \
| m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \
| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
@@ -304,14 +305,14 @@ case $basic_machine in
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
| s390-* | s390x-* \
| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
| sparc-* | sparc64-* | sparc86x-* | sparclite-* \
| sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \
| t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
| v850-* | vax-* \
| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
| xtensa-* \
| ymp-* \
| z8k-*)
;;
@@ -376,6 +377,10 @@ case $basic_machine in
basic_machine=ns32k-sequent
os=-dynix
;;
c90)
basic_machine=c90-cray
os=-unicos
;;
convex-c1)
basic_machine=c1-convex
os=-bsd
@@ -396,16 +401,8 @@ case $basic_machine in
basic_machine=c38-convex
os=-bsd
;;
cray | ymp)
basic_machine=ymp-cray
os=-unicos
;;
cray2)
basic_machine=cray2-cray
os=-unicos
;;
[cjt]90)
basic_machine=${basic_machine}-cray
cray | j90)
basic_machine=j90-cray
os=-unicos
;;
crds | unos)
@@ -420,6 +417,14 @@ case $basic_machine in
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
basic_machine=mips-dec
;;
decsystem10* | dec10*)
basic_machine=pdp10-dec
os=-tops10
;;
decsystem20* | dec20*)
basic_machine=pdp10-dec
os=-tops20
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
basic_machine=m68k-motorola
@@ -600,14 +605,6 @@ case $basic_machine in
basic_machine=m68k-atari
os=-mint
;;
mipsel*-linux*)
basic_machine=mipsel-unknown
os=-linux-gnu
;;
mips*-linux*)
basic_machine=mips-unknown
os=-linux-gnu
;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
@@ -622,6 +619,10 @@ case $basic_machine in
basic_machine=m68k-rom68k
os=-coff
;;
morphos)
basic_machine=powerpc-unknown
os=-morphos
;;
msdos)
basic_machine=i386-pc
os=-msdos
@@ -701,6 +702,10 @@ case $basic_machine in
basic_machine=hppa1.1-oki
os=-proelf
;;
or32 | or32-*)
basic_machine=or32-unknown
os=-coff
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
@@ -786,6 +791,12 @@ case $basic_machine in
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
s390 | s390-*)
basic_machine=s390-ibm
;;
s390x | s390x-*)
basic_machine=s390x-ibm
;;
sa29200)
basic_machine=a29k-amd
os=-udi
@@ -855,7 +866,7 @@ case $basic_machine in
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
sv1)
sv1)
basic_machine=sv1-cray
os=-unicos
;;
@@ -863,8 +874,16 @@ case $basic_machine in
basic_machine=i386-sequent
os=-dynix
;;
t3d)
basic_machine=alpha-cray
os=-unicos
;;
t3e)
basic_machine=t3e-cray
basic_machine=alphaev5-cray
os=-unicos
;;
t90)
basic_machine=t90-cray
os=-unicos
;;
tic54x | c54x*)
@@ -877,6 +896,10 @@ case $basic_machine in
tx39el)
basic_machine=mipstx39el-unknown
;;
toad1)
basic_machine=pdp10-xkl
os=-tops20
;;
tower | tower-32)
basic_machine=m68k-ncr
;;
@@ -927,13 +950,13 @@ case $basic_machine in
basic_machine=i386-pc
os=-windows32-msvcrt
;;
xmp)
basic_machine=xmp-cray
os=-unicos
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
ymp)
basic_machine=ymp-cray
os=-unicos
;;
z8k-*-coff)
basic_machine=z8k-unknown
os=-sim
@@ -954,13 +977,6 @@ case $basic_machine in
op60c)
basic_machine=hppa1.1-oki
;;
mips)
if [ x$os = x-linux-gnu ]; then
basic_machine=mips-unknown
else
basic_machine=mips-mips
fi
;;
romp)
basic_machine=romp-ibm
;;
@@ -983,6 +999,9 @@ case $basic_machine in
sh3 | sh4 | sh3eb | sh4eb)
basic_machine=sh-unknown
;;
sh64)
basic_machine=sh64-unknown
;;
sparc | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
@@ -1070,7 +1089,8 @@ case $os in
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos*)
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1122,12 +1142,18 @@ case $os in
-acis*)
os=-aos
;;
-atheos*)
os=-atheos
;;
-386bsd)
os=-bsd
;;
-ctix* | -uts*)
os=-sysv
;;
-nova*)
os=-rtmk-nova
;;
-ns2 )
os=-nextstep2
;;
@@ -1202,6 +1228,7 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
;;
@@ -1232,6 +1259,9 @@ case $basic_machine in
mips*-*)
os=-elf
;;
or32-*)
os=-coff
;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
+28 -3
View File
@@ -31,7 +31,16 @@ if test -z "$depmode" || test -z "$source" || test -z "$object"; then
fi
# `libtool' can also be set to `yes' or `no'.
depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
if test -z "$depfile"; then
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
dir=`echo "$object" | sed 's,/.*$,/,'`
if test "$dir" = "$object"; then
dir=
fi
# FIXME: should be _deps on DOS.
depfile="$dir.deps/$base"
fi
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
@@ -204,8 +213,9 @@ tru64)
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
tmpdepfile1="$object.d"
tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'`
base=`echo "$object" | sed -e 's/\.o$/.d/' -e 's/\.lo$/.d/'`
tmpdepfile1="$base.o.d"
tmpdepfile2="$base.d"
if test "$libtool" = yes; then
"$@" -Wc,-MD
else
@@ -382,6 +392,21 @@ msvisualcpp)
done
;;
esac
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
) &
+2 -2
View File
@@ -87,7 +87,7 @@ Supported PROGRAM values:
exit 1
;;
aclocal)
aclocal*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
@@ -139,7 +139,7 @@ WARNING: \`$1' is missing on your system. You should only need it if
touch $touch_files
;;
automake)
automake*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
+1 -1
View File
@@ -1 +1 @@
1.28
1.33b
+279 -222
View File
@@ -3,10 +3,10 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
\def\texinfoversion{2001-07-25.07}
\def\texinfoversion{2002-03-11.08}
%
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
% 2000, 01 Free Software Foundation, Inc.
% 2000, 01, 02 Free Software Foundation, Inc.
%
% This texinfo.tex file is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
@@ -30,14 +30,17 @@
% Please try the latest version of texinfo.tex before submitting bug
% reports; you can get the latest version from:
% ftp://ftp.gnu.org/gnu/texinfo.tex
% (and all GNU mirrors, see http://www.gnu.org/order/ftp.html)
% ftp://texinfo.org/tex/texinfo.tex
% ftp://us.ctan.org/macros/texinfo/texinfo.tex
% (and all CTAN mirrors, finger [email protected] for a list).
% /home/gd/gnu/doc/texinfo.tex on the GNU machines.
% (and all GNU mirrors, see http://www.gnu.org/order/ftp.html)
% ftp://texinfo.org/texinfo/texinfo.tex
% ftp://tug.org/tex/texinfo.tex
% (and all CTAN mirrors, see http://www.ctan.org),
% and /home/gd/gnu/doc/texinfo.tex on the GNU machines.
%
% The texinfo.tex in any given Texinfo distribution could well be out
% of date, so if that's what you're using, please check.
% Texinfo has a small home page at http://texinfo.org/.
%
% Texinfo has a small home page at http://texinfo.org/ and also
% http://www.gnu.org/software/texinfo.
%
% Send bug reports to [email protected]. Please include including a
% complete document in each bug report with which we can reproduce the
@@ -51,12 +54,12 @@
% tex foo.texi
% tex foo.texi
% dvips foo.dvi -o # or whatever, to process the dvi file; this makes foo.ps.
% The extra runs of TeX get the cross-reference information correct.
% The extra TeX runs get the cross-reference information correct.
% Sometimes one run after texindex suffices, and sometimes you need more
% than two; texi2dvi does it as many times as necessary.
%
% It is possible to adapt texinfo.tex for other languages. You can get
% the existing language-specific files from ftp://ftp.gnu.org/gnu/texinfo/.
% the existing language-specific files from the full Texinfo distribution.
\message{Loading texinfo [version \texinfoversion]:}
@@ -833,18 +836,43 @@ where each line of input produces a line of output.}
%
\def\asis#1{#1}
% @math means output in math mode.
% We don't use $'s directly in the definition of \math because control
% sequences like \math are expanded when the toc file is written. Then,
% we read the toc file back, the $'s will be normal characters (as they
% should be, according to the definition of Texinfo). So we must use a
% control sequence to switch into and out of math mode.
% @math outputs its argument in math mode.
% We don't use $'s directly in the definition of \math because we need
% to set catcodes according to plain TeX first, to allow for subscripts,
% superscripts, special math chars, etc.
%
% @math does not do math typesetting in section titles, index
% entries, and other such contexts where the catcodes are set before
% @math gets a chance to work. This could perhaps be fixed, but for now
% at least we can have real math in the main text, where it's needed most.
%
% This isn't quite enough for @math to work properly in indices, but it
% seems unlikely it will ever be needed there.
\let\implicitmath = $%$ font-lock fix
%
\let\implicitmath = $
\def\math#1{\implicitmath #1\implicitmath}
% One complication: _ usually means subscripts, but it could also mean
% an actual _ character, as in @math{@var{some_variable} + 1}. So make
% _ within @math be active (mathcode "8000), and distinguish by seeing
% if the current family is \slfam, which is what @var uses.
%
{\catcode95 = \active % 95 = _
\gdef\mathunderscore{%
\catcode95=\active
\def_{\ifnum\fam=\slfam \_\else\sb\fi}%
}}
%
% Another complication: we want \\ (and @\) to output a \ character.
% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
% this is not advertised and we don't care. Texinfo does not
% otherwise define @\.
%
% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
%
\def\math{%
\tex
\mathcode`\_="8000 \mathunderscore
\let\\ = \mathbackslash
\implicitmath\finishmath}
\def\finishmath#1{#1\implicitmath\Etex}
% @bullet and @minus need the same treatment as @math, just above.
\def\bullet{\implicitmath\ptexbullet\implicitmath}
@@ -927,10 +955,12 @@ where each line of input produces a line of output.}
\def\dopdfimage#1#2#3{%
\def\imagewidth{#2}%
\def\imageheight{#3}%
% without \immediate, pdftex seg faults when the same image is
% included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
\ifnum\pdftexversion < 14
\pdfimage
\immediate\pdfimage
\else
\pdfximage
\immediate\pdfximage
\fi
\ifx\empty\imagewidth\else width \imagewidth \fi
\ifx\empty\imageheight\else height \imageheight \fi
@@ -943,7 +973,7 @@ where each line of input produces a line of output.}
\pdfrefximage \pdflastximage
\fi}
\def\pdfmkdest#1{{\normalturnoffactive \pdfdest name{#1} xyz}}
\def\pdfmkpgn#1{#1@}
\def\pdfmkpgn#1{#1}
\let\linkcolor = \Blue % was Cyan, but that seems light?
\def\endlink{\Black\pdfendlink}
% Adding outlines to PDF; macros for calculating structure of outlines
@@ -955,7 +985,7 @@ where each line of input produces a line of output.}
\expandafter\xdef\csname#1\endcsname{\the\tempnum}}
\def\pdfmakeoutlines{{%
\openin 1 \jobname.toc
\ifeof 1\else\bgroup
\ifeof 1\else\begingroup
\closein 1
\indexnofonts
\def\tt{}
@@ -965,32 +995,34 @@ where each line of input produces a line of output.}
\edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
%
\def\chapentry ##1##2##3{}
\let\appendixentry = \chapentry
\def\unnumbchapentry ##1##2{}
\def\secentry ##1##2##3##4{\advancenumber{chap##2}}
\def\unnumbsecentry ##1##2{}
\def\unnumbsecentry ##1##2##3{\advancenumber{chap##2}}
\def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}}
\def\unnumbsubsecentry ##1##2{}
\def\unnumbsubsecentry ##1##2##3##4{\advancenumber{sec##2.##3}}
\def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}}
\def\unnumbsubsubsecentry ##1##2{}
\def\unnumbsubsubsecentry ##1##2##3##4##5{\advancenumber{subsec##2.##3.##4}}
\input \jobname.toc
\def\chapentry ##1##2##3{%
\pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}}
\let\appendixentry = \chapentry
\def\unnumbchapentry ##1##2{%
\pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
\def\secentry ##1##2##3##4{%
\pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}}
\def\unnumbsecentry ##1##2{%
\pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
\def\unnumbsecentry ##1##2##3{%
\pdfoutline goto name{\pdfmkpgn{##3}}{##1}}
\def\subsecentry ##1##2##3##4##5{%
\pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}}
\def\unnumbsubsecentry ##1##2{%
\pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
\def\unnumbsubsecentry ##1##2##3##4{%
\pdfoutline goto name{\pdfmkpgn{##4}}{##1}}
\def\subsubsecentry ##1##2##3##4##5##6{%
\pdfoutline goto name{\pdfmkpgn{##6}}{##1}}
\def\unnumbsubsubsecentry ##1##2{%
\pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
\def\unnumbsubsubsecentry ##1##2##3##4##5{%
\pdfoutline goto name{\pdfmkpgn{##5}}{##1}}
\input \jobname.toc
\egroup\fi
\endgroup\fi
}}
\def\makelinks #1,{%
\def\params{#1}\def\E{END}%
@@ -1107,9 +1139,6 @@ where each line of input produces a line of output.}
}%
}
% Use Computer Modern fonts at \magstephalf (11pt).
\newcount\mainmagstep \mainmagstep=\magstephalf
% Set the font macro #1 to the font named #2, adding on the
% specified font prefix (normally `cm').
% #3 is the font's design size, #4 is a scale factor
@@ -1138,13 +1167,16 @@ where each line of input produces a line of output.}
\def\scshape{csc}
\def\scbshape{csc}
\newcount\mainmagstep
\ifx\bigger\relax
\let\mainmagstep=\magstep1
\setfont\textrm\rmshape{12}{1000}
\setfont\texttt\ttshape{12}{1000}
% not really supported.
\let\mainmagstep=\magstep1
\setfont\textrm\rmshape{12}{1000}
\setfont\texttt\ttshape{12}{1000}
\else
\setfont\textrm\rmshape{10}{\mainmagstep}
\setfont\texttt\ttshape{10}{\mainmagstep}
\mainmagstep=\magstephalf
\setfont\textrm\rmshape{10}{\mainmagstep}
\setfont\texttt\ttshape{10}{\mainmagstep}
\fi
% Instead of cmb10, you many want to use cmbx10.
% cmbx10 is a prettier font on its own, but cmb10
@@ -1224,20 +1256,6 @@ where each line of input produces a line of output.}
\font\seci=cmmi12 scaled \magstep1
\font\secsy=cmsy10 scaled \magstep2
% \setfont\ssecrm\bxshape{10}{\magstep1} % This size an font looked bad.
% \setfont\ssecit\itshape{10}{\magstep1} % The letters were too crowded.
% \setfont\ssecsl\slshape{10}{\magstep1}
% \setfont\ssectt\ttshape{10}{\magstep1}
% \setfont\ssecsf\sfshape{10}{\magstep1}
%\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx.
%\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than
%\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1.
%\setfont\ssectt\ttshape{10}{1315}
%\setfont\ssecsf\sfshape{10}{1315}
%\let\ssecbf=\ssecrm
% Subsection fonts (13.15pt).
\setfont\ssecrm\rmbshape{12}{\magstephalf}
\setfont\ssecit\itbshape{10}{1315}
@@ -1254,17 +1272,16 @@ where each line of input produces a line of output.}
% In order for the font changes to affect most math symbols and letters,
% we have to define the \textfont of the standard families. Since
% texinfo doesn't allow for producing subscripts and superscripts, we
% don't bother to reset \scriptfont and \scriptscriptfont (which would
% also require loading a lot more fonts).
% texinfo doesn't allow for producing subscripts and superscripts except
% in the main text, we don't bother to reset \scriptfont and
% \scriptscriptfont (which would also require loading a lot more fonts).
%
\def\resetmathfonts{%
\textfont0 = \tenrm \textfont1 = \teni \textfont2 = \tensy
\textfont\itfam = \tenit \textfont\slfam = \tensl \textfont\bffam = \tenbf
\textfont\ttfam = \tentt \textfont\sffam = \tensf
\textfont0=\tenrm \textfont1=\teni \textfont2=\tensy
\textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf
\textfont\ttfam=\tentt \textfont\sffam=\tensf
}
% The font-changing commands redefine the meanings of \tenSTYLE, instead
% of just \STYLE. We do this so that font changes will continue to work
% in math mode, where it is the current \fam that is relevant in most
@@ -1425,11 +1442,19 @@ where each line of input produces a line of output.}
\def\realdash{-}
\def\codedash{-\discretionary{}{}{}}
\def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}}
\def\codeunder{%
% this is all so @math{@code{var_name}+1} can work. In math mode, _
% is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
% will therefore expand the active definition of _, which is us
% (inside @code that is), therefore an endless loop.
\ifusingtt{\ifmmode
\mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_.
\else\normalunderscore \fi
\discretionary{}{}{}}%
{\_}%
}
\def\codex #1{\tclose{#1}\endgroup}
%\let\exp=\tclose %Was temporary
% @kbd is like @code, except that if the argument is just one @key command,
% then @kbd has no effect.
@@ -2753,9 +2778,23 @@ width0pt\relax} \fi
\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
% Take care of texinfo commands likely to appear in an index entry.
% (Must be a way to avoid doing expansion at all, and thus not have to
% laboriously list every single command here.)
%
\def\indexdummies{%
\def\ { }%
\def\@{@}% change to @@ when we switch to @ as escape char in aux files.
% Need these in case \tex is in effect and \{ is a \delimiter again.
% But can't use \lbracecmd and \rbracecmd because texindex assumes
% braces and backslashes are used only as delimiters.
\let\{ = \mylbrace
\let\} = \myrbrace
\def\_{{\realbackslash _}}%
\normalturnoffactive
%
% Take care of the plain tex accent commands.
\def\,##1{\realbackslash ,{##1}}%
\def\"{\realbackslash "}%
\def\`{\realbackslash `}%
\def\'{\realbackslash '}%
@@ -2768,69 +2807,66 @@ width0pt\relax} \fi
\def\u{\realbackslash u}%
\def\v{\realbackslash v}%
\def\H{\realbackslash H}%
% Take care of the plain tex special European modified letters.
\def\oe{\realbackslash oe}%
\def\ae{\realbackslash ae}%
\def\aa{\realbackslash aa}%
\def\OE{\realbackslash OE}%
\def\AE{\realbackslash AE}%
\def\AA{\realbackslash AA}%
\def\o{\realbackslash o}%
\def\O{\realbackslash O}%
\def\l{\realbackslash l}%
\def\L{\realbackslash L}%
\def\ss{\realbackslash ss}%
% Take care of texinfo commands likely to appear in an index entry.
% (Must be a way to avoid doing expansion at all, and thus not have to
% laboriously list every single command here.)
\def\@{@}% will be @@ when we switch to @ as escape char.
% Need these in case \tex is in effect and \{ is a \delimiter again.
% But can't use \lbracecmd and \rbracecmd because texindex assumes
% braces and backslashes are used only as delimiters.
\let\{ = \mylbrace
\let\} = \myrbrace
\def\_{{\realbackslash _}}%
\def\w{\realbackslash w }%
\def\bf{\realbackslash bf }%
%\def\rm{\realbackslash rm }%
\def\sl{\realbackslash sl }%
\def\sf{\realbackslash sf}%
\def\tt{\realbackslash tt}%
\def\gtr{\realbackslash gtr}%
\def\less{\realbackslash less}%
\def\hat{\realbackslash hat}%
\def\TeX{\realbackslash TeX}%
\def\dots{\realbackslash dots }%
\def\result{\realbackslash result}%
\def\equiv{\realbackslash equiv}%
\def\expansion{\realbackslash expansion}%
\def\print{\realbackslash print}%
\def\error{\realbackslash error}%
\def\point{\realbackslash point}%
\def\copyright{\realbackslash copyright}%
\def\tclose##1{\realbackslash tclose {##1}}%
\def\code##1{\realbackslash code {##1}}%
\def\uref##1{\realbackslash uref {##1}}%
\def\url##1{\realbackslash url {##1}}%
\def\env##1{\realbackslash env {##1}}%
\def\command##1{\realbackslash command {##1}}%
\def\option##1{\realbackslash option {##1}}%
\def\dotless##1{\realbackslash dotless {##1}}%
\def\samp##1{\realbackslash samp {##1}}%
\def\,##1{\realbackslash ,{##1}}%
% Take care of the plain tex special European modified letters.
\def\AA{\realbackslash AA}%
\def\AE{\realbackslash AE}%
\def\L{\realbackslash L}%
\def\OE{\realbackslash OE}%
\def\O{\realbackslash O}%
\def\aa{\realbackslash aa}%
\def\ae{\realbackslash ae}%
\def\l{\realbackslash l}%
\def\oe{\realbackslash oe}%
\def\o{\realbackslash o}%
\def\ss{\realbackslash ss}%
%
% Although these internals commands shouldn't show up, sometimes they do.
\def\bf{\realbackslash bf }%
\def\gtr{\realbackslash gtr}%
\def\hat{\realbackslash hat}%
\def\less{\realbackslash less}%
%\def\rm{\realbackslash rm }%
\def\sf{\realbackslash sf}%
\def\sl{\realbackslash sl }%
\def\tclose##1{\realbackslash tclose {##1}}%
\def\tt{\realbackslash tt}%
%
\def\b##1{\realbackslash b {##1}}%
\def\i##1{\realbackslash i {##1}}%
\def\sc##1{\realbackslash sc {##1}}%
\def\t##1{\realbackslash t {##1}}%
\def\r##1{\realbackslash r {##1}}%
\def\i##1{\realbackslash i {##1}}%
\def\b##1{\realbackslash b {##1}}%
\def\sc##1{\realbackslash sc {##1}}%
\def\cite##1{\realbackslash cite {##1}}%
\def\key##1{\realbackslash key {##1}}%
\def\file##1{\realbackslash file {##1}}%
\def\var##1{\realbackslash var {##1}}%
\def\kbd##1{\realbackslash kbd {##1}}%
\def\dfn##1{\realbackslash dfn {##1}}%
\def\emph##1{\realbackslash emph {##1}}%
%
\def\TeX{\realbackslash TeX}%
\def\acronym##1{\realbackslash acronym {##1}}%
\def\cite##1{\realbackslash cite {##1}}%
\def\code##1{\realbackslash code {##1}}%
\def\command##1{\realbackslash command {##1}}%
\def\dfn##1{\realbackslash dfn {##1}}%
\def\dots{\realbackslash dots }%
\def\emph##1{\realbackslash emph {##1}}%
\def\env##1{\realbackslash env {##1}}%
\def\file##1{\realbackslash file {##1}}%
\def\kbd##1{\realbackslash kbd {##1}}%
\def\key##1{\realbackslash key {##1}}%
\def\math##1{\realbackslash math {##1}}%
\def\option##1{\realbackslash option {##1}}%
\def\samp##1{\realbackslash samp {##1}}%
\def\strong##1{\realbackslash strong {##1}}%
\def\uref##1{\realbackslash uref {##1}}%
\def\url##1{\realbackslash url {##1}}%
\def\var##1{\realbackslash var {##1}}%
\def\w{\realbackslash w }%
%
% These math commands don't seem likely to be used in index entries.
\def\copyright{\realbackslash copyright}%
\def\equiv{\realbackslash equiv}%
\def\error{\realbackslash error}%
\def\expansion{\realbackslash expansion}%
\def\point{\realbackslash point}%
\def\print{\realbackslash print}%
\def\result{\realbackslash result}%
%
% Handle some cases of @value -- where the variable name does not
% contain - or _, and the value does not contain any
@@ -2844,7 +2880,7 @@ width0pt\relax} \fi
% If an index command is used in an @example environment, any spaces
% therein should become regular spaces in the raw index file, not the
% expansion of \tie (\\leavevmode \penalty \@M \ ).
% expansion of \tie (\leavevmode \penalty \@M \ ).
{\obeyspaces
\gdef\unsepspaces{\obeyspaces\let =\space}}
@@ -2855,7 +2891,10 @@ width0pt\relax} \fi
\def\indexdummydots{...}
\def\indexnofonts{%
% Just ignore accents.
\def\@{@}%
% how to handle braces?
\def\_{\normalunderscore}%
%
\let\,=\indexdummyfont
\let\"=\indexdummyfont
\let\`=\indexdummyfont
@@ -2871,45 +2910,49 @@ width0pt\relax} \fi
\let\H=\indexdummyfont
\let\dotless=\indexdummyfont
% Take care of the plain tex special European modified letters.
\def\oe{oe}%
\def\ae{ae}%
\def\aa{aa}%
\def\OE{OE}%
\def\AE{AE}%
\def\AA{AA}%
\def\o{o}%
\def\O{O}%
\def\l{l}%
\def\AE{AE}%
\def\L{L}%
\def\OE{OE}%
\def\O{O}%
\def\aa{aa}%
\def\ae{ae}%
\def\l{l}%
\def\oe{oe}%
\def\o{o}%
\def\ss{ss}%
\let\w=\indexdummyfont
\let\t=\indexdummyfont
\let\r=\indexdummyfont
\let\i=\indexdummyfont
\let\b=\indexdummyfont
\let\emph=\indexdummyfont
\let\strong=\indexdummyfont
\let\cite=\indexdummyfont
\let\sc=\indexdummyfont
%Don't no-op \tt, since it isn't a user-level command
% and is used in the definitions of the active chars like <, >, |...
%
% Don't no-op \tt, since it isn't a user-level command
% and is used in the definitions of the active chars like <, >, |, etc.
% Likewise with the other plain tex font commands.
%\let\tt=\indexdummyfont
\let\tclose=\indexdummyfont
\let\code=\indexdummyfont
\let\url=\indexdummyfont
\let\uref=\indexdummyfont
\let\env=\indexdummyfont
%
\let\b=\indexdummyfont
\let\i=\indexdummyfont
\let\r=\indexdummyfont
\let\sc=\indexdummyfont
\let\t=\indexdummyfont
%
\let\TeX=\indexdummytex
\let\acronym=\indexdummyfont
\let\cite=\indexdummyfont
\let\code=\indexdummyfont
\let\command=\indexdummyfont
\let\option=\indexdummyfont
\let\dfn=\indexdummyfont
\let\dots=\indexdummydots
\let\emph=\indexdummyfont
\let\env=\indexdummyfont
\let\file=\indexdummyfont
\let\samp=\indexdummyfont
\let\kbd=\indexdummyfont
\let\key=\indexdummyfont
\let\math=\indexdummyfont
\let\option=\indexdummyfont
\let\samp=\indexdummyfont
\let\strong=\indexdummyfont
\let\uref=\indexdummyfont
\let\url=\indexdummyfont
\let\var=\indexdummyfont
\let\TeX=\indexdummytex
\let\dots=\indexdummydots
\def\@{@}%
\let\w=\indexdummyfont
}
% To define \realbackslash, we must make \ not be an escape.
@@ -3511,8 +3554,8 @@ width0pt\relax} \fi
\gdef\thischaptername{#1}%
\xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}%
\toks0 = {#1}%
\edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}%
{\putwordAppendix{} \appendixletter}}}%
\edef\temp{\noexpand\writetocentry{\realbackslash appendixentry{\the\toks0}%
{\appendixletter}}}%
\temp
\appendixnoderef
\global\let\section = \appendixsec
@@ -3589,7 +3632,8 @@ width0pt\relax} \fi
\def\unnumberedseczzz #1{%
\plainsecheading {#1}\gdef\thissection{#1}%
\toks0 = {#1}%
\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry{\the\toks0}}}%
\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry%
{\the\toks0}{\the\chapno}}}%
\temp
\unnumbnoderef
\nobreak
@@ -3628,7 +3672,7 @@ width0pt\relax} \fi
\plainsubsecheading {#1}\gdef\thissection{#1}%
\toks0 = {#1}%
\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsecentry%
{\the\toks0}}}%
{\the\toks0}{\the\chapno}{\the\secno}}}%
\temp
\unnumbnoderef
\nobreak
@@ -3669,7 +3713,7 @@ width0pt\relax} \fi
\plainsubsubsecheading {#1}\gdef\thissection{#1}%
\toks0 = {#1}%
\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsubsecentry%
{\the\toks0}}}%
{\the\toks0}{\the\chapno}{\the\secno}{\the\subsecno}}}%
\temp
\unnumbnoderef
\nobreak
@@ -3945,6 +3989,7 @@ width0pt\relax} \fi
\startcontents{\putwordShortTOC}%
%
\let\chapentry = \shortchapentry
\let\appendixentry = \shortappendixentry
\let\unnumbchapentry = \shortunnumberedentry
% We want a true roman here for the page numbers.
\secfonts
@@ -3953,11 +3998,11 @@ width0pt\relax} \fi
\hyphenpenalty = 10000
\advance\baselineskip by 1pt % Open it up a little.
\def\secentry ##1##2##3##4{}
\def\unnumbsecentry ##1##2{}
\def\unnumbsecentry ##1##2##3{}
\def\subsecentry ##1##2##3##4##5{}
\def\unnumbsubsecentry ##1##2{}
\def\unnumbsubsecentry ##1##2##3##4{}
\def\subsubsecentry ##1##2##3##4##5##6{}
\def\unnumbsubsubsecentry ##1##2{}
\def\unnumbsubsubsecentry ##1##2##3##4##5{}
\openin 1 \jobname.toc
\ifeof 1 \else
\closein 1
@@ -3980,16 +4025,23 @@ width0pt\relax} \fi
% The last argument is the page number.
% The arguments in between are the chapter number, section number, ...
% Chapter-level things, for both the long and short contents.
% Chapters, in the main contents.
\def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}}
% See comments in \dochapentry re vbox and related settings
%
% Chapters, in the short toc.
% See comments in \dochapentry re vbox and related settings.
\def\shortchapentry#1#2#3{%
\tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#3\egroup}%
}
% Appendices, in the main contents.
\def\appendixentry#1#2#3{\dochapentry{\putwordAppendix{} #2\labelspace#1}{#3}}
%
% Appendices, in the short toc.
\let\shortappendixentry = \shortchapentry
% Typeset the label for a chapter or appendix for the short contents.
% The arg is, e.g. `Appendix A' for an appendix, or `3' for a chapter.
% The arg is, e.g., `Appendix A' for an appendix, or `3' for a chapter.
% We could simplify the code here by writing out an \appendixentry
% command in the toc file for appendices, instead of using \chapentry
% for both, but it doesn't seem worth it.
@@ -3997,38 +4049,31 @@ width0pt\relax} \fi
\newdimen\shortappendixwidth
%
\def\shortchaplabel#1{%
% Compute width of word "Appendix", may change with language.
\setbox0 = \hbox{\shortcontrm \putwordAppendix}%
\shortappendixwidth = \wd0
%
% We typeset #1 in a box of constant width, regardless of the text of
% #1, so the chapter titles will come out aligned.
\setbox0 = \hbox{#1}%
\dimen0 = \ifdim\wd0 > \shortappendixwidth \shortappendixwidth \else 0pt \fi
%
% This space should be plenty, since a single number is .5em, and the
% This space should be enough, since a single number is .5em, and the
% widest letter (M) is 1em, at least in the Computer Modern fonts.
% But use \hss just in case.
% (This space doesn't include the extra space that gets added after
% the label; that gets put in by \shortchapentry above.)
\advance\dimen0 by 1.1em
\hbox to \dimen0{#1\hfil}%
\dimen0 = 1em
\hbox to \dimen0{#1\hss}%
}
% Unnumbered chapters.
\def\unnumbchapentry#1#2{\dochapentry{#1}{#2}}
\def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno\bgroup#2\egroup}}
% Sections.
\def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}}
\def\unnumbsecentry#1#2{\dosecentry{#1}{#2}}
\def\unnumbsecentry#1#2#3{\dosecentry{#1}{#3}}
% Subsections.
\def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}}
\def\unnumbsubsecentry#1#2{\dosubsecentry{#1}{#2}}
\def\unnumbsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}
% And subsubsections.
\def\subsubsecentry#1#2#3#4#5#6{%
\dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}}
\def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}}
\def\unnumbsubsubsecentry#1#2#3#4#5{\dosubsubsecentry{#1}{#5}}
% This parameter controls the indentation of the various levels.
\newdimen\tocindent \tocindent = 3pc
@@ -4069,7 +4114,7 @@ width0pt\relax} \fi
\def\tocentry#1#2{\begingroup
\vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks
% Do not use \turnoffactive in these arguments. Since the toc is
% typeset in cmr, so characters such as _ would come out wrong; we
% typeset in cmr, characters such as _ would come out wrong; we
% have to do the usual translation tricks.
\entry{#1}{#2}%
\endgroup}
@@ -4898,7 +4943,7 @@ width0pt\relax} \fi
% #1 is the data type, #2 the name, #3 the args.
\def\deftypefunheaderx #1#2 #3\relax{%
\doind {fn}{\code{#2}}% Make entry in function index
\begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypefun}%
\begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypefun}%
\deftypefunargs {#3}\endgroup %
\catcode 61=\other % Turn off change made in \defparsebody
}
@@ -4907,9 +4952,9 @@ width0pt\relax} \fi
\def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader}
% \defheaderxcond#1\relax$$$
% \defheaderxcond#1\relax$.$
% puts #1 in @code, followed by a space, but does nothing if #1 is null.
\def\defheaderxcond#1#2$$${\ifx#1\relax\else\code{#1#2} \fi}
\def\defheaderxcond#1#2$.${\ifx#1\relax\else\code{#1#2} \fi}
% #1 is the classification. #2 is the data type. #3 is the name and args.
\def\deftypefnheader #1#2#3{\deftypefnheaderx{#1}{#2}#3 \relax}
@@ -4919,7 +4964,7 @@ width0pt\relax} \fi
\begingroup
\normalparens % notably, turn off `&' magic, which prevents
% at least some C++ text from working
\defname {\defheaderxcond#2\relax$$$#3}{#1}%
\defname {\defheaderxcond#2\relax$.$#3}{#1}%
\deftypefunargs {#4}\endgroup %
\catcode 61=\other % Turn off change made in \defparsebody
}
@@ -4965,7 +5010,7 @@ width0pt\relax} \fi
\def\deftypeopheader#1#2#3#4{%
\dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index
\begingroup
\defname{\defheaderxcond#2\relax$$$#3}
\defname{\defheaderxcond#2\relax$.$#3}
{\deftypeopcategory\ \putwordon\ \code{#1}}%
\deftypefunargs{#4}%
\endgroup
@@ -4980,7 +5025,7 @@ width0pt\relax} \fi
\def\deftypemethodheader#1#2#3#4{%
\dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index
\begingroup
\defname{\defheaderxcond#2\relax$$$#3}{\putwordMethodon\ \code{#1}}%
\defname{\defheaderxcond#2\relax$.$#3}{\putwordMethodon\ \code{#1}}%
\deftypefunargs{#4}%
\endgroup
}
@@ -4994,7 +5039,7 @@ width0pt\relax} \fi
\def\deftypeivarheader#1#2#3{%
\dosubind{vr}{\code{#3}}{\putwordof\ \code{#1}}% entry in variable index
\begingroup
\defname{\defheaderxcond#2\relax$$$#3}
\defname{\defheaderxcond#2\relax$.$#3}
{\putwordInstanceVariableof\ \code{#1}}%
\defvarargs{#3}%
\endgroup
@@ -5077,7 +5122,7 @@ width0pt\relax} \fi
% is actually part of the data type, which should not be put into the index.
\def\deftypevarheader #1#2{%
\dovarind#2 \relax% Make entry in variables index
\begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypevar}%
\begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypevar}%
\interlinepenalty=10000
\endgraf\nobreak\vskip -\parskip\nobreak
\endgroup}
@@ -5088,7 +5133,7 @@ width0pt\relax} \fi
\def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader}
\def\deftypevrheader #1#2#3{\dovarind#3 \relax%
\begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1}
\begingroup\defname {\defheaderxcond#2\relax$.$#3}{#1}
\interlinepenalty=10000
\endgraf\nobreak\vskip -\parskip\nobreak
\endgroup}
@@ -5248,7 +5293,7 @@ width0pt\relax} \fi
\message{Warning: redefining \the\macname}%
\else
\expandafter\ifx\csname \the\macname\endcsname \relax
\else \errmessage{The name \the\macname\space is reserved}\fi
\else \errmessage{Macro name \the\macname\space already defined}\fi
\global\cslet{macsave.\the\macname}{\the\macname}%
\global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
% Add the macroname to \macrolist
@@ -5799,8 +5844,15 @@ width0pt\relax} \fi
%
\smallfonts \rm
%
% Hang the footnote text off the number.
\hang
% Because we use hanging indentation in footnotes, a @noindent appears
% to exdent this text, so make it be a no-op. makeinfo does not use
% hanging indentation so @noindent can still be needed within footnote
% text after an @example or the like (not that this is good style).
\let\noindent = \relax
%
% Hang the footnote text off the number. Use \everypar in case the
% footnote extends for more than one paragraph.
\everypar = {\hang}%
\textindent{\thisfootno}%
%
% Don't crash into the line above the footnote text. Since this
@@ -5881,7 +5933,7 @@ width0pt\relax} \fi
\global\warnednoepsftrue
\fi
\else
\imagexxx #1,,,\finish
\imagexxx #1,,,,,\finish
\fi
}
%
@@ -5891,33 +5943,34 @@ width0pt\relax} \fi
% #4 is (ignored optional) html alt text.
% #5 is (ignored optional) extension.
% #6 is just the usual extra ignored arg for parsing this stuff.
\def\imagexxx#1,#2,#3,#4,#5,#6\finish{%
\newif\ifimagevmode
\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
\catcode`\^^M = 5 % in case we're inside an example
\normalturnoffactive % allow _ et al. in names
% If the image is by itself, center it.
\ifvmode
\imagevmodetrue
\nobreak\bigskip
% Usually we'll have text after the image which will insert
% \parskip glue, so insert it here too to equalize the space
% above and below.
\nobreak\vskip\parskip
\nobreak
\line\bgroup\hss
\fi
%
% Output the image.
\ifpdf
\centerline{\dopdfimage{#1}{#2}{#3}}%
\dopdfimage{#1}{#2}{#3}%
\else
% \epsfbox itself resets \epsf?size at each figure.
\setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
\setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
\begingroup
\catcode`\^^M = 5 % in case we're inside an example
\normalturnoffactive % allow _ et al. in names
% If the image is by itself, center it.
\ifvmode
\nobreak\bigskip
% Usually we'll have text after the image which will insert
% \parskip glue, so insert it here too to equalize the space
% above and below.
\nobreak\vskip\parskip
\nobreak
\centerline{\epsfbox{#1.eps}}%
\bigbreak
\else
% In the middle of a paragraph, no extra space.
\epsfbox{#1.eps}%
\fi
\endgroup
\epsfbox{#1.eps}%
\fi
}
%
\ifimagevmode \hss \egroup \bigbreak \fi % space after the image
\endgroup}
\message{localization,}
@@ -6087,6 +6140,10 @@ should work if nowhere else does.}
%
\afourpaper
\internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}%
%
% Must explicitly reset to 0 because we call \afourpaper, apparently,
% although this does not entirely make sense.
\globaldefs = 0
}}
% Use @afourwide to print on European A4 paper in wide format.
@@ -6136,7 +6193,7 @@ should work if nowhere else does.}
\def\normalless{<}
\def\normalgreater{>}
\def\normalplus{+}
\def\normaldollar{$}
\def\normaldollar{$}%$ font-lock fix
% This macro is used to make a character print one way in ttfont
% where it can probably just be output, and another way in other fonts,
@@ -6185,7 +6242,7 @@ should work if nowhere else does.}
\catcode`\+=\active
\def+{{\tt \char 43}}
\catcode`\$=\active
\def${\ifusingit{{\sl\$}}\normaldollar}
\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
%\catcode 27=\active
%\def^^[{$\diamondsuit$}
@@ -6230,7 +6287,7 @@ should work if nowhere else does.}
@let<=@normalless
@let>=@normalgreater
@let+=@normalplus
@let$=@normaldollar}
@let$=@normaldollar}%$ font-lock fix
@def@normalturnoffactive{@let"=@normaldoublequote
@let\=@normalbackslash
@@ -6241,7 +6298,7 @@ should work if nowhere else does.}
@let<=@normalless
@let>=@normalgreater
@let+=@normalplus
@let$=@normaldollar}
@let$=@normaldollar}%$ font-lock fix
% Make _ and + \other characters, temporarily.
% This is canceled by @fixbackslash.
Vendored
+1012 -261
View File
File diff suppressed because it is too large Load Diff
+19 -12
View File
@@ -1,5 +1,7 @@
# Configure template for GNU Bison. -*-Autoconf-*-
#
# Copyright 2001, 2002 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
@@ -16,17 +18,18 @@
# 02111-1307 USA
# We need a recent Autoconf to run a recent Autotest.
AC_PREREQ(2.52e)
AC_PREREQ(2.52g)
AC_INIT([GNU Bison], [1.30], [[email protected]])
AC_INIT([GNU Bison], [1.34], [[email protected]])
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE([bison], [1.30])
AM_INIT_AUTOMAKE([bison], [1.34])
AM_CONFIG_HEADER(config.h:config.hin)
# Initialize the test suite.
AC_CONFIG_TESTDIR(tests)
AC_CONFIG_FILES([tests/bison], [chmod +x tests/bison])
AC_CONFIG_FILES([tests/Makefile tests/atlocal])
# Needed by tests/atlocal.in.
AC_SUBST([GCC])
@@ -46,6 +49,9 @@ AC_ARG_ENABLE(gcc-warnings,
esac],
[enableval=no])
if test "${enableval}" = yes; then
BISON_WARNING(-Werror)
AC_SUBST([WERROR_CFLAGS], [$WARNING_CFLAGS])
WARNING_CFLAGS=
BISON_WARNING(-Wall)
BISON_WARNING(-W)
BISON_WARNING(-Wbad-function-cast)
@@ -58,7 +64,6 @@ if test "${enableval}" = yes; then
BISON_WARNING(-Wshadow)
BISON_WARNING(-Wstrict-prototypes)
BISON_WARNING(-Wwrite-strings)
CFLAGS="$CFLAGS $WARNING_CFLAGS"
fi
# Checks for libraries.
@@ -79,26 +84,28 @@ AM_C_PROTOTYPES
# Checks for library functions.
AC_FUNC_ALLOCA
AC_FUNC_OBSTACK
AC_FUNC_ERROR_AT_LINE
AC_FUNC_STRNLEN
AC_CHECK_FUNCS(mkstemp setlocale)
AC_CHECK_DECLS([stpcpy, strndup, strnlen, memchr])
AC_REPLACE_FUNCS(stpcpy strndup strnlen strspn memchr)
AC_CHECK_DECLS([stpcpy, strchr, strspn, strnlen, memchr, memrchr])
AC_REPLACE_FUNCS(stpcpy strchr strspn memchr memrchr)
jm_FUNC_MALLOC
jm_FUNC_REALLOC
jm_PREREQ_QUOTEARG
jm_PREREQ_ERROR
AM_WITH_DMALLOC
ALL_LINGUAS="de es et fr ja nl tr ru"
AM_GNU_GETTEXT
ALL_LINGUAS="de es et fr it ja nl ru sv tr"
AM_GNU_GETTEXT(, need-ngettext)
# This is necessary so that .o files in LIBOBJS are also built via
# the ANSI2KNR-filtering rules.
LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
AC_SUBST(LIBOBJS)
LIB@&t@OBJS=`echo $LIB@&t@OBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
AC_SUBST(LIB@&t@OBJS)
AC_OUTPUT([Makefile
config/Makefile
intl/Makefile po/Makefile.in
lib/Makefile src/Makefile doc/Makefile
m4/Makefile
tests/Makefile])
m4/Makefile])
+4 -8
View File
@@ -1,16 +1,12 @@
Makefile
bison.aux
Makefile Makefile.in
*.aux *.dvi *.log *.info* *.pdf *.ps
stamp-*
auto
bison.cp
bison.cps
bison.dvi
bison.fn
bison.ky
bison.log
bison.pg
bison.ps
bison.toc
bison.tp
bison.vr
refcard.dvi
refcard.log
refcard.ps
-403
View File
@@ -1,403 +0,0 @@
# Makefile.in generated by automake 1.5a from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
EXEEXT = @EXEEXT@
OBJEXT = @OBJEXT@
PATH_SEPARATOR = @PATH_SEPARATOR@
AMTAR = @AMTAR@
AUTOM4TE = @AUTOM4TE@
AWK = @AWK@
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CPP = @CPP@
DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
GCC = @GCC@
GENCAT = @GENCAT@
GLIBC21 = @GLIBC21@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
AUTOMAKE_OPTIONS = 1.4
info_TEXINFOS = bison.texinfo
man_MANS = bison.1
bison_TEXINFOS = gpl.texi fdl.texi
EXTRA_DIST = FAQ bison.1 bison.rnh refcard.tex
CLEANFILES = refcard.dvi refcard.log refcard.ps
subdir = doc
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
TEXINFO_TEX = $(top_srcdir)/config/texinfo.tex
INFO_DEPS = bison.info
DVIS = bison.dvi
TEXINFOS = bison.texinfo
NROFF = nroff
MANS = $(man_MANS)
DIST_COMMON = $(bison_TEXINFOS) Makefile.am Makefile.in stamp-vti \
version.texi
all: all-am
.SUFFIXES:
.SUFFIXES: .dvi .info .ps .texinfo
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu doc/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
$(srcdir)/version.texi: $(srcdir)/stamp-vti
@:
$(srcdir)/stamp-vti: bison.texinfo $(top_srcdir)/configure.in
@(set `$(SHELL) $(top_srcdir)/config/mdate-sh $(srcdir)/bison.texinfo`; \
echo "@set UPDATED $$1 $$2 $$3"; \
echo "@set UPDATED-MONTH $$2 $$3"; \
echo "@set EDITION $(VERSION)"; \
echo "@set VERSION $(VERSION)") > vti.tmp
@cmp -s vti.tmp $(srcdir)/version.texi \
|| (echo "Updating $(srcdir)/version.texi"; \
cp vti.tmp $(srcdir)/version.texi)
-@rm -f vti.tmp
@cp $(srcdir)/version.texi $@
mostlyclean-vti:
-rm -f vti.tmp
maintainer-clean-vti:
-rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
bison.info: bison.texinfo $(srcdir)/version.texi $(bison_TEXINFOS)
bison.dvi: bison.texinfo $(srcdir)/version.texi $(bison_TEXINFOS)
.texinfo.info:
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
cd $(srcdir) \
&& $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
`echo $< | sed 's,.*/,,'`
.texinfo.dvi:
TEXINPUTS="$(top_srcdir)/config$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
$(TEXI2DVI) $<
.texinfo:
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
cd $(srcdir) \
&& $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
`echo $< | sed 's,.*/,,'`
MAKEINFO = @MAKEINFO@
TEXI2DVI = texi2dvi
DVIPS = dvips
.dvi.ps:
$(DVIPS) $< -o $@
uninstall-info-am:
$(PRE_UNINSTALL)
@if (install-info --version && \
install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file; \
done; \
else :; fi
@$(NORMAL_UNINSTALL)
@list='$(INFO_DEPS)'; \
for file in $$list; do \
(if cd $(DESTDIR)$(infodir); then \
echo " rm -f $$file $$file-[0-9] $$file-[0-9][0-9])"; \
rm -f $$file $$file-[0-9] $$file-[0-9][0-9]; \
else :; fi); \
done
dist-info: $(INFO_DEPS)
list='$(INFO_DEPS)'; \
for base in $$list; do \
d=$(srcdir); \
for file in $$d/$$base*; do \
relfile=`expr "$$file" : "$$d/\(.*\)"`; \
test -f $(distdir)/$$relfile || \
cp -p $$file $(distdir)/$$relfile; \
done; \
done
mostlyclean-aminfo:
-rm -f bison.aux bison.cp bison.cps bison.dvi bison.fn bison.ky bison.log \
bison.pg bison.ps bison.toc bison.tp bison.vr
maintainer-clean-aminfo:
cd $(srcdir) && \
for i in $(INFO_DEPS); do \
rm -f $$i; \
if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
rm -f $$i-[0-9]*; \
fi; \
done
man1dir = $(mandir)/man1
install-man1: $(man1_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(man1dir)
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.1*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
$(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
done
uninstall-man1:
@$(NORMAL_UNINSTALL)
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.1*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
rm -f $(DESTDIR)$(man1dir)/$$inst; \
done
tags: TAGS
TAGS:
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="${top_distdir}" distdir="$(distdir)" \
dist-info
check-am: all-am
check: check-am
all-am: Makefile $(INFO_DEPS) $(MANS)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(infodir) $(DESTDIR)$(man1dir)
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am: $(DVIS)
info: info-am
info-am: $(INFO_DEPS)
install-data-am: install-info-am install-man
install-exec-am:
install-info: install-info-am
install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(infodir)
@list='$(INFO_DEPS)'; \
for file in $$list; do \
d=$(srcdir); \
for ifile in echo $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9]; do \
if test -f $$ifile; then \
relfile=`expr "$$ifile" : "$$d/\(.*\)"`; \
echo " $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile"; \
$(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile; \
else : ; fi; \
done; \
done
@$(POST_INSTALL)
@if (install-info --version && \
install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
done; \
else : ; fi
install-man: install-man1
installcheck-am:
maintainer-clean: maintainer-clean-am
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
maintainer-clean-generic maintainer-clean-vti
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti
uninstall-am: uninstall-info-am uninstall-man
uninstall-man: uninstall-man1
.PHONY: all all-am check check-am clean clean-generic dist-info \
distclean distclean-generic distdir dvi dvi-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-man1 install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-aminfo \
maintainer-clean-generic maintainer-clean-vti mostlyclean \
mostlyclean-aminfo mostlyclean-generic mostlyclean-vti \
uninstall uninstall-am uninstall-info-am uninstall-man \
uninstall-man1
refcard.dvi: refcard.tex
tex refcard.tex
refcard.ps: refcard.dvi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
+2 -2
View File
@@ -262,9 +262,9 @@ and so on.
.ns
.TP
.B \-\-debug
Output a definition of the macro
In the parser file, define the macro
.B YYDEBUG
into the parser file,
to 1 if it is not already defined,
so that the debugging facilities are compiled.
.TP
.B \-v
-145
View File
@@ -1,145 +0,0 @@
Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0b
à partir bison.texinfo.
START-INFO-DIR-ENTRY
* bison: (bison). GNU Project parser generator (yacc replacement).
END-INFO-DIR-ENTRY
This file documents the Bison parser generator.
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1998, 1999,
2000, 2001 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.
Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided also
that the sections entitled "GNU General Public License" and "Conditions
for Using Bison" are included exactly as in the original, and provided
that the entire resulting derived work is distributed under the terms
of a permission notice identical to this one.
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that the sections entitled "GNU General Public
License", "Conditions for Using Bison" and this permission notice may be
included in translations approved by the Free Software Foundation
instead of in the original English.

Indirect:
bison.info-1: 1313
bison.info-2: 50689
bison.info-3: 100579
bison.info-4: 150129
bison.info-5: 197906

Tag Table:
(Indirect)
Node: Top1313
Node: Introduction8968
Node: Conditions10242
Node: Copying11706
Node: Concepts30909
Node: Language and Grammar31988
Node: Grammar in Bison37004
Node: Semantic Values38928
Node: Semantic Actions41029
Node: Locations Overview42218
Node: Bison Parser43665
Node: Stages45977
Node: Grammar Layout47260
Node: Examples48517
Node: RPN Calc49715
Node: Rpcalc Decls50689
Node: Rpcalc Rules52276
Node: Rpcalc Input54076
Node: Rpcalc Line55537
Node: Rpcalc Expr56652
Node: Rpcalc Lexer58597
Node: Rpcalc Main61169
Node: Rpcalc Error61567
Node: Rpcalc Gen62575
Node: Rpcalc Compile63724
Node: Infix Calc64599
Node: Simple Error Recovery67306
Node: Location Tracking Calc69195
Node: Ltcalc Decls69925
Node: Ltcalc Rules70834
Node: Ltcalc Lexer72895
Node: Multi-function Calc75233
Node: Mfcalc Decl76800
Node: Mfcalc Rules78823
Node: Mfcalc Symtab80203
Node: Exercises86576
Node: Grammar File87082
Node: Grammar Outline87930
Node: C Declarations88664
Node: Bison Declarations89244
Node: Grammar Rules89656
Node: C Code90116
Node: Symbols91046
Node: Rules96127
Node: Recursion97766
Node: Semantics99485
Node: Value Type100579
Node: Multiple Types101251
Node: Actions102268
Node: Action Types105053
Node: Mid-Rule Actions106356
Node: Locations111926
Node: Location Type112574
Node: Actions and Locations113132
Node: Location Default Action115288
Node: Declarations116751
Node: Token Decl118070
Node: Precedence Decl120083
Node: Union Decl121634
Node: Type Decl122478
Node: Expect Decl123384
Node: Start Decl124930
Node: Pure Decl125308
Node: Decl Summary126985
Node: Multiple Parsers132368
Node: Interface133862
Node: Parser Function134734
Node: Lexical135569
Node: Calling Convention136975
Node: Token Values139746
Node: Token Positions140895
Node: Pure Calling141780
Node: Error Reporting144712
Node: Action Features146834
Node: Algorithm150129
Node: Look-Ahead152422
Node: Shift/Reduce154554
Node: Precedence157466
Node: Why Precedence158117
Node: Using Precedence159982
Node: Precedence Examples160950
Node: How Precedence161651
Node: Contextual Precedence162800
Node: Parser States164591
Node: Reduce/Reduce165834
Node: Mystery Conflicts169395
Node: Stack Overflow172781
Node: Error Recovery174154
Node: Context Dependency179290
Node: Semantic Tokens180138
Node: Lexical Tie-ins183155
Node: Tie-in Recovery184703
Node: Debugging186875
Node: Invocation190176
Node: Bison Options191428
Node: Environment Variables195396
Node: Option Cross Key196244
Node: VMS Invocation197122
Node: Table of Symbols197906
Node: Glossary205545
Node: Copying This Manual211849
Node: GNU Free Documentation License212058
Node: Index231923

End Tag Table
-1076
View File
File diff suppressed because it is too large Load Diff
-1427
View File
File diff suppressed because it is too large Load Diff
-1317
View File
File diff suppressed because it is too large Load Diff
-1261
View File
File diff suppressed because it is too large Load Diff
-1036
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -56,7 +56,8 @@ foo_tab.c.
.indent -1
2 /DEBUG
.skip
Output a definition of the macro YYDEBUG into the parser file,
In the parser file,
define the macro YYDEBUG to 1 if it is not already defined,
so that the debugging facilities are compiled.
.skip
.indent -1
+294 -198
View File
@@ -304,6 +304,8 @@ Invoking Bison
* Bison Options:: All the options described in detail,
in alphabetical order by short options.
* Option Cross Key:: Alphabetical list of long options.
* Extension Limitations Under DOS:: Bison output files extension differences
depending on the DOS/Windows file system flavour used.
* VMS Invocation:: Bison command syntax on VMS.
Copying This Manual
@@ -447,16 +449,26 @@ lexicography, not grammar.)
Here is a simple C function subdivided into tokens:
@ifinfo
@example
int /* @r{keyword `int'} */
square (x) /* @r{identifier, open-paren,} */
/* @r{identifier, close-paren} */
int x; /* @r{keyword `int', identifier, semicolon} */
square (int x) /* @r{identifier, open-paren, identifier,}
@r{identifier, close-paren} */
@{ /* @r{open-brace} */
return x * x; /* @r{keyword `return', identifier,} */
/* @r{asterisk, identifier, semicolon} */
return x * x; /* @r{keyword `return', identifier, asterisk,
identifier, semicolon} */
@} /* @r{close-brace} */
@end example
@end ifinfo
@ifnotinfo
@example
int /* @r{keyword `int'} */
square (int x) /* @r{identifier, open-paren, identifier, identifier, close-paren} */
@{ /* @r{open-brace} */
return x * x; /* @r{keyword `return', identifier, asterisk, identifier, semicolon} */
@} /* @r{close-brace} */
@end example
@end ifnotinfo
The syntactic groupings of C include the expression, the statement, the
declaration, and the function definition. These are represented in the
@@ -683,7 +695,7 @@ arrange for it to call @code{yyparse} or the parser will never run.
@xref{Interface, ,Parser C-Language Interface}.
Aside from the token type names and the symbols in the actions you
write, all variable and function names used in the Bison parser file
write, all symbols defined in the Bison parser file itself
begin with @samp{yy} or @samp{YY}. This includes interface functions
such as the lexical analyzer function @code{yylex}, the error reporting
function @code{yyerror} and the parser function @code{yyparse} itself.
@@ -692,6 +704,14 @@ Therefore, you should avoid using C identifiers starting with @samp{yy}
or @samp{YY} in the Bison grammar file except for the ones defined in
this manual.
In some cases the Bison parser file includes system headers, and in
those cases your code should respect the identifiers reserved by those
headers. On some non-@sc{gnu} hosts, @code{<alloca.h>},
@code{<stddef.h>}, and @code{<stdlib.h>} are included as needed to
declare memory allocators and related types.
Other system headers may be included if you define @code{YYDEBUG} to a
nonzero value (@pxref{Debugging, ,Debugging Your Parser}).
@node Stages
@section Stages in Using Bison
@cindex stages in using Bison
@@ -855,11 +875,12 @@ The C declarations section (@pxref{C Declarations, ,The C Declarations Section})
preprocessor directives.
The @code{#define} directive defines the macro @code{YYSTYPE}, thus
specifying the C data type for semantic values of both tokens and groupings
(@pxref{Value Type, ,Data Types of Semantic Values}). The Bison parser will use whatever type
@code{YYSTYPE} is defined as; if you don't define it, @code{int} is the
default. Because we specify @code{double}, each token and each expression
has an associated value, which is a floating point number.
specifying the C data type for semantic values of both tokens and
groupings (@pxref{Value Type, ,Data Types of Semantic Values}). The
Bison parser will use whatever type @code{YYSTYPE} is defined as; if you
don't define it, @code{int} is the default. Because we specify
@code{double}, each token and each expression has an associated value,
which is a floating point number.
The @code{#include} directive is used to declare the exponentiation
function @code{pow}.
@@ -1066,10 +1087,11 @@ token type is an identifier, that identifier is defined by Bison as a C
macro whose definition is the appropriate number. In this example,
therefore, @code{NUM} becomes a macro for @code{yylex} to use.
The semantic value of the token (if it has one) is stored into the global
variable @code{yylval}, which is where the Bison parser will look for it.
(The C data type of @code{yylval} is @code{YYSTYPE}, which was defined
at the beginning of the grammar; @pxref{Rpcalc Decls, ,Declarations for @code{rpcalc}}.)
The semantic value of the token (if it has one) is stored into the
global variable @code{yylval}, which is where the Bison parser will look
for it. (The C data type of @code{yylval} is @code{YYSTYPE}, which was
defined at the beginning of the grammar; @pxref{Rpcalc Decls,
,Declarations for @code{rpcalc}}.)
A token type code of zero is returned if the end-of-file is encountered.
(Bison recognizes any nonpositive value as indicating the end of the
@@ -1202,19 +1224,19 @@ Here is how to compile and run the parser file:
@example
@group
# @r{List files in current directory.}
% ls
$ @kbd{ls}
rpcalc.tab.c rpcalc.y
@end group
@group
# @r{Compile the Bison parser.}
# @r{@samp{-lm} tells compiler to search math library for @code{pow}.}
% cc rpcalc.tab.c -lm -o rpcalc
$ @kbd{cc rpcalc.tab.c -lm -o rpcalc}
@end group
@group
# @r{List files again.}
% ls
$ @kbd{ls}
rpcalc rpcalc.tab.c rpcalc.y
@end group
@end example
@@ -1223,19 +1245,19 @@ The file @file{rpcalc} now contains the executable code. Here is an
example session using @code{rpcalc}.
@example
% rpcalc
4 9 +
$ @kbd{rpcalc}
@kbd{4 9 +}
13
3 7 + 3 4 5 *+-
@kbd{3 7 + 3 4 5 *+-}
-13
3 7 + 3 4 5 * + - n @r{Note the unary minus, @samp{n}}
@kbd{3 7 + 3 4 5 * + - n} @r{Note the unary minus, @samp{n}}
13
5 6 / 4 n +
@kbd{5 6 / 4 n +}
-3.166666667
3 4 ^ @r{Exponentiation}
@kbd{3 4 ^} @r{Exponentiation}
81
^D @r{End-of-file indicator}
%
@kbd{^D} @r{End-of-file indicator}
$
@end example
@node Infix Calc
@@ -1315,12 +1337,12 @@ Here is a sample run of @file{calc.y}:
@need 500
@example
% calc
4 + 4.5 - (34/(8*3+-3))
$ @kbd{calc}
@kbd{4 + 4.5 - (34/(8*3+-3))}
6.880952381
-56 + 2
@kbd{-56 + 2}
-54
3 ^ 2
@kbd{3 ^ 2}
9
@end example
@@ -1372,13 +1394,11 @@ Bison programs.
@cindex @code{ltcalc}
@cindex calculator, location tracking
This example extends the infix notation calculator with location tracking.
This feature will be used to improve error reporting, and provide better
error messages.
For the sake of clarity, we will switch for this example to an integer
calculator, since most of the work needed to use locations will be done
in the lexical analyser.
This example extends the infix notation calculator with location
tracking. This feature will be used to improve the error messages. For
the sake of clarity, this example is a simple integer calculator, since
most of the work needed to use locations will be done in the lexical
analyser.
@menu
* Decls: Ltcalc Decls. Bison and C declarations for ltcalc.
@@ -1389,8 +1409,8 @@ in the lexical analyser.
@node Ltcalc Decls
@subsection Declarations for @code{ltcalc}
The C and Bison declarations for the location tracking calculator are the same
as the declarations for the infix notation calculator.
The C and Bison declarations for the location tracking calculator are
the same as the declarations for the infix notation calculator.
@example
/* Location tracking calculator. */
@@ -1411,22 +1431,24 @@ as the declarations for the infix notation calculator.
%% /* Grammar follows */
@end example
In the code above, there are no declarations specific to locations. Defining
a data type for storing locations is not needed: we will use the type provided
by default (@pxref{Location Type, ,Data Types of Locations}), which is a four
member structure with the following integer fields: @code{first_line},
@code{first_column}, @code{last_line} and @code{last_column}.
@noindent
Note there are no declarations specific to locations. Defining a data
type for storing locations is not needed: we will use the type provided
by default (@pxref{Location Type, ,Data Types of Locations}), which is a
four member structure with the following integer fields:
@code{first_line}, @code{first_column}, @code{last_line} and
@code{last_column}.
@node Ltcalc Rules
@subsection Grammar Rules for @code{ltcalc}
Whether you choose to handle locations or not has no effect on the syntax of
your language. Therefore, grammar rules for this example will be very close to
those of the previous example: we will only modify them to benefit from the new
informations we will have.
Whether handling locations or not has no effect on the syntax of your
language. Therefore, grammar rules for this example will be very close
to those of the previous example: we will only modify them to benefit
from the new information.
Here, we will use locations to report divisions by zero, and locate the wrong
expressions or subexpressions.
Here, we will use locations to report divisions by zero, and locate the
wrong expressions or subexpressions.
@example
@group
@@ -1447,17 +1469,17 @@ exp : NUM @{ $$ = $1; @}
| exp '-' exp @{ $$ = $1 - $3; @}
| exp '*' exp @{ $$ = $1 * $3; @}
@end group
| exp '/' exp
@group
| exp '/' exp
@{
if ($3)
$$ = $1 / $3;
else
@{
$$ = 1;
printf("Division by zero, l%d,c%d-l%d,c%d",
@@3.first_line, @@3.first_column,
@@3.last_line, @@3.last_column);
fprintf (stderr, "%d.%d-%d.%d: division by zero",
@@3.first_line, @@3.first_column,
@@3.last_line, @@3.last_column);
@}
@}
@end group
@@ -1472,25 +1494,24 @@ This code shows how to reach locations inside of semantic actions, by
using the pseudo-variables @code{@@@var{n}} for rule components, and the
pseudo-variable @code{@@$} for groupings.
In this example, we never assign a value to @code{@@$}, because the
output parser can do this automatically. By default, before executing
the C code of each action, @code{@@$} is set to range from the beginning
of @code{@@1} to the end of @code{@@@var{n}}, for a rule with @var{n}
components.
Of course, this behavior can be redefined (@pxref{Location Default
Action, , Default Action for Locations}), and for very specific rules,
@code{@@$} can be computed by hand.
We don't need to assign a value to @code{@@$}: the output parser does it
automatically. By default, before executing the C code of each action,
@code{@@$} is set to range from the beginning of @code{@@1} to the end
of @code{@@@var{n}}, for a rule with @var{n} components. This behavior
can be redefined (@pxref{Location Default Action, , Default Action for
Locations}), and for very specific rules, @code{@@$} can be computed by
hand.
@node Ltcalc Lexer
@subsection The @code{ltcalc} Lexical Analyzer.
Until now, we relied on Bison's defaults to enable location tracking. The next
step is to rewrite the lexical analyser, and make it able to feed the parser
with locations of tokens, as he already does for semantic values.
Until now, we relied on Bison's defaults to enable location
tracking. The next step is to rewrite the lexical analyser, and make it
able to feed the parser with the token locations, as it already does for
semantic values.
To do so, we must take into account every single character of the input text,
to avoid the computed locations of being fuzzy or wrong:
To this end, we must take into account every single character of the
input text, to avoid the computed locations of being fuzzy or wrong:
@example
@group
@@ -1540,17 +1561,18 @@ yylex (void)
@}
@end example
Basically, the lexical analyzer does the same processing as before: it skips
blanks and tabs, and reads numbers or single-character tokens. In addition
to this, it updates the @code{yylloc} global variable (of type @code{YYLTYPE}),
where the location of tokens is stored.
Basically, the lexical analyzer performs the same processing as before:
it skips blanks and tabs, and reads numbers or single-character tokens.
In addition, it updates @code{yylloc}, the global variable (of type
@code{YYLTYPE}) containing the token's location.
Now, each time this function returns a token, the parser has it's number as
well as it's semantic value, and it's position in the text. The last needed
change is to initialize @code{yylloc}, for example in the controlling
function:
Now, each time this function returns a token, the parser has its number
as well as its semantic value, and its location in the text. The last
needed change is to initialize @code{yylloc}, for example in the
controlling function:
@example
@group
int
main (void)
@{
@@ -1558,11 +1580,12 @@ main (void)
yylloc.first_column = yylloc.last_column = 0;
return yyparse ();
@}
@end group
@end example
Remember that computing locations is not a matter of syntax. Every character
must be associated to a location update, whether it is in valid input, in
comments, in literal strings, and so on...
Remember that computing locations is not a matter of syntax. Every
character must be associated to a location update, whether it is in
valid input, in comments, in literal strings, and so on.
@node Multi-function Calc
@section Multi-Function Calculator: @code{mfcalc}
@@ -1592,20 +1615,20 @@ to create named variables, store values in them, and use them later.
Here is a sample session with the multi-function calculator:
@example
% mfcalc
pi = 3.141592653589
$ @kbd{mfcalc}
@kbd{pi = 3.141592653589}
3.1415926536
sin(pi)
@kbd{sin(pi)}
0.0000000000
alpha = beta1 = 2.3
@kbd{alpha = beta1 = 2.3}
2.3000000000
alpha
@kbd{alpha}
2.3000000000
ln(alpha)
@kbd{ln(alpha)}
0.8329091229
exp(ln(beta1))
@kbd{exp(ln(beta1))}
2.3000000000
%
$
@end example
Note that multiple assignment and nested function calls are permitted.
@@ -2374,7 +2397,8 @@ the numbers associated with @var{x} and @var{y}.
In a simple program it may be sufficient to use the same data type for
the semantic values of all language constructs. This was true in the
RPN and infix calculator examples (@pxref{RPN Calc, ,Reverse Polish Notation Calculator}).
RPN and infix calculator examples (@pxref{RPN Calc, ,Reverse Polish
Notation Calculator}).
Bison's default is to use type @code{int} for all semantic values. To
specify some other type, define @code{YYSTYPE} as a macro, like this:
@@ -3067,11 +3091,11 @@ terminal symbol. All kinds of token declarations allow
@findex %expect
Bison normally warns if there are any conflicts in the grammar
(@pxref{Shift/Reduce, ,Shift/Reduce Conflicts}), but most real grammars have harmless shift/reduce
conflicts which are resolved in a predictable way and would be difficult to
eliminate. It is desirable to suppress the warning about these conflicts
unless the number of conflicts changes. You can do this with the
@code{%expect} declaration.
(@pxref{Shift/Reduce, ,Shift/Reduce Conflicts}), but most real grammars
have harmless shift/reduce conflicts which are resolved in a predictable
way and would be difficult to eliminate. It is desirable to suppress
the warning about these conflicts unless the number of conflicts
changes. You can do this with the @code{%expect} declaration.
The declaration looks like this:
@@ -3079,10 +3103,11 @@ The declaration looks like this:
%expect @var{n}
@end example
Here @var{n} is a decimal integer. The declaration says there should be no
warning if there are @var{n} shift/reduce conflicts and no reduce/reduce
conflicts. The usual warning is given if there are either more or fewer
conflicts, or if there are any reduce/reduce conflicts.
Here @var{n} is a decimal integer. The declaration says there should be
no warning if there are @var{n} shift/reduce conflicts and no
reduce/reduce conflicts. An error, instead of the usual warning, is
given if there are either more or fewer conflicts, or if there are any
reduce/reduce conflicts.
In general, using @code{%expect} involves these steps:
@@ -3167,7 +3192,7 @@ valid grammar.
@cindex declaration summary
@cindex summary, Bison declaration
Here is a summary of all Bison declarations:
Here is a summary of the declarations used to define a grammar:
@table @code
@item %union
@@ -3202,44 +3227,18 @@ Start-Symbol}).
@item %expect
Declare the expected number of shift-reduce conflicts
(@pxref{Expect Decl, ,Suppressing Conflict Warnings}).
@end table
@item %yacc
@itemx %fixed_output_files
Pretend the option @option{--yacc} was given, i.e., imitate Yacc,
including its naming conventions. @xref{Bison Options}, for more.
@item %locations
Generate the code processing the locations (@pxref{Action Features,
,Special Features for Use in Actions}). This mode is enabled as soon as
the grammar uses the special @samp{@@@var{n}} tokens, but if your
grammar does not use it, using @samp{%locations} allows for more
accurate parse error messages.
@item %pure_parser
Request a pure (reentrant) parser program (@pxref{Pure Decl, ,A Pure
(Reentrant) Parser}).
@item %no_parser
Do not include any C code in the parser file; generate tables only. The
parser file contains just @code{#define} directives and static variable
declarations.
This option also tells Bison to write the C code for the grammar actions
into a file named @file{@var{filename}.act}, in the form of a
brace-surrounded body fit for a @code{switch} statement.
@item %no_lines
Don't generate any @code{#line} preprocessor commands in the parser
file. Ordinarily Bison writes these commands in the parser file so that
the C compiler and debuggers will associate errors and object code with
your source file (the grammar file). This directive causes them to
associate errors with the parser file, treating it an independent source
file in its own right.
@sp 1
@noindent
In order to change the behavior of @command{bison}, use the following
directives:
@table @code
@item %debug
Output a definition of the macro @code{YYDEBUG} into the parser file, so
that the debugging facilities are compiled. @xref{Debugging, ,Debugging
Your Parser}.
In the parser file, define the macro @code{YYDEBUG} to 1 if it is not
already defined, so that the debugging facilities are compiled.
@xref{Debugging, ,Debugging Your Parser}.
@item %defines
Write an extra output file containing macro definitions for the token
@@ -3254,35 +3253,64 @@ This output file is essential if you wish to put the definition of
be able to refer to token type codes and the variable
@code{yylval}. @xref{Token Values, ,Semantic Values of Tokens}.@refill
@item %file-prefix="@var{prefix}"
Specify a prefix to use for all Bison output file names. The names are
chosen as if the input file were named @file{@var{prefix}.y}.
@c @item %header_extension
@c Specify the extension of the parser header file generated when
@c @code{%define} or @samp{-d} are used.
@c
@c For example, a grammar file named @file{foo.ypp} and containing a
@c @code{%header_extension .hh} directive will produce a header file
@c named @file{foo.tab.hh}
@item %locations
Generate the code processing the locations (@pxref{Action Features,
,Special Features for Use in Actions}). This mode is enabled as soon as
the grammar uses the special @samp{@@@var{n}} tokens, but if your
grammar does not use it, using @samp{%locations} allows for more
accurate parse error messages.
@item %name-prefix="@var{prefix}"
Rename the external symbols used in the parser so that they start with
@var{prefix} instead of @samp{yy}. The precise list of symbols renamed
is @code{yyparse}, @code{yylex}, @code{yyerror}, @code{yynerrs},
@code{yylval}, @code{yychar} and @code{yydebug}. For example, if you
use @samp{%name-prefix="c_"}, the names become @code{c_parse},
@code{c_lex}, and so on. @xref{Multiple Parsers, ,Multiple Parsers in
the Same Program}.
@item %no-parser
Do not include any C code in the parser file; generate tables only. The
parser file contains just @code{#define} directives and static variable
declarations.
This option also tells Bison to write the C code for the grammar actions
into a file named @file{@var{filename}.act}, in the form of a
brace-surrounded body fit for a @code{switch} statement.
@item %no-lines
Don't generate any @code{#line} preprocessor commands in the parser
file. Ordinarily Bison writes these commands in the parser file so that
the C compiler and debuggers will associate errors and object code with
your source file (the grammar file). This directive causes them to
associate errors with the parser file, treating it an independent source
file in its own right.
@item %output="@var{filename}"
Specify the @var{filename} for the parser file.
@item %pure-parser
Request a pure (reentrant) parser program (@pxref{Pure Decl, ,A Pure
(Reentrant) Parser}).
@c @item %source_extension
@c Specify the extension of the parser output file.
@c
@c For example, a grammar file named @file{foo.yy} and containing a
@c @code{%source_extension .cpp} directive will produce a parser file
@c named @file{foo.tab.cpp}
@c
@c @item %header_extension
@c Specify the extension of the parser header file generated when
@c @code{%define} or @samp{-d} are used.
@c
@c For example, a garmmar file named @file{foo.ypp} and containing a
@c @code{%header_extension .hh} directive will produce a header file
@c named @file{foo.tab.hh}
@item %verbose
Write an extra output file containing verbose descriptions of the
parser states and what is done for each type of look-ahead token in
that state.
This file also describes all the conflicts, both those resolved by
operator precedence and the unresolved ones.
The file's name is made by removing @samp{.tab.c} or @samp{.c} from
the parser output file name, and adding @samp{.output} instead.@refill
Therefore, if the input file is @file{foo.y}, then the parser file is
called @file{foo.tab.c} by default. As a consequence, the verbose
output file is called @file{foo.output}.@refill
@item %token_table
Generate an array of token names in the parser file. The name of the
@@ -3316,8 +3344,31 @@ The number of grammar rules,
@item YYNSTATES
The number of parser states (@pxref{Parser States}).
@end table
@item %verbose
Write an extra output file containing verbose descriptions of the
parser states and what is done for each type of look-ahead token in
that state.
This file also describes all the conflicts, both those resolved by
operator precedence and the unresolved ones.
The file's name is made by removing @samp{.tab.c} or @samp{.c} from
the parser output file name, and adding @samp{.output} instead.@refill
Therefore, if the input file is @file{foo.y}, then the parser file is
called @file{foo.tab.c} by default. As a consequence, the verbose
output file is called @file{foo.output}.@refill
@item %yacc
@itemx %fixed-output-files
Pretend the option @option{--yacc} was given, i.e., imitate Yacc,
including its naming conventions. @xref{Bison Options}, for more.
@end table
@node Multiple Parsers
@section Multiple Parsers in the Same Program
@@ -4875,15 +4926,21 @@ If a Bison grammar compiles properly but doesn't do what you want when it
runs, the @code{yydebug} parser-trace feature can help you figure out why.
To enable compilation of trace facilities, you must define the macro
@code{YYDEBUG} when you compile the parser. You could use
@samp{-DYYDEBUG=1} as a compiler option or you could put @samp{#define
YYDEBUG 1} in the C declarations section of the grammar file
(@pxref{C Declarations, ,The C Declarations Section}). Alternatively, use the @samp{-t} option when
you run Bison (@pxref{Invocation, ,Invoking Bison}). We always define @code{YYDEBUG} so that
debugging is always possible.
@code{YYDEBUG} to a nonzero value when you compile the parser. You
could use @samp{-DYYDEBUG=1} as a compiler option or you could put
@samp{#define YYDEBUG 1} in the C declarations section of the grammar
file (@pxref{C Declarations, ,The C Declarations Section}).
Alternatively, use the @samp{-t} option when you run Bison
(@pxref{Invocation, ,Invoking Bison}) or the @code{%debug} declaration
(@pxref{Decl Summary, ,Bison Declaration Summary}). We suggest that
you always define @code{YYDEBUG} so that debugging is always possible.
The trace facility uses @code{stderr}, so you must add @w{@code{#include
<stdio.h>}} to the C declarations section unless it is already there.
The trace facility outputs messages with macro calls of the form
@code{YYFPRINTF (stderr, @var{format}, @var{args})} where
@var{format} and @var{args} are the usual @code{printf} format and
arguments. If you define @code{YYDEBUG} to a nonzero value but do not
define @code{YYFPRINTF}, @code{<stdio.h>} is automatically included
and @code{YYPRINTF} is defined to @code{fprintf}.
Once you have compiled the program with trace facilities, the way to
request a trace is to store a nonzero value in the variable @code{yydebug}.
@@ -4962,7 +5019,7 @@ Here @var{infile} is the grammar file name, which usually ends in
@samp{.y}. The parser file's name is made by replacing the @samp{.y}
with @samp{.tab.c}. Thus, the @samp{bison foo.y} filename yields
@file{foo.tab.c}, and the @samp{bison hack/foo.y} filename yields
@file{hack/foo.tab.c}. It's is also possible, in case you are writting
@file{hack/foo.tab.c}. It's is also possible, in case you are writing
C++ code instead of C in your grammar file, to name it @file{foo.ypp}
or @file{foo.y++}. Then, the output files will take an extention like
the given one as input (repectively @file{foo.tab.cpp} and @file{foo.tab.c++}).
@@ -4989,6 +5046,8 @@ will produce @file{output.c++} and @file{outfile.h++}.
in alphabetical order by short options.
* Environment Variables:: Variables which affect Bison execution.
* Option Cross Key:: Alphabetical list of long options.
* Extension Limitations Under DOS:: Bison output files extension differences
depending on the DOS/Windows file system flavour used.
* VMS Invocation:: Bison command syntax on VMS.
@end menu
@@ -5044,24 +5103,17 @@ you are developing Bison.
@item -t
@itemx --debug
Output a definition of the macro @code{YYDEBUG} into the parser file, so
that the debugging facilities are compiled. @xref{Debugging, ,Debugging
Your Parser}.
In the parser file, define the macro @code{YYDEBUG} to 1 if it is not
already defined, so that the debugging facilities are compiled.
@xref{Debugging, ,Debugging Your Parser}.
@item --locations
Pretend that @code{%locactions} was specified. @xref{Decl Summary}.
Pretend that @code{%locations} was specified. @xref{Decl Summary}.
@item -p @var{prefix}
@itemx --name-prefix=@var{prefix}
Rename the external symbols used in the parser so that they start with
@var{prefix} instead of @samp{yy}. The precise list of symbols renamed
is @code{yyparse}, @code{yylex}, @code{yyerror}, @code{yynerrs},
@code{yylval}, @code{yychar} and @code{yydebug}.
For example, if you use @samp{-p c}, the names become @code{cparse},
@code{clex}, and so on.
@xref{Multiple Parsers, ,Multiple Parsers in the Same Program}.
Pretend that @code{%name-prefix="@var{prefix}"} was specified.
@xref{Decl Summary}.
@item -l
@itemx --no-lines
@@ -5073,11 +5125,11 @@ parser file, treating it as an independent source file in its own right.
@item -n
@itemx --no-parser
Pretend that @code{%no_parser} was specified. @xref{Decl Summary}.
Pretend that @code{%no-parser} was specified. @xref{Decl Summary}.
@item -k
@itemx --token-table
Pretend that @code{%token_table} was specified. @xref{Decl Summary}.
Pretend that @code{%token-table} was specified. @xref{Decl Summary}.
@end table
@noindent
@@ -5085,33 +5137,32 @@ Adjust the output:
@table @option
@item -d
Pretend that @code{%verbose} was specified, i.e., write an extra output
@itemx --defines
Pretend that @code{%defines} was specified, i.e., write an extra output
file containing macro definitions for the token type names defined in
the grammar and the semantic value type @code{YYSTYPE}, as well as a few
@code{extern} variable declarations. @xref{Decl Summary}.
@item --defines=@var{defines-file}
The behaviour of @var{--defines} is the same than @samp{-d}. The only
difference is that it has an optionnal argument which is the name of
the output filename.
Same as above, but save in the file @var{defines-file}.
@item -b @var{file-prefix}
@itemx --file-prefix=@var{prefix}
Specify a prefix to use for all Bison output file names. The names are
chosen as if the input file were named @file{@var{prefix}.c}.
Pretend that @code{%verbose} was specified, i.e, specify prefix to use
for all Bison output file names. @xref{Decl Summary}.
@item -v
@itemx --verbose
Pretend that @code{%verbose} was specified, i.e, write an extra output
file containing verbose descriptions of the grammar and
parser. @xref{Decl Summary}, for more.
parser. @xref{Decl Summary}.
@item -o @var{outfile}
@itemx --output-file=@var{outfile}
Specify the name @var{outfile} for the parser file.
@item -o @var{filename}
@itemx --output=@var{filename}
Specify the @var{filename} for the parser file.
The other output files' names are constructed from @var{outfile}
as described under the @samp{-v} and @samp{-d} options.
The other output files' names are constructed from @var{filename} as
described under the @samp{-v} and @samp{-d} options.
@item -g
Output a VCG definition of the LALR(1) grammar automaton computed by
@@ -5119,7 +5170,7 @@ Bison. If the grammar file is @file{foo.y}, the VCG output file will
be @file{foo.vcg}.
@item --graph=@var{graph-file}
The behaviour of @var{--graph} is the same than @samp{-g}. The only
The behaviour of @var{--graph} is the same than @samp{-g}. The only
difference is that it has an optionnal argument which is the name of
the output graph filename.
@end table
@@ -5168,7 +5219,7 @@ the corresponding short option.
\line{ --name-prefix \leaderfill -p}
\line{ --no-lines \leaderfill -l}
\line{ --no-parser \leaderfill -n}
\line{ --output-file \leaderfill -o}
\line{ --output \leaderfill -o}
\line{ --token-table \leaderfill -k}
\line{ --verbose \leaderfill -v}
\line{ --version \leaderfill -V}
@@ -5187,13 +5238,47 @@ the corresponding short option.
--name-prefix=@var{prefix} -p @var{name-prefix}
--no-lines -l
--no-parser -n
--output-file=@var{outfile} -o @var{outfile}
--output=@var{outfile} -o @var{outfile}
--token-table -k
--verbose -v
--version -V
@end example
@end ifinfo
@node Extension Limitations Under DOS
@section Extension Limitations under DOS
@cindex extension limitations under DOS
@cindex DOS
On DOS/Windows 9X systems the file name extensions of the output files,
like @file{.tab.c}, that may be used depend on the file system in use.
The plain DOS file system has limited file name length, does not allow
the use of a set of certain illicit characters and does not allow more
than a single dot in the file name.
The DJGPP port of @code{bison} will detect at runtime if (LFN) long file
name support is available or not. LFN support will be available in a
DOS session under Windows 9X and successors. Windows NT 4.0 needs a
special LFN driver (@file{ntlfn08b.zip}) or later available at any
simtelnet mirror in the /v2misc dir) for proper LFN support in a DOS
session. If LFN support is available the DJGPP port of @code{bison}
will use the standard POSIX file name extensions of the output files.
If LFN support is not available, then the DJGPP port of @code{bison}
will use DOS specific file name extensions.
@noindent This table summarizes the used extensions:
@multitable @columnfractions 0.1 0.45 0.45
@item @tab LFN extension (Win9X) @tab SFN extension (plain DOS)
@item @tab @file{.tab.c} @tab @file{_tab.c}
@item @tab @file{.tab.h} @tab @file{_tab.h}
@item @tab @file{.tab.cpp} @tab @file{_tab.cpp}
@item @tab @file{.tab.hpp} @tab @file{_tab.hpp}
@item @tab @file{.output} @tab @file{.out}
@item @tab @file{.stype.h} @tab @file{.sth}
@item @tab @file{.guard.c} @tab @file{.guc}
@end multitable
@node VMS Invocation
@section Invoking Bison under VMS
@cindex invoking Bison under VMS
@@ -5361,6 +5446,10 @@ Equip the parser for debugging. @xref{Decl Summary}.
Bison declaration to create a header file meant for the scanner.
@xref{Decl Summary}.
@item %file-prefix="@var{prefix}"
Bison declaration to set tge prefix of the output files. @xref{Decl
Summary}.
@c @item %source_extension
@c Bison declaration to specify the generated parser output file extension.
@c @xref{Decl Summary}.
@@ -5373,7 +5462,10 @@ Bison declaration to create a header file meant for the scanner.
Bison declaration to assign left associativity to token(s).
@xref{Precedence Decl, ,Operator Precedence}.
@item %no_lines
@item %name-prefix="@var{prefix}"
Bison declaration to rename the external symbols. @xref{Decl Summary}.
@item %no-lines
Bison declaration to avoid generating @code{#line} directives in the
parser file. @xref{Decl Summary}.
@@ -5381,11 +5473,15 @@ parser file. @xref{Decl Summary}.
Bison declaration to assign non-associativity to token(s).
@xref{Precedence Decl, ,Operator Precedence}.
@item %output="@var{filename}"
Bison declaration to set the name of the parser file. @xref{Decl
Summary}.
@item %prec
Bison declaration to assign a precedence to a specific rule.
@xref{Contextual Precedence, ,Context-Dependent Precedence}.
@item %pure_parser
@item %pure-parser
Bison declaration to request a pure (reentrant) parser.
@xref{Pure Decl, ,A Pure (Reentrant) Parser}.
@@ -5400,7 +5496,7 @@ Bison declaration to specify the start symbol. @xref{Start Decl, ,The Start-Sym
Bison declaration to declare token(s) without specifying precedence.
@xref{Token Decl, ,Token Type Names}.
@item %token_table
@item %token-table
Bison declaration to include a token name table in the parser file.
@xref{Decl Summary}.
+44 -38
View File
@@ -6,7 +6,7 @@
% This file can be printed with 1 or 2 columns per page (see below).
% Specify how many you want here. Nothing else needs to be changed
% unless you are maintaining the documentation.
% For printing reference cards to use in books, specify one column
% For printing reference cards to use in books, specify one column
% per page and reduce to 80%.
% Note that if columnsperpage is set to 2, there will be a few overfull
% boxes, but they are not serious. Just uncomment \finalout.
@@ -19,7 +19,7 @@
\def\finalout{\overfullrule=0pt}
%\finalout
% Copyright (c) 1998 Free Software Foundation, Inc.
% Copyright (c) 1998, 2001 Free Software Foundation, Inc.
%
% This file is part of Bison.
%
@@ -51,11 +51,11 @@
% Which mode to use is controlled by setting \columnsperpage above.
%
% Authors:
% Brendan Kehoe
% Brendan Kehoe
% UUCP: widener!brendan
% Internet: [email protected]
% Internet: [email protected]
%
% Gavin Nicol
% Gavin Nicol
% Internet: [email protected]
%
% This refcard format was created by Steve Gildea.
@@ -66,12 +66,12 @@
% We only change the following to change the version numbers and
% such.
\def\bisonversion{1.20} % the bison version
\def\bisonversion{1.31} % the bison version
\def\refcardversion{0.4a} % reference card version
\def\month{August} % month
\def\year{1998} % year
\def\version{\month\ \year, Bison Refcard Version \refcardversion}
\def\refcardversion{0.5} % reference card version
\def\month{November} % month
\def\year{2001} % year
\def\version{\month\ \year, Bison Refcard Version \refcardversion}
% for copyright notices
\def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip}
@@ -90,7 +90,7 @@
Permission is granted to make and distribute copies of this card
provided the copyright notice and this permission notice
are preserved on all copies.
are preserved on all copies.
\vskip .2\baselineskip
For information, write to the:
\vskip .2\baselineskip
@@ -115,7 +115,7 @@ For information, write to the:
Permission is granted to make and distribute copies of this card
provided the copyright notice and this permission notice
are preserved on all copies.
are preserved on all copies.
\vskip .2\baselineskip
For information, write to the:
\vskip .2\baselineskip
@@ -136,7 +136,7 @@ For information, write to the:
\def\ncolumns{\the\columnsperpage}
\message{[\ncolumns\space
\message{[\ncolumns\space
column\if 1\ncolumns\else s\fi\space per page]}
\def\scaledmag#1{ scaled \magstep #1}
@@ -227,7 +227,7 @@ For information, write to the:
\def\bye{\par\vfill\supereject
\if a\abc \else\null\vfill\eject\fi
\if a\abc \else\null\vfill\eject\fi
\end}
\end}
\fi
% we won't be using math mode much, so redefine some of the characters
@@ -316,41 +316,44 @@ Options can be used as: \kbd{bison {\it options} {\it filename}}
\section{Command Line Options}
%*****************************
\key{Display usage information.} {-h}
\key{Display version information.} {-V}
\key{Generate token and {\tt YYSTYPE} definitions.} {-d}
\key{Prepend a prefix to external symbols.} {-p {\it prefix}}
\key{Don't put {\tt \#line} directives in the parser.} {-l}
\key{Specify the output file.} {-o {\it filename}}
\key{Debug or {\it trace} mode.} {-t}
\key{Debug or {\it trace} mode.} {-t}
\key{Verbose description of the parser.} {-v}
\key{Emulate {\tt yacc} (generate {\tt y.tab.*} files).} {-y}
\vskip .10truein
{\bf Note:} The token and {\tt YYSTYPE} definitions are generated
to a file called {\tt y.tab.h} if the {\tt -y} option is used,
{\bf Note:} The token and {\tt YYSTYPE} definitions are generated
to a file called {\tt y.tab.h} if the {\tt -y} option is used,
otherwise it will have the format {\tt {\it name}.tab.h}, where
{\it name} is the leading part of the parser definition filename.
\section{Definitions}
%********************
\key{Declare a terminal symbol.}{\%token <{\it t\/}>
\key{Declare a terminal symbol.}{\%token <{\it t\/}>
{\it n}}
\key{Declare a terminal symbol, and define its association.}
\key{Declare a terminal symbol, and define its association.}
{{\it association} <{\it t\/}> {\it n}}
\vskip .2\baselineskip
\key{Generate a reentrant (pure) parser.}
\key{Generate a reentrant (pure) parser.}
{\%pure_parser}
\key{Define the union of all data types used in the parser.}
\key{Define the union of all data types used in the parser.}
{\%union\{{\it field list}\} }
\vskip .2\baselineskip
\key{Tell {\tt bison} where to start parsing.}
{\%start {\it m}}
\key{Tell {\tt bison} where to start parsing.}
{\%start {\it m}}
\key{Tell {\tt bison} the data type of symbols.}
{\%type <{\it t\/}> {\it s1}\dots{\it sn}}
\key{Tell {\tt bison} the data type of symbols.}
{\%type <{\it t\/}> {\it s1}\dots{\it sn}}
\vskip .10truein
@@ -362,8 +365,8 @@ definition, {\it n} is a {\it terminal} symbol name, {\it m} is a
\vskip .10truein
The {\tt <{\it t\/}>} after {\tt \%token, \%left, \%right} and {\tt
\%nonassoc} is optional. Additionally, precedence may be overridden with
embedded {\tt \%prec} commands.
\%nonassoc} is optional. Additionally, precedence may be overridden
in the rules with {\tt \%prec} commands.
\section{Parser Definition Files}
%*********************************
@@ -379,7 +382,7 @@ The general form for a parser definition is:
\%\%
Rule definition 1
Rule definition 1
\vdots
Rule definition {\it n}
@@ -397,8 +400,9 @@ The general form for a parser definition is:
Rules take the form:
\vskip -\baselineskip
\beginexample
non-terminal : {\it statement} 1
non-terminal : {\it statement} 1
| {\it statement} 2
\vdots
| {\it statement n}
@@ -406,12 +410,12 @@ Rules take the form:
\endexample
Where {\it statements} can be either empty, or contain
a mixture of C code (enclosed in {\tt \{...\}}), and the
a mixture of C code (enclosed in {\tt \{...\}}), and the
symbols that make up the non-terminal. For example:
\vskip -\baselineskip
\beginexample
expression : number '$+$' number \{ \$\$ $=$ \$1 $+$ \$3 \}
expression : number '$+$' number \{ \$\$ $=$ \$1 $+$ \$3 \}
| number '$-$' number \{ \$\$ $=$ \$1 $-$ \$3 \}
| number '$/$' number \{ \$\$ $=$ \$1 $/$ \$3 \}
| number '$*$' number \{ \$\$ $=$ \$1 $*$ \$3 \}
@@ -428,7 +432,7 @@ For altering the precedence of a symbol use:
For example:
\vskip -\baselineskip
\beginexample
foo : gnu bar gnu \%prec bar
foo : gnu bar gnu \%prec bar
;
\endexample
@@ -438,16 +442,18 @@ For example:
\key{Recognize an error \& continue parsing.}{error}
\key{Access data associated with a symbol.} {\$\$, \$0\dots\${\it n}}
\key{Access a field of the data union.} {\$\$.{\it t},
\$0.{\it t}\dots\${\it n}.{\it t}}
\key{Access data's line position.} {@{\it n}.{\it line\_spec}}
\key{Access data's column position.} {@{\it n}.{\it column\_spec}}
\$0.{\it t}\dots\${\it n}.{\it t}}
\key{Access symbol's location.} {@\$, @0\dots@{\it n}}
\key{Access data's line location.} {@{\it x}.{\it line\_spec}}
\key{Access data's column location.} {@{\it x}.{\it column\_spec}}
\vskip .10truein
%
Where {\it t} is a type defined in the {\tt \%union}, {\it n} is a
number, {\it line\_spec} one of {\tt first_line} and {\tt last_line},
and {\it column\_spec} is specified as either {\tt first_column} or {\tt
last_column}.
number, {\it x} is a number or \$, {\it line\_spec} one of {\tt
first_line} and {\tt last_line}, and {\it column\_spec} is specified
as either {\tt first_column} or {\tt last_column}.
\section {Variables and Types}
%*****************************
-4
View File
@@ -1,4 +0,0 @@
@set UPDATED 20 September 2001
@set UPDATED-MONTH September 2001
@set EDITION 1.30
@set VERSION 1.30
+4 -4
View File
@@ -1,4 +1,4 @@
@set UPDATED 20 September 2001
@set UPDATED-MONTH September 2001
@set EDITION 1.30
@set VERSION 1.30
@set UPDATED 25 February 2002
@set UPDATED-MONTH February 2002
@set EDITION 1.34
@set VERSION 1.34
+24 -8
View File
@@ -1,22 +1,38 @@
## Process this file with automake to produce Makefile.in -*-Makefile-*-
## Copyright 2001, 2002 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
## 02111-1307 USA
AUTOMAKE_OPTIONS = ansi2knr
CFLAGS = @CFLAGS@ $(WARNING_CFLAGS)
noinst_LIBRARIES = libbison.a
INCLUDES = -I.. -I$(srcdir) -I../intl
# Heck, we are still using an old version of Automake which does not
# understand LIBOBJ additions using $objext...
EXTRA_DIST = malloc.c realloc.c
# understand inner AC_LIBOBJ (i.e., from Autoconf itself, not from
# configure.in).
EXTRA_DIST = malloc.c realloc.c strnlen.c
libbison_a_SOURCES = \
error.c error.h \
basename.c dirname.h dirname.c \
getopt.h getopt.c getopt1.c \
obstack.h obstack.c \
quote.h quote.c quotearg.h quotearg.c \
xalloc.h xmalloc.c xstrdup.c
xalloc.h xmalloc.c xstrdup.c xstrndup.c
libbison_a_LIBADD = @LIBOBJS@
libbison_a_LIBADD = @LIBOBJS@ @ALLOCA@
libbison_a_DEPENDENCIES = $(libbison_a_LIBADD)
+95 -70
View File
@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.5a from Makefile.am.
# Makefile.in generated by automake 1.5c from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,7 +13,6 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -48,6 +47,7 @@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
@@ -84,43 +84,46 @@ INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIB = @LIB@
LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
WERROR_CFLAGS = @WERROR_CFLAGS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
AUTOMAKE_OPTIONS = ansi2knr
CFLAGS = @CFLAGS@ $(WARNING_CFLAGS)
noinst_LIBRARIES = libbison.a
INCLUDES = -I.. -I$(srcdir) -I../intl
# Heck, we are still using an old version of Automake which does not
# understand LIBOBJ additions using $objext...
EXTRA_DIST = malloc.c realloc.c
# understand inner AC_LIBOBJ (i.e., from Autoconf itself, not from
# configure.in).
EXTRA_DIST = malloc.c realloc.c strnlen.c
libbison_a_SOURCES = \
error.c error.h \
basename.c dirname.h dirname.c \
getopt.h getopt.c getopt1.c \
obstack.h obstack.c \
quote.h quote.c quotearg.h quotearg.c \
xalloc.h xmalloc.c xstrdup.c
xalloc.h xmalloc.c xstrdup.c xstrndup.c
libbison_a_LIBADD = @LIBOBJS@
libbison_a_LIBADD = @LIBOBJS@ @ALLOCA@
libbison_a_DEPENDENCIES = $(libbison_a_LIBADD)
subdir = lib
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
@@ -129,9 +132,10 @@ CONFIG_CLEAN_FILES =
LIBRARIES = $(noinst_LIBRARIES)
libbison_a_AR = $(AR) cru
am_libbison_a_OBJECTS = error$U.$(OBJEXT) getopt$U.$(OBJEXT) \
getopt1$U.$(OBJEXT) obstack$U.$(OBJEXT) quote$U.$(OBJEXT) \
quotearg$U.$(OBJEXT) xmalloc$U.$(OBJEXT) xstrdup$U.$(OBJEXT)
am_libbison_a_OBJECTS = basename$U.$(OBJEXT) dirname$U.$(OBJEXT) \
getopt$U.$(OBJEXT) getopt1$U.$(OBJEXT) quote$U.$(OBJEXT) \
quotearg$U.$(OBJEXT) xmalloc$U.$(OBJEXT) xstrdup$U.$(OBJEXT) \
xstrndup$U.$(OBJEXT)
libbison_a_OBJECTS = $(am_libbison_a_OBJECTS)
DEFS = @DEFS@
@@ -140,22 +144,25 @@ CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/error$U.Po $(DEPDIR)/getopt$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/getopt1$U.Po $(DEPDIR)/malloc.Po \
@AMDEP_TRUE@ $(DEPDIR)/memchr.Po $(DEPDIR)/obstack$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/quote$U.Po $(DEPDIR)/quotearg$U.Po \
am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/alloca.Po $(DEPDIR)/error.Po \
@AMDEP_TRUE@ $(DEPDIR)/malloc.Po $(DEPDIR)/memchr.Po \
@AMDEP_TRUE@ $(DEPDIR)/memrchr.Po $(DEPDIR)/obstack.Po \
@AMDEP_TRUE@ $(DEPDIR)/realloc.Po $(DEPDIR)/stpcpy.Po \
@AMDEP_TRUE@ $(DEPDIR)/strndup.Po $(DEPDIR)/strnlen.Po \
@AMDEP_TRUE@ $(DEPDIR)/strspn.Po $(DEPDIR)/xmalloc$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/xstrdup$U.Po
@AMDEP_TRUE@ $(DEPDIR)/strchr.Po $(DEPDIR)/strspn.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/basename$U.Po ./$(DEPDIR)/dirname$U.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/getopt$U.Po ./$(DEPDIR)/getopt1$U.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/quote$U.Po ./$(DEPDIR)/quotearg$U.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/xmalloc$U.Po ./$(DEPDIR)/xstrdup$U.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/xstrndup$U.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
CFLAGS = @CFLAGS@
DIST_SOURCES = $(libbison_a_SOURCES)
DIST_COMMON = Makefile.am Makefile.in ansi2knr.1 ansi2knr.c malloc.c \
memchr.c realloc.c stpcpy.c strndup.c strnlen.c strspn.c
DIST_COMMON = Makefile.am Makefile.in alloca.c ansi2knr.1 ansi2knr.c \
error.c error.h malloc.c memchr.c memrchr.c obstack.c obstack.h \
realloc.c stpcpy.c strchr.c strspn.c
SOURCES = $(libbison_a_SOURCES)
all: all-am
@@ -166,7 +173,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu lib/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
AR = ar
@@ -194,24 +201,28 @@ clean-krextra:
mostlyclean-kr:
-test "$U" = "" || rm -f *_.c
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/error$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt1$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/error.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/malloc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memchr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/obstack$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/quote$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/quotearg$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memrchr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/obstack.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/realloc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/stpcpy.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strndup.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strnlen.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strchr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strspn.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xmalloc$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xstrdup$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quote$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotearg$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrdup$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrndup$U.Po@am__quote@
distclean-depend:
-rm -rf $(DEPDIR)
-rm -rf $(DEPDIR) ./$(DEPDIR)
.c.o:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@@ -225,68 +236,79 @@ distclean-depend:
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(COMPILE) -c `cygpath -w $<`
CCDEPMODE = @CCDEPMODE@
alloca_.c: alloca.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/alloca.c; then echo $(srcdir)/alloca.c; else echo alloca.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > alloca_.c || rm -f alloca_.c
error_.c: error.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/error.c; then echo $(srcdir)/error.c; else echo error.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > error_.c || rm -f error_.c
alloca_.c: lib/alloca.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/alloca.c; then echo $(srcdir)/lib/alloca.c; else echo lib/alloca.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > alloca_.c || rm -f alloca_.c
basename_.c: basename.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/basename.c; then echo $(srcdir)/basename.c; else echo basename.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > basename_.c || rm -f basename_.c
dirname_.c: dirname.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dirname.c; then echo $(srcdir)/dirname.c; else echo dirname.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > dirname_.c || rm -f dirname_.c
error_.c: lib/error.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/error.c; then echo $(srcdir)/lib/error.c; else echo lib/error.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > error_.c || rm -f error_.c
getopt_.c: getopt.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt.c; then echo $(srcdir)/getopt.c; else echo getopt.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getopt_.c || rm -f getopt_.c
getopt1_.c: getopt1.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt1.c; then echo $(srcdir)/getopt1.c; else echo getopt1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getopt1_.c || rm -f getopt1_.c
malloc_.c: malloc.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/malloc.c; then echo $(srcdir)/malloc.c; else echo malloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > malloc_.c || rm -f malloc_.c
memchr_.c: memchr.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memchr.c; then echo $(srcdir)/memchr.c; else echo memchr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memchr_.c || rm -f memchr_.c
obstack_.c: obstack.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/obstack.c; then echo $(srcdir)/obstack.c; else echo obstack.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > obstack_.c || rm -f obstack_.c
malloc_.c: lib/malloc.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/malloc.c; then echo $(srcdir)/lib/malloc.c; else echo lib/malloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > malloc_.c || rm -f malloc_.c
memchr_.c: lib/memchr.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/memchr.c; then echo $(srcdir)/lib/memchr.c; else echo lib/memchr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memchr_.c || rm -f memchr_.c
memrchr_.c: lib/memrchr.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/memrchr.c; then echo $(srcdir)/lib/memrchr.c; else echo lib/memrchr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memrchr_.c || rm -f memrchr_.c
obstack_.c: lib/obstack.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/obstack.c; then echo $(srcdir)/lib/obstack.c; else echo lib/obstack.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > obstack_.c || rm -f obstack_.c
quote_.c: quote.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/quote.c; then echo $(srcdir)/quote.c; else echo quote.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > quote_.c || rm -f quote_.c
quotearg_.c: quotearg.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/quotearg.c; then echo $(srcdir)/quotearg.c; else echo quotearg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > quotearg_.c || rm -f quotearg_.c
realloc_.c: realloc.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/realloc.c; then echo $(srcdir)/realloc.c; else echo realloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > realloc_.c || rm -f realloc_.c
stpcpy_.c: stpcpy.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/stpcpy.c; then echo $(srcdir)/stpcpy.c; else echo stpcpy.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > stpcpy_.c || rm -f stpcpy_.c
strndup_.c: strndup.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strndup.c; then echo $(srcdir)/strndup.c; else echo strndup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strndup_.c || rm -f strndup_.c
strnlen_.c: strnlen.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strnlen.c; then echo $(srcdir)/strnlen.c; else echo strnlen.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strnlen_.c || rm -f strnlen_.c
strspn_.c: strspn.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strspn.c; then echo $(srcdir)/strspn.c; else echo strspn.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strspn_.c || rm -f strspn_.c
realloc_.c: lib/realloc.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/realloc.c; then echo $(srcdir)/lib/realloc.c; else echo lib/realloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > realloc_.c || rm -f realloc_.c
stpcpy_.c: lib/stpcpy.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/stpcpy.c; then echo $(srcdir)/lib/stpcpy.c; else echo lib/stpcpy.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > stpcpy_.c || rm -f stpcpy_.c
strchr_.c: lib/strchr.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/strchr.c; then echo $(srcdir)/lib/strchr.c; else echo lib/strchr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strchr_.c || rm -f strchr_.c
strspn_.c: lib/strspn.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/strspn.c; then echo $(srcdir)/lib/strspn.c; else echo lib/strspn.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strspn_.c || rm -f strspn_.c
xmalloc_.c: xmalloc.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xmalloc.c; then echo $(srcdir)/xmalloc.c; else echo xmalloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xmalloc_.c || rm -f xmalloc_.c
xstrdup_.c: xstrdup.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrdup.c; then echo $(srcdir)/xstrdup.c; else echo xstrdup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xstrdup_.c || rm -f xstrdup_.c
alloca_.$(OBJEXT) error_.$(OBJEXT) getopt_.$(OBJEXT) getopt1_.$(OBJEXT) \
malloc_.$(OBJEXT) memchr_.$(OBJEXT) obstack_.$(OBJEXT) quote_.$(OBJEXT) \
quotearg_.$(OBJEXT) realloc_.$(OBJEXT) stpcpy_.$(OBJEXT) \
strndup_.$(OBJEXT) strnlen_.$(OBJEXT) strspn_.$(OBJEXT) \
xmalloc_.$(OBJEXT) xstrdup_.$(OBJEXT) : $(ANSI2KNR)
xstrndup_.c: xstrndup.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrndup.c; then echo $(srcdir)/xstrndup.c; else echo xstrndup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xstrndup_.c || rm -f xstrndup_.c
alloca_.$(OBJEXT) basename_.$(OBJEXT) dirname_.$(OBJEXT) \
error_.$(OBJEXT) getopt_.$(OBJEXT) getopt1_.$(OBJEXT) malloc_.$(OBJEXT) \
memchr_.$(OBJEXT) memrchr_.$(OBJEXT) obstack_.$(OBJEXT) \
quote_.$(OBJEXT) quotearg_.$(OBJEXT) realloc_.$(OBJEXT) \
stpcpy_.$(OBJEXT) strchr_.$(OBJEXT) strspn_.$(OBJEXT) \
xmalloc_.$(OBJEXT) xstrdup_.$(OBJEXT) xstrndup_.$(OBJEXT) : $(ANSI2KNR)
uninstall-info-am:
ETAGS = etags
ETAGSFLAGS =
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique $(LISP)
mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
@@ -295,7 +317,6 @@ GTAGS:
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
@@ -303,13 +324,16 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
cp -pR $$d/$$file $(distdir)$$dir \
|| exit 1; \
else \
test -f $(distdir)/$$file \
@@ -334,6 +358,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
+66 -66
View File
@@ -22,18 +22,18 @@
your main control loop, etc. to force garbage collection. */
#ifdef HAVE_CONFIG_H
#include <config.h>
# include <config.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#if HAVE_STRING_H
# include <string.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#if HAVE_STDLIB_H
# include <stdlib.h>
#endif
#ifdef emacs
#include "blockinput.h"
# include "blockinput.h"
#endif
/* If compiling with GCC 2, this file's not needed. */
@@ -41,41 +41,41 @@
/* If someone has defined alloca as a macro,
there must be some other way alloca is supposed to work. */
#ifndef alloca
# ifndef alloca
#ifdef emacs
#ifdef static
# ifdef emacs
# ifdef static
/* actually, only want this if static is defined as ""
-- this is for usg, in which emacs must undefine static
in order to make unexec workable
*/
#ifndef STACK_DIRECTION
# ifndef STACK_DIRECTION
you
lose
-- must know STACK_DIRECTION at compile-time
#endif /* STACK_DIRECTION undefined */
#endif /* static */
#endif /* emacs */
# endif /* STACK_DIRECTION undefined */
# endif /* static */
# endif /* emacs */
/* If your stack is a linked list of frames, you have to
provide an "address metric" ADDRESS_FUNCTION macro. */
#if defined (CRAY) && defined (CRAY_STACKSEG_END)
# if defined (CRAY) && defined (CRAY_STACKSEG_END)
long i00afunc ();
#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
#else
#define ADDRESS_FUNCTION(arg) &(arg)
#endif
# define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
# else
# define ADDRESS_FUNCTION(arg) &(arg)
# endif
#if __STDC__
# if __STDC__
typedef void *pointer;
#else
# else
typedef char *pointer;
#endif
# endif
#ifndef NULL
#define NULL 0
#endif
# ifndef NULL
# define NULL 0
# endif
/* Different portions of Emacs need to call different versions of
malloc. The Emacs executable needs alloca to call xmalloc, because
@@ -83,13 +83,14 @@ typedef char *pointer;
hand, the utilities in lib-src need alloca to call malloc; some of
them are very simple, and don't have an xmalloc routine.
Non-Emacs programs expect this to call use xmalloc.
Non-Emacs programs expect this to call xmalloc.
Callers below should use malloc. */
#ifndef emacs
#define malloc xmalloc
#endif
# ifndef emacs
# undef malloc
# define malloc xmalloc
# endif
extern pointer malloc ();
/* Define STACK_DIRECTION if you know the direction of stack
@@ -100,18 +101,18 @@ extern pointer malloc ();
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
#ifndef STACK_DIRECTION
#define STACK_DIRECTION 0 /* Direction unknown. */
#endif
# ifndef STACK_DIRECTION
# define STACK_DIRECTION 0 /* Direction unknown. */
# endif
#if STACK_DIRECTION != 0
# if STACK_DIRECTION != 0
#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
# define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
#else /* STACK_DIRECTION == 0; need run-time code. */
# else /* STACK_DIRECTION == 0; need run-time code. */
static int stack_dir; /* 1 or -1 once known. */
#define STACK_DIR stack_dir
# define STACK_DIR stack_dir
static void
find_stack_direction ()
@@ -135,7 +136,7 @@ find_stack_direction ()
}
}
#endif /* STACK_DIRECTION == 0 */
# endif /* STACK_DIRECTION == 0 */
/* An "alloca header" is used to:
(a) chain together all alloca'ed blocks;
@@ -144,9 +145,9 @@ find_stack_direction ()
It is very important that sizeof(header) agree with malloc
alignment chunk size. The following default should work okay. */
#ifndef ALIGN_SIZE
#define ALIGN_SIZE sizeof(double)
#endif
# ifndef ALIGN_SIZE
# define ALIGN_SIZE sizeof(double)
# endif
typedef union hdr
{
@@ -168,16 +169,15 @@ static header *last_alloca_header = NULL; /* -> last alloca header. */
implementations of C, for example under Gould's UTX/32. */
pointer
alloca (size)
unsigned size;
alloca (size_t size)
{
auto char probe; /* Probes stack depth: */
register char *depth = ADDRESS_FUNCTION (probe);
#if STACK_DIRECTION == 0
# if STACK_DIRECTION == 0
if (STACK_DIR == 0) /* Unknown growth direction. */
find_stack_direction ();
#endif
# endif
/* Reclaim garbage, defined as all alloca'd storage that
was allocated from deeper in the stack than currently. */
@@ -185,9 +185,9 @@ alloca (size)
{
register header *hp; /* Traverses linked list. */
#ifdef emacs
# ifdef emacs
BLOCK_INPUT;
#endif
# endif
for (hp = last_alloca_header; hp != NULL;)
if ((STACK_DIR > 0 && hp->h.deep > depth)
@@ -204,9 +204,9 @@ alloca (size)
last_alloca_header = hp; /* -> last valid storage. */
#ifdef emacs
# ifdef emacs
UNBLOCK_INPUT;
#endif
# endif
}
if (size == 0)
@@ -232,15 +232,15 @@ alloca (size)
}
}
#if defined (CRAY) && defined (CRAY_STACKSEG_END)
# if defined (CRAY) && defined (CRAY_STACKSEG_END)
#ifdef DEBUG_I00AFUNC
#include <stdio.h>
#endif
# ifdef DEBUG_I00AFUNC
# include <stdio.h>
# endif
#ifndef CRAY_STACK
#define CRAY_STACK
#ifndef CRAY2
# ifndef CRAY_STACK
# define CRAY_STACK
# ifndef CRAY2
/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
struct stack_control_header
{
@@ -292,7 +292,7 @@ struct stack_segment_linkage
long sss7;
};
#else /* CRAY2 */
# else /* CRAY2 */
/* The following structure defines the vector of words
returned by the STKSTAT library routine. */
struct stk_stat
@@ -345,10 +345,10 @@ struct stk_trailer
long unknown14;
};
#endif /* CRAY2 */
#endif /* not CRAY_STACK */
# endif /* CRAY2 */
# endif /* not CRAY_STACK */
#ifdef CRAY2
# ifdef CRAY2
/* Determine a "stack measure" for an arbitrary ADDRESS.
I doubt that "lint" will like this much. */
@@ -419,7 +419,7 @@ i00afunc (long *address)
return (result);
}
#else /* not CRAY2 */
# else /* not CRAY2 */
/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
Determine the number of the cell within the stack,
given the address of the cell. The purpose of this
@@ -464,9 +464,9 @@ i00afunc (long address)
while (!(this_segment <= address && address <= stkl))
{
#ifdef DEBUG_I00AFUNC
# ifdef DEBUG_I00AFUNC
fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
#endif
# endif
if (pseg == 0)
break;
stkl = stkl - pseg;
@@ -485,9 +485,9 @@ i00afunc (long address)
while (pseg != 0)
{
#ifdef DEBUG_I00AFUNC
# ifdef DEBUG_I00AFUNC
fprintf (stderr, "%011o %011o\n", pseg, size);
#endif
# endif
stkl = stkl - pseg;
ssptr = (struct stack_segment_linkage *) stkl;
size = ssptr->sssize;
@@ -497,8 +497,8 @@ i00afunc (long address)
return (result);
}
#endif /* not CRAY2 */
#endif /* CRAY */
# endif /* not CRAY2 */
# endif /* CRAY */
#endif /* no alloca */
# endif /* no alloca */
#endif /* not GCC version 2 */
+71
View File
@@ -0,0 +1,71 @@
/* basename.c -- return the last element in a path
Copyright (C) 1990, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <assert.h>
#ifndef FILESYSTEM_PREFIX_LEN
# define FILESYSTEM_PREFIX_LEN(Filename) 0
#endif
#ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
#endif
#ifndef ISSLASH
# define ISSLASH(C) ((C) == '/')
#endif
char *base_name PARAMS ((char const *name));
/* In general, we can't use the builtin `basename' function if available,
since it has different meanings in different environments.
In some environments the builtin `basename' modifies its argument.
If NAME is all slashes, be sure to return `/'. */
char *
base_name (char const *name)
{
char const *base = name += FILESYSTEM_PREFIX_LEN (name);
int all_slashes = 1;
char const *p;
for (p = name; *p; p++)
{
if (ISSLASH (*p))
base = p + 1;
else
all_slashes = 0;
}
/* If NAME is all slashes, arrange to return `/'. */
if (*base == '\0' && ISSLASH (*name) && all_slashes)
--base;
/* Make sure the last byte is not a slash. */
assert (all_slashes || !ISSLASH (*(p - 1)));
return (char *) base;
}
+189
View File
@@ -0,0 +1,189 @@
/* dirname.c -- return all but the last element in a path
Copyright (C) 1990, 1998, 2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#if HAVE_CONFIG_H
# include <config.h>
#endif
#ifdef STDC_HEADERS
# include <stdlib.h>
#else
char *malloc ();
#endif
#if defined STDC_HEADERS || defined HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
# ifndef strrchr
# define strrchr rindex
# endif
#endif
#include <assert.h>
#ifndef HAVE_DECL_MEMRCHR
"this configure-time declaration test was not run"
#endif
#if !HAVE_DECL_MEMRCHR
void *memrchr ();
#endif
#include "dirname.h"
#ifndef FILESYSTEM_PREFIX_LEN
# define FILESYSTEM_PREFIX_LEN(Filename) 0
#endif
#ifndef ISSLASH
# define ISSLASH(C) ((C) == '/')
#endif
#define BACKSLASH_IS_PATH_SEPARATOR ISSLASH ('\\')
/* Return the length of `dirname (PATH)' and set *RESULT to point
to PATH or to `"."', as appropriate. Works properly even if
there are trailing slashes (by effectively ignoring them).
WARNING: This function doesn't work for cwd-relative names like
`a:foo' that are specified with a drive-letter prefix. That case
is handled in the caller. */
static size_t
dir_name_r (char const *path, char const **result)
{
char const *slash;
size_t length; /* Length of result, not including NUL. */
slash = strrchr (path, '/');
if (BACKSLASH_IS_PATH_SEPARATOR)
{
char const *b = strrchr (path, '\\');
if (b && slash < b)
slash = b;
}
/* If the last byte of PATH is a slash, decrement SLASH until it's
pointing at the leftmost in a sequence of trailing slashes. */
if (slash && slash[1] == 0)
{
while (path < slash && ISSLASH (slash[-1]))
{
--slash;
}
if (path < slash)
{
size_t len = slash - path;
slash = memrchr (path, '/', len);
if (BACKSLASH_IS_PATH_SEPARATOR)
{
char const *b = memrchr (path, '\\', len);
if (b && slash < b)
slash = b;
}
}
}
if (slash == 0)
{
/* File is in the current directory. */
length = FILESYSTEM_PREFIX_LEN (path);
if (length == 0)
{
path = ".";
length = 1;
}
}
else
{
/* Remove any trailing slashes from the result. If we have a
canonicalized "d:/path", leave alone the root case "d:/". */
char const *lim = path + FILESYSTEM_PREFIX_LEN (path);
while (lim < slash && ISSLASH (*slash))
--slash;
length = slash - path + 1;
}
*result = path;
return length;
}
/* Return the leading directories part of PATH,
allocated with malloc. If out of memory, return 0.
Works properly even if there are trailing slashes
(by effectively ignoring them). */
char *
dir_name (char const *path)
{
char const *result;
size_t length = dir_name_r (path, &result);
int append_dot = (length && length == FILESYSTEM_PREFIX_LEN (newpath));
char *newpath = (char *) malloc (length + append_dot + 1);
if (newpath == 0)
return 0;
strncpy (newpath, result, length);
/* If PATH is "d:foo", return "d:.", the CWD on drive d: */
if (append_dot)
newpath[length++] = '.';
newpath[length] = 0;
return newpath;
}
#ifdef TEST_DIRNAME
/*
Run the test like this (expect no output):
gcc -DHAVE_CONFIG_H -DTEST_DIRNAME -I.. -O -Wall memrchr.c dirname.c
sed -n '/^BEGIN-DATA$/,/^END-DATA$/p' dirname.c|grep -v DATA|./a.out
BEGIN-DATA
foo//// .
bar/foo//// bar
foo/ .
/ /
. .
a .
END-DATA
*/
# define MAX_BUFF_LEN 1024
# include <stdio.h>
# include <stdlib.h>
int
main ()
{
char buff[MAX_BUFF_LEN + 1];
buff[MAX_BUFF_LEN] = 0;
while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0])
{
char path[MAX_BUFF_LEN];
char expected_result[MAX_BUFF_LEN];
char const *result;
sscanf (buff, "%s %s", path, expected_result);
result = dir_name (path);
if (strcmp (result, expected_result))
printf ("%s: got %s, expected %s\n", path, result, expected_result);
}
exit (0);
}
#endif
+31
View File
@@ -0,0 +1,31 @@
/* Copyright (C) 1998 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef DIRNAME_H_
# define DIRNAME_H_ 1
# ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
# endif
char *
dir_name PARAMS ((const char *path));
#endif /* not DIRNAME_H_ */
+209
View File
@@ -0,0 +1,209 @@
/* memrchr -- find the last occurrence of a byte in a memory block
Copyright (C) 1991, 93, 96, 97, 99, 2000 Free Software Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund ([email protected]),
with help from Dan Sahlin ([email protected]) and
commentary by Jim Blandy ([email protected]);
adaptation to memchr suggested by Dick Karpinski ([email protected]),
and implemented by Roland McGrath ([email protected]).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdlib.h>
#undef __ptr_t
#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
# define __ptr_t void *
#else /* Not C++ or ANSI C. */
# define __ptr_t char *
#endif /* C++ or ANSI C. */
#if defined (_LIBC)
# include <string.h>
# include <memcopy.h>
#else
# define reg_char char
#endif
#if defined (HAVE_LIMITS_H) || defined (_LIBC)
# include <limits.h>
#endif
#define LONG_MAX_32_BITS 2147483647
#ifndef LONG_MAX
# define LONG_MAX LONG_MAX_32_BITS
#endif
#include <sys/types.h>
#undef __memrchr
#undef memrchr
#ifndef weak_alias
# define __memrchr memrchr
#endif
/* Search no more than N bytes of S for C. */
__ptr_t
__memrchr (s, c_in, n)
const __ptr_t s;
int c_in;
size_t n;
{
const unsigned char *char_ptr;
const unsigned long int *longword_ptr;
unsigned long int longword, magic_bits, charmask;
unsigned reg_char c;
c = (unsigned char) c_in;
/* Handle the last few characters by reading one character at a time.
Do this until CHAR_PTR is aligned on a longword boundary. */
for (char_ptr = (const unsigned char *) s + n;
n > 0 && ((unsigned long int) char_ptr
& (sizeof (longword) - 1)) != 0;
--n)
if (*--char_ptr == c)
return (__ptr_t) char_ptr;
/* All these elucidatory comments refer to 4-byte longwords,
but the theory applies equally well to 8-byte longwords. */
longword_ptr = (unsigned long int *) char_ptr;
/* Bits 31, 24, 16, and 8 of this number are zero. Call these bits
the "holes." Note that there is a hole just to the left of
each byte, with an extra at the end:
bits: 01111110 11111110 11111110 11111111
bytes: AAAAAAAA BBBBBBBB CCCCCCCC DDDDDDDD
The 1-bits make sure that carries propagate to the next 0-bit.
The 0-bits provide holes for carries to fall into. */
if (sizeof (longword) != 4 && sizeof (longword) != 8)
abort ();
#if LONG_MAX <= LONG_MAX_32_BITS
magic_bits = 0x7efefeff;
#else
magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff;
#endif
/* Set up a longword, each of whose bytes is C. */
charmask = c | (c << 8);
charmask |= charmask << 16;
#if LONG_MAX > LONG_MAX_32_BITS
charmask |= charmask << 32;
#endif
/* Instead of the traditional loop which tests each character,
we will test a longword at a time. The tricky part is testing
if *any of the four* bytes in the longword in question are zero. */
while (n >= sizeof (longword))
{
/* We tentatively exit the loop if adding MAGIC_BITS to
LONGWORD fails to change any of the hole bits of LONGWORD.
1) Is this safe? Will it catch all the zero bytes?
Suppose there is a byte with all zeros. Any carry bits
propagating from its left will fall into the hole at its
least significant bit and stop. Since there will be no
carry from its most significant bit, the LSB of the
byte to the left will be unchanged, and the zero will be
detected.
2) Is this worthwhile? Will it ignore everything except
zero bytes? Suppose every byte of LONGWORD has a bit set
somewhere. There will be a carry into bit 8. If bit 8
is set, this will carry into bit 16. If bit 8 is clear,
one of bits 9-15 must be set, so there will be a carry
into bit 16. Similarly, there will be a carry into bit
24. If one of bits 24-30 is set, there will be a carry
into bit 31, so all of the hole bits will be changed.
The one misfire occurs when bits 24-30 are clear and bit
31 is set; in this case, the hole at bit 31 is not
changed. If we had access to the processor carry flag,
we could close this loophole by putting the fourth hole
at bit 32!
So it ignores everything except 128's, when they're aligned
properly.
3) But wait! Aren't we looking for C, not zero?
Good point. So what we do is XOR LONGWORD with a longword,
each of whose bytes is C. This turns each byte that is C
into a zero. */
longword = *--longword_ptr ^ charmask;
/* Add MAGIC_BITS to LONGWORD. */
if ((((longword + magic_bits)
/* Set those bits that were unchanged by the addition. */
^ ~longword)
/* Look at only the hole bits. If any of the hole bits
are unchanged, most likely one of the bytes was a
zero. */
& ~magic_bits) != 0)
{
/* Which of the bytes was C? If none of them were, it was
a misfire; continue the search. */
const unsigned char *cp = (const unsigned char *) longword_ptr;
#if LONG_MAX > 2147483647
if (cp[7] == c)
return (__ptr_t) &cp[7];
if (cp[6] == c)
return (__ptr_t) &cp[6];
if (cp[5] == c)
return (__ptr_t) &cp[5];
if (cp[4] == c)
return (__ptr_t) &cp[4];
#endif
if (cp[3] == c)
return (__ptr_t) &cp[3];
if (cp[2] == c)
return (__ptr_t) &cp[2];
if (cp[1] == c)
return (__ptr_t) &cp[1];
if (cp[0] == c)
return (__ptr_t) cp;
}
n -= sizeof (longword);
}
char_ptr = (const unsigned char *) longword_ptr;
while (n-- > 0)
{
if (*--char_ptr == c)
return (__ptr_t) char_ptr;
}
return 0;
}
#ifdef weak_alias
weak_alias (__memrchr, memrchr)
#endif
+19 -2
View File
@@ -1,3 +1,20 @@
/* quote.c - quote arguments for output
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by Paul Eggert <[email protected]> */
#if HAVE_CONFIG_H
@@ -8,8 +25,8 @@
# include <stddef.h> /* For the definition of size_t on windows w/MSVC. */
#endif
#include <sys/types.h>
#include <quotearg.h>
#include <quote.h>
#include "quotearg.h"
#include "quote.h"
/* Return an unambiguous printable representated, allocated in slot N,
for NAME, suitable for diagnostics. */
+17 -1
View File
@@ -1,4 +1,20 @@
/* prototypes for quote.c */
/* quote.h - prototypes for quote.c
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
+25 -12
View File
@@ -25,8 +25,8 @@
# include <stddef.h> /* For the definition of size_t on windows w/MSVC. */
#endif
#include <sys/types.h>
#include <quotearg.h>
#include <xalloc.h>
#include "quotearg.h"
#include "xalloc.h"
#include <ctype.h>
@@ -44,9 +44,15 @@
#ifndef CHAR_BIT
# define CHAR_BIT 8
#endif
#ifndef SIZE_MAX
# define SIZE_MAX ((size_t) -1)
#endif
#ifndef UCHAR_MAX
# define UCHAR_MAX ((unsigned char) -1)
#endif
#ifndef UINT_MAX
# define UINT_MAX ((unsigned int) -1)
#endif
#if HAVE_C_BACKSLASH_A
# define ALERT_CHAR '\a'
@@ -539,6 +545,7 @@ quotearg_n_options (int n, char const *arg,
one small component of a "memory exhausted" message in slot 0. */
static char slot0[256];
static unsigned int nslots = 1;
unsigned int n0 = n;
struct slotvec
{
size_t size;
@@ -547,20 +554,26 @@ quotearg_n_options (int n, char const *arg,
static struct slotvec slotvec0 = {sizeof slot0, slot0};
static struct slotvec *slotvec = &slotvec0;
if (nslots <= n)
if (n < 0)
abort ();
if (nslots <= n0)
{
int n1 = n + 1;
size_t s = n1 * sizeof (struct slotvec);
if (! (0 < n1 && n1 == s / sizeof (struct slotvec)))
abort ();
unsigned int n1 = n0 + 1;
size_t s = n1 * sizeof *slotvec;
if (SIZE_MAX / UINT_MAX <= sizeof *slotvec
&& n1 != s / sizeof *slotvec)
xalloc_die ();
if (slotvec == &slotvec0)
{
slotvec = (struct slotvec *) xmalloc (sizeof (struct slotvec));
slotvec = (struct slotvec *) xmalloc (sizeof *slotvec);
*slotvec = slotvec0;
}
slotvec = (struct slotvec *) xrealloc (slotvec, s);
memset (slotvec + nslots, 0, (n1 - nslots) * sizeof (struct slotvec));
nslots = n;
memset (slotvec + nslots, 0, (n1 - nslots) * sizeof *slotvec);
nslots = n1;
}
{
@@ -580,7 +593,7 @@ quotearg_n_options (int n, char const *arg,
}
char *
quotearg_n (unsigned int n, char const *arg)
quotearg_n (int n, char const *arg)
{
return quotearg_n_options (n, arg, &default_quoting_options);
}
@@ -592,7 +605,7 @@ quotearg (char const *arg)
}
char *
quotearg_n_style (unsigned int n, enum quoting_style s, char const *arg)
quotearg_n_style (int n, enum quoting_style s, char const *arg)
{
struct quoting_options o;
o.style = s;
+2 -3
View File
@@ -89,7 +89,7 @@ size_t quotearg_buffer PARAMS ((char *buffer, size_t buffersize,
The returned value points to static storage that can be
reused by the next call to this function with the same value of N.
N must be nonnegative. */
char *quotearg_n PARAMS ((unsigned int n, char const *arg));
char *quotearg_n PARAMS ((int n, char const *arg));
/* Equivalent to quotearg_n (0, ARG). */
char *quotearg PARAMS ((char const *arg));
@@ -97,8 +97,7 @@ char *quotearg PARAMS ((char const *arg));
/* Use style S and storage slot N to return a quoted version of the string ARG.
This is like quotearg_n (N, ARG), except that it uses S with no other
options to specify the quoting method. */
char *quotearg_n_style PARAMS ((unsigned int n, enum quoting_style s,
char const *arg));
char *quotearg_n_style PARAMS ((int n, enum quoting_style s, char const *arg));
/* Equivalent to quotearg_n_style (0, S, ARG). */
char *quotearg_style PARAMS ((enum quoting_style s, char const *arg));
+32
View File
@@ -0,0 +1,32 @@
/* Copyright (C) 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License
as published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this program; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place -
Suite 330, Boston, MA 02111-1307, USA. */
#if HAVE_CONFIG_H
# include <config.h>
#endif
#if HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
#endif
char *
strchr (const char *s, int c)
{
return index (s, c);
}
+2 -10
View File
@@ -1,5 +1,5 @@
/* xstrdup.c -- copy a string with out of memory checking
Copyright (C) 1990, 1996, 1998 Free Software Foundation, Inc.
Copyright (C) 1990, 1996, 1998, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,14 +19,6 @@
# include <config.h>
#endif
#ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
#endif
#if STDC_HEADERS || HAVE_STRING_H
# include <string.h>
#else
@@ -35,7 +27,7 @@
#include <sys/types.h>
char *xmalloc PARAMS ((size_t n));
#include "xalloc.h"
/* Return a newly allocated copy of STRING. */
+12 -23
View File
@@ -1,7 +1,4 @@
/* Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
/* Copyright (C) 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -17,20 +14,20 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include "config.h"
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <sys/types.h>
#if defined _LIBC || defined STDC_HEADERS
# include <stdlib.h>
#if STDC_HEADERS || HAVE_STRING_H
# include <string.h>
#else
char *malloc ();
# include <strings.h>
#endif
#include <sys/types.h>
#include "xalloc.h"
#ifndef HAVE_DECL_STRNLEN
"this configure-time declaration test was not run"
#endif
@@ -38,18 +35,13 @@ char *malloc ();
size_t strnlen ();
#endif
#undef __strndup
#undef strndup
#ifndef weak_alias
# define __strndup strndup
#endif
char *xstrndup (const char *s, size_t n);
char *
__strndup (const char *s, size_t n)
xstrndup (const char *s, size_t n)
{
size_t len = strnlen (s, n);
char *new = malloc (len + 1);
char *new = xmalloc (len + 1);
if (new == NULL)
return NULL;
@@ -57,6 +49,3 @@ __strndup (const char *s, size_t n)
new[len] = '\0';
return (char *) memcpy (new, s, len);
}
#ifdef weak_alias
weak_alias (__strndup, strndup)
#endif
+14 -10
View File
@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.5a from Makefile.am.
# Makefile.in generated by automake 1.5c from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,7 +13,6 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -48,6 +47,7 @@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
@@ -84,23 +84,24 @@ INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIB = @LIB@
LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
WERROR_CFLAGS = @WERROR_CFLAGS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
EXTRA_DIST = \
c-bs-a.m4 \
codeset.m4 \
@@ -133,12 +134,11 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu m4/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
uninstall-info-am:
tags: TAGS
TAGS:
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
@@ -146,13 +146,16 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
cp -pR $$d/$$file $(distdir)$$dir \
|| exit 1; \
else \
test -f $(distdir)/$$file \
@@ -177,6 +180,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
+1 -2
View File
@@ -1,6 +1,5 @@
ChangeLog
Makefile
Makefile.in
Makefile Makefile.in
POTFILES
bison.pot
stamp-cat-id
+1 -10
View File
@@ -1,16 +1,7 @@
2001-10-10 gettextize <[email protected]>
2002-01-21 gettextize <[email protected]>
* Makefile.in.in: Upgrade to gettext-0.10.40.
2001-10-10 gettextize <[email protected]>
* Makefile.in.in: Upgrade to gettext-0.10.40.
2001-10-09 gettextize <[email protected]>
* Makefile.in.in: Upgrade to gettext-0.10.40.
* cat-id-tbl.c: Remove file.
2001-09-27 gettextize <[email protected]>
* Makefile.in.in: Upgrade to gettext-0.10.40.
-3
View File
@@ -1,13 +1,10 @@
src/LR0.c
src/complain.c
src/conflicts.c
src/derives.c
src/files.c
src/getargs.c
src/lalr.c
src/lex.c
src/main.c
src/nullable.c
src/output.c
src/print.c
src/print_graph.c
BIN
View File
Binary file not shown.
+333 -414
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+276 -243
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+203 -226
View File
@@ -4,21 +4,22 @@
#
msgid ""
msgstr ""
"Project-Id-Version: bison 1.29f\n"
"POT-Creation-Date: 2001-10-26 14:37+0200\n"
"PO-Revision-Date: 2001-10-19 17:53+02:00\n"
"Project-Id-Version: bison 1.33b\n"
"POT-Creation-Date: 2002-03-04 19:13+0100\n"
"PO-Revision-Date: 2002-03-05 16:27+0200\n"
"Last-Translator: Toomas Soome <[email protected]>\n"
"Language-Team: Estonian <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-15\n"
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/LR0.c:207
#: src/LR0.c:189
#, c-format
msgid "too many states (max %d)"
msgstr "liiga palju olekuid (maks %d)"
#: lib/error.c:128 lib/error.c:156 src/complain.c:96
#: lib/error.c:128 lib/error.c:156 src/complain.c:99
msgid "Unknown system error"
msgstr "Tundmatu süsteemi viga"
@@ -26,81 +27,84 @@ msgstr "Tundmatu s
msgid "warning: "
msgstr "hoiatus: "
#: src/complain.c:238 src/complain.c:279
#: src/complain.c:238
msgid "fatal error: "
msgstr "fataalne viga: "
#: src/conflicts.c:48
#: src/conflicts.c:44
#, c-format
msgid "Conflict in state %d between rule %d and token %s resolved as %s.\n"
msgstr "Konflikt olekus %d reegli %d ja märgi %s vahel lahendatud, kui %s.\n"
#: src/conflicts.c:114 src/conflicts.c:137
#: src/conflicts.c:94 src/conflicts.c:119
msgid "reduce"
msgstr "redutseerimine"
#: src/conflicts.c:120 src/conflicts.c:133
#: src/conflicts.c:101 src/conflicts.c:115
msgid "shift"
msgstr "nihutamine"
#: src/conflicts.c:141
#: src/conflicts.c:123
msgid "an error"
msgstr "viga"
#: src/conflicts.c:421
msgid " 1 shift/reduce conflict"
msgstr " 1 nihutamine/redutseerimine konflikt"
#: src/conflicts.c:426
#: src/conflicts.c:302
#, c-format
msgid " %d shift/reduce conflicts"
msgstr " %d nihutamine/redutseerimine konflikti"
msgid "%d shift/reduce conflict"
msgid_plural "%d shift/reduce conflicts"
msgstr[0] "%d nihutamine/redutseerimine konflikt"
msgstr[1] "%d nihutamine/redutseerimine konflikti"
#: src/conflicts.c:432
msgid " and"
msgstr " ja"
#: src/conflicts.c:309
msgid "and"
msgstr "ja"
#: src/conflicts.c:438
msgid " 1 reduce/reduce conflict"
msgstr " 1 redutseerimine/redutseerimine konflikt"
#: src/conflicts.c:443
#: src/conflicts.c:315
#, c-format
msgid " %d reduce/reduce conflicts"
msgstr " %d redutseerimine/redutseerimine konflikti"
msgid "%d reduce/reduce conflict"
msgid_plural "%d reduce/reduce conflicts"
msgstr[0] "%d redutseerimine/redutseerimine konflikt"
msgstr[1] "%d redutseerimine/redutseerimine konflikti"
#: src/conflicts.c:480
#: src/conflicts.c:340
#, c-format
msgid "State %d contains"
msgstr "Olek %d sisaldab"
msgid "State %d contains "
msgstr "Olek %d sisaldab "
#. If invoked with `--yacc', use the output format specified by
#. POSIX.
#: src/conflicts.c:491
#: src/conflicts.c:387
msgid "conflicts: "
msgstr "konfliktid: "
#: src/conflicts.c:493
#: src/conflicts.c:389
#, c-format
msgid " %d shift/reduce"
msgstr " %d nihutamine/redutseerimine"
#: src/conflicts.c:497
#: src/conflicts.c:393
#, c-format
msgid " %d reduce/reduce"
msgstr " %d redutseerimine/redutseerimine"
#: src/conflicts.c:502
#: src/conflicts.c:398 src/reduce.c:508
#, c-format
msgid "%s contains"
msgstr "%s sisaldab"
msgid "%s contains "
msgstr "%s sisaldab "
#: src/conflicts.c:588 src/conflicts.c:709
#: src/conflicts.c:412
#, c-format
msgid "expected %d shift/reduce conflict\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] "eeldasime %d nihutamine/redutseerimine konflikti\n"
msgstr[1] "eeldasime %d nihutamine/redutseerimine konflikti\n"
#: src/conflicts.c:463 src/conflicts.c:540
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[redutseerin, kasutades reeglit %d (%s)]\n"
#: src/conflicts.c:600 src/print.c:171
#: src/conflicts.c:467 src/print.c:154
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
@@ -109,46 +113,37 @@ msgstr ""
" $default\tredutseerin kasutades reeglit %d (%s)\n"
"\n"
#: src/conflicts.c:689 src/conflicts.c:703
#: src/conflicts.c:521 src/conflicts.c:534
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\tredutseerin kasutades reeglit %d (%s)\n"
#: src/conflicts.c:730
#: src/conflicts.c:550
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\tredutseerin kasutades reeglit %d (%s)\n"
#: src/derives.c:43
msgid "DERIVES"
msgstr "DERIVES"
#: src/derives.c:48
#, c-format
msgid "%s derives"
msgstr "%s derives"
#: src/files.c:133
#: src/files.c:151
#, c-format
msgid "cannot open file `%s'"
msgstr "faili `%s' ei saa avada"
#: src/files.c:152
#: src/files.c:170
msgid "cannot close file"
msgstr "faili ei õnnestu sulgeda"
#. Some efforts were made to ease the translators' task, please
#. continue.
#: src/getargs.c:83
#: src/getargs.c:84
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
msgstr "GNU bison genereerib parsereid LALR(1) grammatikatele.\n"
#: src/getargs.c:87
#: src/getargs.c:88
#, c-format
msgid "Usage: %s [OPTION]... FILE\n"
msgstr "Kasuta: %s [VÕTI]...FAIL\n"
#: src/getargs.c:91
#: src/getargs.c:92
msgid ""
"If a long option shows an argument as mandatory, then it is mandatory\n"
"for the equivalent short option also. Similarly for optional arguments.\n"
@@ -156,7 +151,7 @@ msgstr ""
"Kui pikk võti näitab, et argument on kohustuslik, siis on see kohustuslik \n"
"ka lühikese võtme korral. Sama ka vabalt valitavate võtmete korral.\n"
#: src/getargs.c:97
#: src/getargs.c:98
msgid ""
"Operation modes:\n"
" -h, --help display this help and exit\n"
@@ -168,7 +163,7 @@ msgstr ""
" -V, --version esita versiooniinfo ja lõpeta töö\n"
" -y, --yacc emuleeri POSIX yacc\n"
#: src/getargs.c:104
#: src/getargs.c:105
msgid ""
"Parser:\n"
" -S, --skeleton=FILE specify the skeleton to use\n"
@@ -188,14 +183,14 @@ msgstr ""
" -n, --no-parser genereeri ainult tabelid\n"
" -k, --token-table lisa ka sümbolite nimede tabel\n"
#: src/getargs.c:116
#: src/getargs.c:117
msgid ""
"Output:\n"
" -d, --defines also produce a header file\n"
" -v, --verbose also produce an explanation of the automaton\n"
" -b, --file-prefix=PREFIX specify a PREFIX for output files\n"
" -o, --output-file=FILE leave output to FILE\n"
" -g, --graph also produce a VCG graph description of the "
" -o, --output=FILE leave output to FILE\n"
" -g, --graph also produce a VCG description of the "
"automaton\n"
msgstr ""
"Väljund:\n"
@@ -205,25 +200,26 @@ msgstr ""
" -o, --output-file=FAIL jäta väljund FAILi\n"
" -g, --graph loo automaadi kirjeldus VCG graafina\n"
#: src/getargs.c:126
#: src/getargs.c:127
msgid "Report bugs to <[email protected]>.\n"
msgstr "Teatage palun vigadest aadressil <[email protected]>.\n"
#. Some efforts were made to ease the translators' task, please
#. continue.
#: src/getargs.c:140
#: src/getargs.c:141
#, c-format
msgid "bison (GNU Bison) %s"
msgstr "bison (GNU Bison) %s"
#: src/getargs.c:145
#: src/getargs.c:146
msgid ""
"Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
"Free Software Foundation, Inc.\n"
msgstr ""
"Autoriõigus 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, "
"Inc.\n"
"Autoriõigus 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
"Free Software Foundation, Inc.\n"
#: src/getargs.c:149
#: src/getargs.c:151
msgid ""
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
@@ -231,479 +227,460 @@ msgstr ""
"See on vaba tarkvara; kopeerimistingimused leiate lähtetekstidest. Garantii\n"
"PUUDUB; ka müügiks või mingil eesmärgil kasutamiseks.\n"
#: src/getargs.c:214 src/lex.c:650
#: src/getargs.c:230 src/lex.c:705
#, c-format
msgid "`%s' is no longer supported"
msgstr "`%s' ei ole enam toetatud"
#: src/getargs.c:238
#: src/getargs.c:254
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "Lisainfo saamiseks proovige `%s --help'.\n"
#: src/getargs.c:245
#: src/getargs.c:261
#, c-format
msgid "%s: no grammar file given\n"
msgstr "%s: puudub grammatikafail\n"
#: src/getargs.c:249
#: src/getargs.c:265
#, c-format
msgid "%s: extra arguments ignored after `%s'\n"
msgstr "%s: ignoreerin lisaargumente peale `%s'\n"
#: src/lalr.c:311
#: src/lalr.c:256
#, c-format
msgid "too many gotos (max %d)"
msgstr "liiga palju gotosid (maks %d)"
#: src/lex.c:78
#: src/lex.c:76
msgid "unexpected `/' found and ignored"
msgstr "leidsin ja ignoreerin ootamatu `/'"
#: src/lex.c:107 src/reader.c:269
#: src/lex.c:105 src/reader.c:280
msgid "unterminated comment"
msgstr "lõpetamata kommentaar"
#: src/lex.c:139
#: src/lex.c:137
msgid "unexpected end of file"
msgstr "ootamatu faililõpp"
#: src/lex.c:168
#: src/lex.c:166
msgid "unescaped newline in constant"
msgstr "paojadata reavahetus konstandis"
#: src/lex.c:210
#: src/lex.c:208
#, c-format
msgid "octal value outside range 0...255: `\\%o'"
msgstr "kaheksandväärtus väljaspool piire 0...255: `\\%o'"
#: src/lex.c:235
#: src/lex.c:233
#, c-format
msgid "hexadecimal value above 255: `\\x%x'"
msgstr "kuueteistkümnendväärtus suurem, kui above 255: `\\x%x'"
#: src/lex.c:247
#: src/lex.c:245
#, c-format
msgid "unknown escape sequence: `\\' followed by `%s'"
msgstr "tundmatu paojada: `\\' järgneb `%s'"
#: src/lex.c:343
#: src/lex.c:342
msgid "unterminated type name at end of file"
msgstr "lõpetamata tüübinimi faili lõpus"
#: src/lex.c:346
#: src/lex.c:345
msgid "unterminated type name"
msgstr "lõpetamata tüübinimi"
#: src/lex.c:437
#: src/lex.c:438
msgid "use \"...\" for multi-character literal tokens"
msgstr "kasuta mitmesümboliliste literaalidega \"...\" konstruktsiooni"
#: src/main.c:125
#: src/lex.c:678
#, c-format
msgid "%s: internal error: %s\n"
msgstr "%s: sisemine viga: %s\n"
msgid "`%s' supports no argument: %s"
msgstr "`%s' ei toeta argumente: %s"
#: src/nullable.c:51
msgid "Entering set_nullable"
msgstr "Entering set_nullable"
#: src/lex.c:694
#, c-format
msgid "`%s' requires an argument"
msgstr "võti `%s' nõuab argumenti"
#: src/output.c:986
#: src/output.c:951
#, c-format
msgid "maximum table size (%d) exceeded"
msgstr "ületati maksimaalset tabelisuurust (%d)"
#: src/print.c:37
#: src/print.c:39
#, c-format
msgid " type %d is %s\n"
msgstr " tüüp %d on %s\n"
#: src/print.c:85
#: src/print.c:88
#, c-format
msgid " (rule %d)"
msgstr " (reegel %d)"
#: src/print.c:111
#: src/print.c:108
msgid " $default\taccept\n"
msgstr " $default\taktsepteerin\n"
#: src/print.c:113
#: src/print.c:110
msgid " NO ACTIONS\n"
msgstr " TEGEVUSI POLE\n"
#: src/print.c:132
#: src/print.c:124
#, c-format
msgid " $ \tgo to state %d\n"
msgstr " $ \tliigu olekule %d\n"
#: src/print.c:135
#: src/print.c:127
#, c-format
msgid " %-4s\tshift, and go to state %d\n"
msgstr " %-4s\tnihuta ja liigu olekule %d\n"
#: src/print.c:159
#: src/print.c:142
#, c-format
msgid " %-4s\terror (nonassociative)\n"
msgstr " %-4s\tviga (mitteassotsiatiivne)\n"
#: src/print.c:187
#: src/print.c:169
#, c-format
msgid " %-4s\tgo to state %d\n"
msgstr " %-4s\tliigu olekule %d\n"
#: src/print.c:199
#: src/print.c:180
#, c-format
msgid "state %d"
msgstr "olek %d"
#. rule # : LHS -> RHS
#: src/print.c:229
#: src/print.c:211
msgid "Grammar"
msgstr "Grammatika"
#: src/print.c:234
#, c-format
msgid "rule %-4d %s ->"
msgstr "reegel %-4d %s ->"
#: src/print.c:212
msgid "Number, Line, Rule"
msgstr "Number, rida, reegel"
#: src/print.c:240
#: src/print.c:217
#, c-format
msgid " %3d %3d %s ->"
msgstr " %3d %3d %s ->"
#: src/print.c:224
msgid "empty"
msgstr "tühi"
#. TERMINAL (type #) : rule #s terminal is on RHS
#: src/print.c:244
#: src/print.c:231
msgid "Terminals, with rules where they appear"
msgstr "Terminalid, koos reeglitega, kus nad ilmuvad"
#: src/print.c:268
#: src/print.c:256
msgid "Nonterminals, with rules where they appear"
msgstr "Mitteterminalid, koos reeglitega, kus nad ilmuvad"
#: src/print.c:294
#: src/print.c:282
msgid " on left:"
msgstr " vasakul:"
#: src/print.c:309
#: src/print.c:297
msgid " on right:"
msgstr " paremal:"
#: src/print_graph.c:174
#. If something has been added in the NODE_OBSTACK after
#. the declaration of the label, then we need a `\n'.
#. if (obstack_object_size (node_obstack) > node_output_size)
#. obstack_sgrow (node_obstack, "\n");
#.
#: src/print_graph.c:146
#, c-format
msgid "%-4s\terror (nonassociative)"
msgstr "%-4s\tviga (mitteassotsiatiivne)"
#: src/print_graph.c:187
#.
#. if (obstack_object_size (node_obstack) > node_output_size)
#. obstack_sgrow (node_obstack, "\n");
#.
#: src/print_graph.c:161
#, c-format
msgid "$default\treduce using rule %d (%s)"
msgstr "$default\tredutseerin kasutades reeglit %d (%s)"
#: src/reader.c:78
#: src/reader.c:89
msgid " Skipping to next \\n"
msgstr " Liigun järgmisele \\n"
#: src/reader.c:80
#: src/reader.c:91
#, c-format
msgid " Skipping to next %c"
msgstr " Liigun järgmisele %c"
#: src/reader.c:131 src/reader.c:143
#: src/reader.c:142 src/reader.c:154
msgid "invalid $ value"
msgstr "vigane $ väärtus"
#: src/reader.c:169 src/reader.c:184
#: src/reader.c:180 src/reader.c:195
msgid "unterminated string at end of file"
msgstr "lõpetamata sõne faili lõpus"
#: src/reader.c:172
#: src/reader.c:183
msgid "unterminated string"
msgstr "lõpetamata sõne"
#: src/reader.c:325 src/reader.c:389
#: src/reader.c:339
msgid "invalid @ value"
msgstr "vigane @ väärtus"
#: src/reader.c:352 src/reader.c:416
#, c-format
msgid "%s is invalid"
msgstr "%s on vigane"
#: src/reader.c:365
#: src/reader.c:392
#, c-format
msgid "$$ of `%s' has no declared type"
msgstr "`%s' $$ ei oma deklareeritud tüüpi"
#: src/reader.c:382
#: src/reader.c:409
#, c-format
msgid "$%d of `%s' has no declared type"
msgstr "$%d `%s' ei oma deklareeritud tüüpi"
#: src/reader.c:436
#: src/reader.c:463
msgid "unterminated `%{' definition"
msgstr "lõpetamata `%{' definitsioon"
#: src/reader.c:481 src/reader.c:595 src/reader.c:645
#: src/reader.c:508 src/reader.c:623 src/reader.c:673
#, c-format
msgid "Premature EOF after %s"
msgstr "Enneaegne EOF peale %s"
#: src/reader.c:498
#: src/reader.c:525
#, c-format
msgid "symbol `%s' used more than once as a literal string"
msgstr "sümbolit `%s' on kasutatud enam kui kord literaal sõnena"
#: src/reader.c:501
#: src/reader.c:528
#, c-format
msgid "symbol `%s' given more than one literal string"
msgstr "sümbolile `%s' on antud enam kui üks literaal sõne"
#: src/reader.c:522 src/reader.c:664
#: src/reader.c:549 src/reader.c:692
#, c-format
msgid "symbol %s redefined"
msgstr "sümbol %s on uuesti defineeritud"
#: src/reader.c:532 src/reader.c:610 src/reader.c:671 src/reader.c:1285
#: src/reader.c:559 src/reader.c:638 src/reader.c:699 src/reader.c:1314
#, c-format
msgid "type redeclaration for %s"
msgstr "%s tüübi uuesti deklareerimine"
#: src/reader.c:541
#: src/reader.c:568
#, c-format
msgid "`%s' is invalid in %s"
msgstr "`%s' ei ole %s sees lubatud"
#: src/reader.c:558 src/reader.c:717
#: src/reader.c:586 src/reader.c:751
#, c-format
msgid "multiple %s declarations"
msgstr "korduvad %s deklaratsioonid"
#: src/reader.c:560 src/reader.c:897 src/reader.c:922 src/reader.c:1263
#: src/reader.c:588 src/reader.c:930 src/reader.c:955 src/reader.c:1292
#, c-format
msgid "invalid %s declaration"
msgstr "vigane %s deklaratsioon"
#: src/reader.c:580
#: src/reader.c:608
msgid "%type declaration has no <typename>"
msgstr "%type deklaratsioonis puudub <tüübinimi>"
#: src/reader.c:615
#: src/reader.c:643
#, c-format
msgid "invalid %%type declaration due to item: %s"
msgstr "vigane %%type deklaratsioon, element: %s"
#: src/reader.c:660
#: src/reader.c:688
#, c-format
msgid "redefining precedence of %s"
msgstr "%s prioriteedi uus definitsioon"
#: src/reader.c:683
#: src/reader.c:711
#, c-format
msgid "invalid text (%s) - number should be after identifier"
msgstr "vigane tekst (%s) - number peab olema peale identifikaatorit"
#: src/reader.c:693
#: src/reader.c:721
#, c-format
msgid "unexpected item: %s"
msgstr "ootamatu element: %s"
#: src/reader.c:760 src/reader.c:1089 src/reader.c:1160
#: src/reader.c:794 src/reader.c:1126 src/reader.c:1203
#, c-format
msgid "unmatched %s"
msgstr "puudub %s"
#: src/reader.c:792
#: src/reader.c:826
#, c-format
msgid "argument of %%expect is not an integer"
msgstr "%%expect argument ei ole täisarv"
#: src/reader.c:838
#: src/reader.c:872
#, c-format
msgid "unrecognized item %s, expected an identifier"
msgstr "tundmatu element %s, eeldasin identifikaatorit"
#: src/reader.c:862
#: src/reader.c:894
#, c-format
msgid "expected string constant instead of %s"
msgstr "eeldasin %s asemel sõnekonstanti"
#: src/reader.c:1005
#: src/reader.c:1042
#, c-format
msgid "unrecognized: %s"
msgstr "tundmatu: %s"
#: src/reader.c:1010
#: src/reader.c:1047
msgid "no input grammar"
msgstr "sisendgrammatikat pole"
#: src/reader.c:1015
#: src/reader.c:1052
#, c-format
msgid "unknown character: %s"
msgstr "tundmatu sümbol: %s"
#: src/reader.c:1183
#: src/reader.c:1226
#, c-format
msgid "unterminated %guard clause"
msgstr "lõpetamata %guard klausel"
#: src/reader.c:1350
#: src/reader.c:1379
msgid "ill-formed rule: initial symbol not followed by colon"
msgstr "vigaselt formeeritud reegel: algsümbolile ei järgne koolonit"
#: src/reader.c:1357
#: src/reader.c:1386
msgid "grammar starts with vertical bar"
msgstr "grammatika algab püstkriipsuga"
#: src/reader.c:1388
#: src/reader.c:1414
#, c-format
msgid "rule given for %s, which is a token"
msgstr "%s jaoks on antud reegel, aga see on märk"
#: src/reader.c:1490
#: src/reader.c:1444 src/reader.c:1556
msgid "previous rule lacks an ending `;'"
msgstr "eelmisel reeglil puudub lõpetav `;'"
#: src/reader.c:1517
msgid "two @prec's in a row"
msgstr "kaks @prec ühel real"
#: src/reader.c:1498
#: src/reader.c:1525
#, c-format
msgid "%%guard present but %%semantic_parser not specified"
msgstr "%%guard on määratud, aga %%semantic_parser ei ole"
#: src/reader.c:1507
#: src/reader.c:1534
msgid "two actions at end of one rule"
msgstr "kaks tegevust ühe reegli lõpus"
#: src/reader.c:1521
#: src/reader.c:1548
#, c-format
msgid "type clash (`%s' `%s') on default action"
msgstr "vaikimisi tegevuse tüübikonflikt (`%s' `%s')"
#: src/reader.c:1527
#: src/reader.c:1554
msgid "empty rule for typed nonterminal, and no action"
msgstr "tüübiga mitteterminalil on tühi reegel ja puudub tegevus"
#: src/reader.c:1571
#: src/reader.c:1600
#, c-format
msgid "invalid input: %s"
msgstr "vigane sisend: %s"
#: src/reader.c:1579
#: src/reader.c:1608
#, c-format
msgid "too many symbols (tokens plus nonterminals); maximum %d"
msgstr "liiga palju sümboleid (märgid ja mitteterminalid); maksimaalne on %d"
#: src/reader.c:1582
#: src/reader.c:1611
msgid "no rules in the input grammar"
msgstr "sisendgrammatikas pole reegleid"
#: src/reader.c:1606
#: src/reader.c:1635
#, c-format
msgid "symbol %s is used, but is not defined as a token and has no rules"
msgstr ""
"kasutatakse sümbolit %s, mis ei ole defineeritud märgina ja millel puuduvad "
"reeglid"
#: src/reader.c:1712
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "%s ja %s omavad konfliktseid prioriteete"
#: src/reader.c:1724
#, c-format
msgid "conflicting assoc values for %s and %s"
msgstr "%s ja %s omavad konfliktseid assotsiatiivseid väärtuseid"
#: src/reader.c:1770
#, c-format
msgid "tokens %s and %s both assigned number %d"
msgstr "märkidele %s ja %s on mõlemale omistatud number %d"
#: src/reader.c:1782
#: src/reader.c:1823
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "%s ja %s omavad konfliktseid prioriteete"
#: src/reader.c:1835
#, c-format
msgid "conflicting assoc values for %s and %s"
msgstr "%s ja %s omavad konfliktseid assotsiatiivseid väärtuseid"
#: src/reader.c:1874
#, c-format
msgid "the start symbol %s is undefined"
msgstr "stardisümbol %s ei ole defineeritud"
#: src/reader.c:1784
#: src/reader.c:1876
#, c-format
msgid "the start symbol %s is a token"
msgstr "stardisümbol %s on märk"
#: src/reduce.c:401
#: src/reduce.c:409
msgid "Useless nonterminals:"
msgstr "Kasutamata mitteterminalid:"
#: src/reduce.c:416
#: src/reduce.c:422
msgid "Terminals which are not used:"
msgstr "Terminalid, mida ei kasutatud:"
#: src/reduce.c:427
#: src/reduce.c:433
msgid "Useless rules:"
msgstr "Kasutamata reeglid:"
#: src/reduce.c:456
msgid ""
"Variables\n"
"---------\n"
"\n"
msgstr ""
"Muutujad\n"
"--------\n"
"\n"
#: src/reduce.c:458
msgid "Value Sprec Sassoc Tag\n"
msgstr "Value Sprec Sassoc Tag\n"
#: src/reduce.c:463
msgid ""
"Rules\n"
"-----\n"
"\n"
msgstr ""
"Reeglid\n"
"-------\n"
"\n"
#: src/reduce.c:474
msgid ""
"Rules interpreted\n"
"-----------------\n"
"\n"
msgstr ""
"Interpreteeritud reeglid\n"
"------------------------\n"
"\n"
#: src/reduce.c:491
#: src/reduce.c:503
#, c-format
msgid "%d rules never reduced\n"
msgstr "%d reeglit ei redutseeritud\n"
msgid "%d rule never reduced\n"
msgid_plural "%d rules never reduced\n"
msgstr[0] "%d reegel ei redutseeru\n"
msgstr[1] "%d reeglit ei redutseeru\n"
#: src/reduce.c:493
#: src/reduce.c:511
#, c-format
msgid "%s contains "
msgstr "%s sisaldab "
msgid "%d useless nonterminal"
msgid_plural "%d useless nonterminals"
msgstr[0] "%d kasutamata mitteterminal"
msgstr[1] "%d kasutamata mitteterminali"
#: src/reduce.c:497
#, c-format
msgid "%d useless nonterminal%s"
msgstr "%d kasutamata mitteterminali%s"
#: src/reduce.c:502
#: src/reduce.c:517
msgid " and "
msgstr " ja "
#: src/reduce.c:506
#: src/reduce.c:520
#, c-format
msgid "%d useless rule%s"
msgstr "%d kasutamata reeglit%s"
msgid "%d useless rule"
msgid_plural "%d useless rules"
msgstr[0] "%d kasutamata reegel"
msgstr[1] "%d kasutamata reeglit"
#: src/reduce.c:539
#: src/reduce.c:551
#, c-format
msgid "Start symbol %s does not derive any sentence"
msgstr "Stardisümbolist %s ei tuletata ühtegi lauset"
#: src/reduce.c:552
#, c-format
msgid ""
"reduced %s defines %d terminal%s, %d nonterminal%s, and %d production%s.\n"
msgstr ""
"redutseeritud %s defineerib %d terminali%s, %d mitteterminali%s ja %d reeglit"
"%s.\n"
#: lib/getopt.c:694
#, c-format
msgid "%s: option `%s' is ambiguous\n"
@@ -783,10 +760,10 @@ msgstr "m
#. MARK). A British English Unicode locale should instead
#. translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and
#. U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.
#: lib/quotearg.c:268
#: lib/quotearg.c:274
msgid "`"
msgstr "`"
#: lib/quotearg.c:269
#: lib/quotearg.c:275
msgid "'"
msgstr "'"
BIN
View File
Binary file not shown.
+287 -252
View File
File diff suppressed because it is too large Load Diff
+777
View File
@@ -0,0 +1,777 @@
# Italian translation for message of GNU bison.
# Copyright (C) 2002 Free Software Foundation, Inc.
# Paolo Bonzini <[email protected]>, 2002.
#
msgid ""
msgstr ""
"Project-Id-Version: bison 1.31\n"
"POT-Creation-Date: 2002-03-04 19:13+0100\n"
"PO-Revision-Date: 2002-01-23 14:16+0100\n"
"Last-Translator: Paolo Bonzini <[email protected]>\n"
"Language-Team: Italian <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/LR0.c:189
#, c-format
msgid "too many states (max %d)"
msgstr "troppi stati (massimo %d)"
#: lib/error.c:128 lib/error.c:156 src/complain.c:99
msgid "Unknown system error"
msgstr "Errore di sistema sconosciuto"
#: src/complain.c:150
msgid "warning: "
msgstr "attenzione: "
#: src/complain.c:238
msgid "fatal error: "
msgstr "errore fatale: "
#: src/conflicts.c:44
#, c-format
msgid "Conflict in state %d between rule %d and token %s resolved as %s.\n"
msgstr ""
"Conflitto nello stato %d tra la regola %d e il token %s risolto come %s.\n"
#: src/conflicts.c:94 src/conflicts.c:119
msgid "reduce"
msgstr "riduzione"
#: src/conflicts.c:101 src/conflicts.c:115
msgid "shift"
msgstr "shift"
#: src/conflicts.c:123
msgid "an error"
msgstr "un errore"
#: src/conflicts.c:302
#, c-format
msgid "%d shift/reduce conflict"
msgid_plural "%d shift/reduce conflicts"
msgstr[0] "%d conflitto shift/riduzione"
msgstr[1] "%d conflitti shift/riduzione"
#: src/conflicts.c:309
msgid "and"
msgstr "e"
#: src/conflicts.c:315
#, c-format
msgid "%d reduce/reduce conflict"
msgid_plural "%d reduce/reduce conflicts"
msgstr[0] "%d conflitto riduzione/riduzione"
msgstr[1] "%d conflitti riduzione/riduzione"
#: src/conflicts.c:340
#, c-format
msgid "State %d contains "
msgstr "Lo stato %d contiene"
#. If invoked with `--yacc', use the output format specified by
#. POSIX.
#: src/conflicts.c:387
msgid "conflicts: "
msgstr "conflitti: "
#: src/conflicts.c:389
#, c-format
msgid " %d shift/reduce"
msgstr " %d shift/riduzione"
#: src/conflicts.c:393
#, c-format
msgid " %d reduce/reduce"
msgstr " %d riduzione/riduzione"
#: src/conflicts.c:398 src/reduce.c:508
#, c-format
msgid "%s contains "
msgstr "%s contiene "
#: src/conflicts.c:412
#, c-format
msgid "expected %d shift/reduce conflict\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] "atteso %d conflitto shift/riduzione\n"
msgstr[1] "attesi %d conflitti shift/riduzione\n"
#: src/conflicts.c:463 src/conflicts.c:540
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[riduzione con la regole %d (%s)]\n"
#: src/conflicts.c:467 src/print.c:154
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
"\n"
msgstr ""
" $default\triduzione con la regola %d (%s)\n"
"\n"
#: src/conflicts.c:521 src/conflicts.c:534
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\triduzione con la regola %d (%s)\n"
#: src/conflicts.c:550
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\triduzione con la regola %d (%s)\n"
#: src/files.c:151
#, c-format
msgid "cannot open file `%s'"
msgstr "impossibile aprire il file `%s'"
#: src/files.c:170
msgid "cannot close file"
msgstr "impossibile chiudere il file `%s'"
#. Some efforts were made to ease the translators' task, please
#. continue.
#: src/getargs.c:84
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
msgstr "GNU bison genera parser per grammatiche LALR(1).\n"
#: src/getargs.c:88
#, c-format
msgid "Usage: %s [OPTION]... FILE\n"
msgstr "Utilizzo: %s [OPZIONE]... FILE\n"
#: src/getargs.c:92
msgid ""
"If a long option shows an argument as mandatory, then it is mandatory\n"
"for the equivalent short option also. Similarly for optional arguments.\n"
msgstr ""
"Se un argomento è indicato come obbligatorio in un'opzione lunga, allora\n"
"è obbligatorio anche per l'equivalente opzione corta. Analogamente per\n"
"gli argomenti opzionali.\n"
#: src/getargs.c:98
msgid ""
"Operation modes:\n"
" -h, --help display this help and exit\n"
" -V, --version output version information and exit\n"
" -y, --yacc emulate POSIX yacc\n"
msgstr ""
"Modalità operative:\n"
" -h, --help mostra questo aiuto ed esce\n"
" -V, --version mostra informazioni sulla versione ed esce\n"
" -y, --yacc emula il comportamento di POSIX yacc\n"
#: src/getargs.c:105
msgid ""
"Parser:\n"
" -S, --skeleton=FILE specify the skeleton to use\n"
" -t, --debug instrument the parser for debugging\n"
" --locations enable locations computation\n"
" -p, --name-prefix=PREFIX prepend PREFIX to the external symbols\n"
" -l, --no-lines don't generate `#line' directives\n"
" -n, --no-parser generate the tables only\n"
" -k, --token-table include a table of token names\n"
msgstr ""
" -S, --skeleton=FILE specifica lo scheletro da usare\n"
" -t, --debug aggiunge informazioni di debug al parser\n"
" --locations abilita il calcolo delle locazioni (@N)\n"
" -p, --name-prefix=PREFIX prepone PREFIX ai simboli globali\n"
" -l, --no-lines non genera direttive `#line'\n"
" -n, --no-parser genera le sole tabelle\n"
" -k, --token-table include una tabella di nomi dei token\n"
#: src/getargs.c:117
msgid ""
"Output:\n"
" -d, --defines also produce a header file\n"
" -v, --verbose also produce an explanation of the automaton\n"
" -b, --file-prefix=PREFIX specify a PREFIX for output files\n"
" -o, --output=FILE leave output to FILE\n"
" -g, --graph also produce a VCG description of the "
"automaton\n"
msgstr ""
"Output:\n"
" -d, --defines produce anche uno header\n"
" -v, --verbose produce anche una spiegazione dell'automa\n"
" -b, --file-prefix=PREFIX specifica un prefisso per il file di output\n"
" -o, --output=FILE lascia l'output in FILE\n"
" -g, --graph produce anche una descrizione VCG dell'automa\n"
#: src/getargs.c:127
msgid "Report bugs to <[email protected]>.\n"
msgstr "Segnalare eventuali bug a <[email protected]>.\n"
#. Some efforts were made to ease the translators' task, please
#. continue.
#: src/getargs.c:141
#, c-format
msgid "bison (GNU Bison) %s"
msgstr "bison (GNU Bison) %s"
#: src/getargs.c:146
msgid ""
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
"Free Software Foundation, Inc.\n"
msgstr ""
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
"Free Software Foundation, Inc.\n"
#: src/getargs.c:151
msgid ""
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
msgstr ""
"Questo e' software libero; vedere il sorgente per le condizioni cui e'\n"
"sottoposta la copia. NON c'è ALCUNA garanzia, neanche di\n"
"COMMERCIABILITA` o di ADEGUATEZZA AD UN PARTICOLARE SCOPO.\n"
#: src/getargs.c:230 src/lex.c:705
#, c-format
msgid "`%s' is no longer supported"
msgstr "`%s' non è più supportato"
#: src/getargs.c:254
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "Provare `%s --help' per ulteriori informazioni.\n"
#: src/getargs.c:261
#, c-format
msgid "%s: no grammar file given\n"
msgstr "%s: nessun file grammatica specificato\n"
#: src/getargs.c:265
#, c-format
msgid "%s: extra arguments ignored after `%s'\n"
msgstr "%s: ignorati gli argomenti successivi a `%s'\n"
#: src/lalr.c:256
#, c-format
msgid "too many gotos (max %d)"
msgstr "troppi goto (max %d)"
#: src/lex.c:76
msgid "unexpected `/' found and ignored"
msgstr "`/' inatteso, trovato e ignorato"
#: src/lex.c:105 src/reader.c:280
msgid "unterminated comment"
msgstr "commento non terminato"
#: src/lex.c:137
msgid "unexpected end of file"
msgstr "fine del file inattesa"
# Oder soll man den Begriff "Escapezeichen" verwenden?
#: src/lex.c:166
msgid "unescaped newline in constant"
msgstr "fine di linea non preceduta da `\\' in una costante"
#: src/lex.c:208
#, c-format
msgid "octal value outside range 0...255: `\\%o'"
msgstr "valore ottale fuori dall'intervallo 0...255: `\\%o'"
#: src/lex.c:233
#, c-format
msgid "hexadecimal value above 255: `\\x%x'"
msgstr "valore esadecimale superiore a 255: `\\x%x'"
#: src/lex.c:245
#, c-format
msgid "unknown escape sequence: `\\' followed by `%s'"
msgstr "sequenza di escape sconosciuta: `\\' seguito da `%s'"
#: src/lex.c:342
msgid "unterminated type name at end of file"
msgstr "nome di tipo non terminato a fine file"
#: src/lex.c:345
msgid "unterminated type name"
msgstr "nome di tipo non terminato"
#: src/lex.c:438
msgid "use \"...\" for multi-character literal tokens"
msgstr "usa \"...\" per token letterali di più caratteri"
#: src/lex.c:678
#, c-format
msgid "`%s' supports no argument: %s"
msgstr "`%s' non supporta argomenti: %s"
#: src/lex.c:694
#, c-format
msgid "`%s' requires an argument"
msgstr "`%s' richiede un argomento"
#: src/output.c:951
#, c-format
msgid "maximum table size (%d) exceeded"
msgstr "ecceduta la dimensione massima di una tabella (%d)"
#: src/print.c:39
#, c-format
msgid " type %d is %s\n"
msgstr " il tipo %d è %s\n"
#: src/print.c:88
#, c-format
msgid " (rule %d)"
msgstr " (regola %d)"
#: src/print.c:108
msgid " $default\taccept\n"
msgstr " $default\taccetta\n"
#: src/print.c:110
msgid " NO ACTIONS\n"
msgstr " NESSUNA AZIONE\n"
#: src/print.c:124
#, c-format
msgid " $ \tgo to state %d\n"
msgstr " $ \tprosecuzione allo stato %d\n"
#: src/print.c:127
#, c-format
msgid " %-4s\tshift, and go to state %d\n"
msgstr " %-4s\tshift e prosecuzione allo stato %d\n"
#: src/print.c:142
#, c-format
msgid " %-4s\terror (nonassociative)\n"
msgstr " %-4s\terrore (non associativo)\n"
#: src/print.c:169
#, c-format
msgid " %-4s\tgo to state %d\n"
msgstr " %-4s\tprosecuzione allo stato %d\n"
#: src/print.c:180
#, c-format
msgid "state %d"
msgstr "stato %d"
#. rule # : LHS -> RHS
#: src/print.c:211
msgid "Grammar"
msgstr "Grammatica"
#: src/print.c:212
msgid "Number, Line, Rule"
msgstr "Numero, Linea, Regola"
#: src/print.c:217
#, c-format
msgid " %3d %3d %s ->"
msgstr " %3d %3d %s ->"
#: src/print.c:224
msgid "empty"
msgstr "vuoto"
#. TERMINAL (type #) : rule #s terminal is on RHS
#: src/print.c:231
msgid "Terminals, with rules where they appear"
msgstr "Simboli terminali e regole in cui appaiono"
#: src/print.c:256
msgid "Nonterminals, with rules where they appear"
msgstr "Simboli nonterminali e regole in cui appaiono"
#: src/print.c:282
msgid " on left:"
msgstr " nel primo membro:"
#: src/print.c:297
msgid " on right:"
msgstr " nel secondo membro:"
#. If something has been added in the NODE_OBSTACK after
#. the declaration of the label, then we need a `\n'.
#. if (obstack_object_size (node_obstack) > node_output_size)
#. obstack_sgrow (node_obstack, "\n");
#.
#: src/print_graph.c:146
#, c-format
msgid "%-4s\terror (nonassociative)"
msgstr "%-4s\terrore (non associativo)"
#.
#. if (obstack_object_size (node_obstack) > node_output_size)
#. obstack_sgrow (node_obstack, "\n");
#.
#: src/print_graph.c:161
#, c-format
msgid "$default\treduce using rule %d (%s)"
msgstr "$default\triduzione con la regola %d (%s)"
#: src/reader.c:89
msgid " Skipping to next \\n"
msgstr " Passo al successivo \\n"
#: src/reader.c:91
#, c-format
msgid " Skipping to next %c"
msgstr " Passo al successivo %c"
#: src/reader.c:142 src/reader.c:154
msgid "invalid $ value"
msgstr "valore $ non valido"
#: src/reader.c:180 src/reader.c:195
msgid "unterminated string at end of file"
msgstr "stringa non terminata alla fine del file"
#: src/reader.c:183
msgid "unterminated string"
msgstr "stringa non terminata"
#: src/reader.c:339
#, fuzzy
msgid "invalid @ value"
msgstr "valore $ non valido"
#: src/reader.c:352 src/reader.c:416
#, c-format
msgid "%s is invalid"
msgstr "%s non è valido"
#: src/reader.c:392
#, c-format
msgid "$$ of `%s' has no declared type"
msgstr "Manca una dichiarazione di tipo per $$ di `%s'"
#: src/reader.c:409
#, c-format
msgid "$%d of `%s' has no declared type"
msgstr "Manca una dichiarazione di tipo per $%d di `%s'"
#: src/reader.c:463
msgid "unterminated `%{' definition"
msgstr "definizione `%{' non terminata"
#: src/reader.c:508 src/reader.c:623 src/reader.c:673
#, c-format
msgid "Premature EOF after %s"
msgstr "Fine di file prematura dopo %s"
#: src/reader.c:525
#, c-format
msgid "symbol `%s' used more than once as a literal string"
msgstr "simbolo `%s' usato più di una volta in una stringa letterale"
#: src/reader.c:528
#, c-format
msgid "symbol `%s' given more than one literal string"
msgstr "il simbolo `%s' dà pi&grave; di una stringa letterale"
#: src/reader.c:549 src/reader.c:692
#, c-format
msgid "symbol %s redefined"
msgstr "simbolo %s ridefinito"
#: src/reader.c:559 src/reader.c:638 src/reader.c:699 src/reader.c:1314
#, c-format
msgid "type redeclaration for %s"
msgstr "tipo dichiarato due volte per %s"
#: src/reader.c:568
#, c-format
msgid "`%s' is invalid in %s"
msgstr "`%s' non è valido in %s"
#: src/reader.c:586 src/reader.c:751
#, c-format
msgid "multiple %s declarations"
msgstr "dichiarazioni multiple per %s"
#: src/reader.c:588 src/reader.c:930 src/reader.c:955 src/reader.c:1292
#, c-format
msgid "invalid %s declaration"
msgstr "dichiarazione %s non valida"
#: src/reader.c:608
msgid "%type declaration has no <typename>"
msgstr "dichiarazione %type senza <nome di tipo>"
#: src/reader.c:643
#, c-format
msgid "invalid %%type declaration due to item: %s"
msgstr "dichiarazione %%type non valida per la presenza di `%s'"
#: src/reader.c:688
#, c-format
msgid "redefining precedence of %s"
msgstr "precedenza di `%s' definita due volte"
#: src/reader.c:711
#, c-format
msgid "invalid text (%s) - number should be after identifier"
msgstr "testo non valido (%s) - il numero dovrebbe seguire l'identificatore"
#: src/reader.c:721
#, c-format
msgid "unexpected item: %s"
msgstr "elemento inatteso: %s"
#: src/reader.c:794 src/reader.c:1126 src/reader.c:1203
#, c-format
msgid "unmatched %s"
msgstr "%s non bilanciato"
#: src/reader.c:826
#, c-format
msgid "argument of %%expect is not an integer"
msgstr "L'argomento di %%expect non è un intero"
#: src/reader.c:872
#, c-format
msgid "unrecognized item %s, expected an identifier"
msgstr "elemento %s non riconosciuto, atteso un identificatore"
#: src/reader.c:894
#, c-format
msgid "expected string constant instead of %s"
msgstr "attesa una costante stringa invece di %s"
#: src/reader.c:1042
#, c-format
msgid "unrecognized: %s"
msgstr "non riconosciuto: %s"
#: src/reader.c:1047
msgid "no input grammar"
msgstr "nessuna grammatica di input"
#: src/reader.c:1052
#, c-format
msgid "unknown character: %s"
msgstr "carattere sconosciuto: %s"
#: src/reader.c:1226
#, c-format
msgid "unterminated %guard clause"
msgstr "clausola %guard non terminata"
#: src/reader.c:1379
msgid "ill-formed rule: initial symbol not followed by colon"
msgstr "regola malformata: simbolo iniziale non seguito da `:'"
#: src/reader.c:1386
msgid "grammar starts with vertical bar"
msgstr "la grammatica comincia con un `|'"
#: src/reader.c:1414
#, c-format
msgid "rule given for %s, which is a token"
msgstr "fornita una regola per il token %s"
#: src/reader.c:1444 src/reader.c:1556
msgid "previous rule lacks an ending `;'"
msgstr ""
#: src/reader.c:1517
msgid "two @prec's in a row"
msgstr "due @prec di seguito"
#: src/reader.c:1525
#, c-format
msgid "%%guard present but %%semantic_parser not specified"
msgstr "trovato %%guard senza che sia specificato %%semantic_parser"
#: src/reader.c:1534
msgid "two actions at end of one rule"
msgstr "due azioni alla fine di una regola"
#: src/reader.c:1548
#, c-format
msgid "type clash (`%s' `%s') on default action"
msgstr "conflitto di tipo (`%s' e `%s') nell'azione di default"
#: src/reader.c:1554
msgid "empty rule for typed nonterminal, and no action"
msgstr "regola vuota e nessuna azione per un nonterminale con tipo"
#: src/reader.c:1600
#, c-format
msgid "invalid input: %s"
msgstr "input non valido: %s"
#: src/reader.c:1608
#, c-format
msgid "too many symbols (tokens plus nonterminals); maximum %d"
msgstr "troppi simboli (token e nonterminali); il massimo è %d"
#: src/reader.c:1611
msgid "no rules in the input grammar"
msgstr "nessuna regola nella grammatica di input"
#: src/reader.c:1635
#, c-format
msgid "symbol %s is used, but is not defined as a token and has no rules"
msgstr "usato il simbolo %s, ma non è un token e non ha regole"
#: src/reader.c:1770
#, c-format
msgid "tokens %s and %s both assigned number %d"
msgstr "i token %s e %s hanno lo stesso numero %d"
#: src/reader.c:1823
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "precedenze in conflitto per %s und %s"
#: src/reader.c:1835
#, c-format
msgid "conflicting assoc values for %s and %s"
msgstr "associatività in conflitto per %s e %s"
#: src/reader.c:1874
#, c-format
msgid "the start symbol %s is undefined"
msgstr "simbolo iniziale %s non definito"
#: src/reader.c:1876
#, c-format
msgid "the start symbol %s is a token"
msgstr "specificato il token %s come simbolo iniziale"
#: src/reduce.c:409
msgid "Useless nonterminals:"
msgstr "Simboli nonterminali inutili:"
#: src/reduce.c:422
msgid "Terminals which are not used:"
msgstr "Simboli terminali inutilizzati:"
#: src/reduce.c:433
msgid "Useless rules:"
msgstr "Regole inutili:"
#: src/reduce.c:503
#, c-format
msgid "%d rule never reduced\n"
msgid_plural "%d rules never reduced\n"
msgstr[0] "%d regola non applicata\n"
msgstr[1] "%d regole non applicate\n"
#: src/reduce.c:511
#, c-format
msgid "%d useless nonterminal"
msgid_plural "%d useless nonterminals"
msgstr[0] "%d simbolo nonterminale inutilizzato"
msgstr[1] "%d simboli nonterminali inutilizzati"
#: src/reduce.c:517
msgid " and "
msgstr " e "
#: src/reduce.c:520
#, c-format
msgid "%d useless rule"
msgid_plural "%d useless rules"
msgstr[0] "%d regola inutile"
msgstr[1] "%d regole inutili"
#: src/reduce.c:551
#, c-format
msgid "Start symbol %s does not derive any sentence"
msgstr "dal simbolo iniziale %s non deriva alcuna frase"
#: lib/getopt.c:694
#, c-format
msgid "%s: option `%s' is ambiguous\n"
msgstr "%s: l'opzione `%s' è ambigua\n"
#: lib/getopt.c:719
#, c-format
msgid "%s: option `--%s' doesn't allow an argument\n"
msgstr "%s: l'opzione `--%s' non ammette argomenti\n"
#: lib/getopt.c:724
#, c-format
msgid "%s: option `%c%s' doesn't allow an argument\n"
msgstr "%s: l'opzione `%c%s' non ammette argomenti\n"
#: lib/getopt.c:742 lib/getopt.c:915
#, c-format
msgid "%s: option `%s' requires an argument\n"
msgstr "%s: l'opzione `%s' richiede un argomento\n"
#. --option
#: lib/getopt.c:771
#, c-format
msgid "%s: unrecognized option `--%s'\n"
msgstr "%s: opzione sconosciuta `--%s'\n"
#. +option or -option
#: lib/getopt.c:775
#, c-format
msgid "%s: unrecognized option `%c%s'\n"
msgstr "%s: opzione sconosciuta `%c%s'\n"
#. 1003.2 specifies the format of this message.
#: lib/getopt.c:801
#, c-format
msgid "%s: illegal option -- %c\n"
msgstr "%s: opzione non valida -- %c\n"
#: lib/getopt.c:804
#, c-format
msgid "%s: invalid option -- %c\n"
msgstr "%s: opzione non valida -- %c\n"
#. 1003.2 specifies the format of this message.
#: lib/getopt.c:834 lib/getopt.c:964
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr "%s: l'opzione richiede un argomento -- %c\n"
#: lib/getopt.c:881
#, c-format
msgid "%s: option `-W %s' is ambiguous\n"
msgstr "%s: l'opzione `-W %s' è ambigua\n"
#: lib/getopt.c:899
#, c-format
msgid "%s: option `-W %s' doesn't allow an argument\n"
msgstr "%s: l'opzione `-W %s' non ammette un argomento\n"
#. If XALLOC_FAIL_FUNC is NULL, or does return, display this message
#. before exiting when memory is exhausted. Goes through gettext.
#: lib/obstack.c:494 lib/obstack.c:497 lib/xmalloc.c:66
msgid "memory exhausted"
msgstr "memoria esaurita"
#. Get translations for open and closing quotation marks.
#.
#. The message catalog should translate "`" to a left
#. quotation mark suitable for the locale, and similarly for
#. "'". If the catalog has no translation,
#. locale_quoting_style quotes `like this', and
#. clocale_quoting_style quotes "like this".
#.
#. For example, an American English Unicode locale should
#. translate "`" to U+201C (LEFT DOUBLE QUOTATION MARK), and
#. should translate "'" to U+201D (RIGHT DOUBLE QUOTATION
#. MARK). A British English Unicode locale should instead
#. translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and
#. U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.
#: lib/quotearg.c:274
msgid "`"
msgstr "`"
#: lib/quotearg.c:275
msgid "'"
msgstr "'"
#~ msgid "invalid value: %s%d"
#~ msgstr "valore non valido: %s%d"
#~ msgid "too many items (max %d)"
#~ msgstr "troppi elementi (max %d)"
BIN
View File
Binary file not shown.
+352 -324
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+354 -474
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+269 -228
View File
@@ -1,24 +1,24 @@
# ðÅÒÅ×ÏÄ ÓÏÏÂÝÅÎÉÊ bison.
# Copyright (C) 1999 Free Software Foundation, Inc.
# Dmitry S. Sivachenko <[email protected]>, 1999,2000,2001.
# Dmitry S. Sivachenko <[email protected]>, 1999,2000,2001,2002.
#
msgid ""
msgstr ""
"Project-Id-Version: bison 1.29\n"
"POT-Creation-Date: 2001-10-26 14:37+0200\n"
"PO-Revision-Date: 2001-09-09 13:49+04:00\n"
"Project-Id-Version: bison 1.32\n"
"POT-Creation-Date: 2002-03-04 19:13+0100\n"
"PO-Revision-Date: 2002-01-25 12:19+0300\n"
"Last-Translator: Dmitry S. Sivachenko <[email protected]>\n"
"Language-Team: Russian <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=koi8-r\n"
"Content-Transfer-Encoding: 8-bit\n"
#: src/LR0.c:207
#: src/LR0.c:189
#, c-format
msgid "too many states (max %d)"
msgstr "ÓÌÉÛËÏÍ ÍÎÏÇÏ ÓÏÓÔÏÑÎÉÊ (ÍÁËÓÉÍÁÌØÎÏ %d)"
#: lib/error.c:128 lib/error.c:156 src/complain.c:96
#: lib/error.c:128 lib/error.c:156 src/complain.c:99
msgid "Unknown system error"
msgstr "îÅÉÚ×ÅÓÔÎÁÑ ÓÉÓÔÅÍÎÁÑ ÏÛÉÂËÁ"
@@ -26,82 +26,88 @@ msgstr "
msgid "warning: "
msgstr "ÐÒÅÄÕÐÒÅÖÄÅÎÉÅ: "
#: src/complain.c:238 src/complain.c:279
#: src/complain.c:238
msgid "fatal error: "
msgstr "ÆÁÔÁÌØÎÁÑ ÏÛÉÂËÁ: "
#: src/conflicts.c:48
#: src/conflicts.c:44
#, c-format
msgid "Conflict in state %d between rule %d and token %s resolved as %s.\n"
msgstr ""
"ëÏÎÆÌÉËÔ × ÓÏÓÔÏÑÎÉÉ %d ÍÅÖÄÕ ÐÒÁ×ÉÌÏÍ %d É ÌÅËÓÅÍÏÊ %s ÒÁÚÒÅÛÅÎ ËÁË %s.\n"
#: src/conflicts.c:114 src/conflicts.c:137
#: src/conflicts.c:94 src/conflicts.c:119
msgid "reduce"
msgstr "×Ù×ÏÄ"
#: src/conflicts.c:120 src/conflicts.c:133
#: src/conflicts.c:101 src/conflicts.c:115
msgid "shift"
msgstr "ÓÄ×ÉÇ"
#: src/conflicts.c:141
#: src/conflicts.c:123
msgid "an error"
msgstr "ÏÛÉÂËÁ"
#: src/conflicts.c:421
msgid " 1 shift/reduce conflict"
msgstr " 1 ËÏÎÆÌÉËÔ ÓÄ×ÉÇÁ/×Ù×ÏÄÁ"
#: src/conflicts.c:426
#: src/conflicts.c:302
#, c-format
msgid " %d shift/reduce conflicts"
msgstr " %d ËÏÎÆÌÉËÔÏ× ÓÄ×ÉÇÁ/×Ù×ÏÄÁ"
msgid "%d shift/reduce conflict"
msgid_plural "%d shift/reduce conflicts"
msgstr[0] "%d ËÏÎÆÌÉËÔ ÓÄ×ÉÇÁ/×Ù×ÏÄÁ"
msgstr[1] "%d ËÏÎÆÌÉËÔÁ ÓÄ×ÉÇÁ/×Ù×ÏÄÁ"
msgstr[2] "%d ËÏÎÆÌÉËÔÏ× ÓÄ×ÉÇÁ/×Ù×ÏÄÁ"
#: src/conflicts.c:432
msgid " and"
msgstr " É"
#: src/conflicts.c:309
msgid "and"
msgstr "É"
#: src/conflicts.c:438
msgid " 1 reduce/reduce conflict"
msgstr " 1 ËÏÎÆÌÉËÔ ×Ù×ÏÄÁ/×Ù×ÏÄÁ"
#: src/conflicts.c:443
#: src/conflicts.c:315
#, c-format
msgid " %d reduce/reduce conflicts"
msgstr " %d ËÏÎÆÌÉËÔÏ× ×Ù×ÏÄÁ/×Ù×ÏÄÁ"
msgid "%d reduce/reduce conflict"
msgid_plural "%d reduce/reduce conflicts"
msgstr[0] "%d ËÏÎÆÌÉËÔ ×Ù×ÏÄÁ/×Ù×ÏÄÁ"
msgstr[1] "%d ËÏÎÆÌÉËÔÁ ×Ù×ÏÄÁ/×Ù×ÏÄÁ"
msgstr[2] "%d ËÏÎÆÌÉËÔÏ× ×Ù×ÏÄÁ/×Ù×ÏÄÁ"
#: src/conflicts.c:480
#: src/conflicts.c:340
#, c-format
msgid "State %d contains"
msgstr "óÏÓÔÏÑÎÉÅ %d ÓÏÄÅÒÖÉÔ"
msgid "State %d contains "
msgstr "óÏÓÔÏÑÎÉÅ %d ÓÏÄÅÒÖÉÔ "
#. If invoked with `--yacc', use the output format specified by
#. POSIX.
#: src/conflicts.c:491
#: src/conflicts.c:387
msgid "conflicts: "
msgstr "ËÏÎÆÌÉËÔÙ: "
#: src/conflicts.c:493
#: src/conflicts.c:389
#, c-format
msgid " %d shift/reduce"
msgstr " %d ÓÄ×ÉÇ/×Ù×ÏÄ"
#: src/conflicts.c:497
#: src/conflicts.c:393
#, c-format
msgid " %d reduce/reduce"
msgstr " %d ×Ù×ÏÄ/×Ù×ÏÄ"
#: src/conflicts.c:502
#: src/conflicts.c:398 src/reduce.c:508
#, c-format
msgid "%s contains"
msgstr "%s ÓÏÄÅÒÖÉÔ"
msgid "%s contains "
msgstr "%s ÓÏÄÅÒÖÉÔ "
#: src/conflicts.c:588 src/conflicts.c:709
#: src/conflicts.c:412
#, c-format
msgid "expected %d shift/reduce conflict\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] "ÏÖÉÄÁÌÓÑ %d ËÏÎÆÌÉËÔ ÓÄ×ÉÇÁ/×Ù×ÏÄÁ\n"
msgstr[1] "ÏÖÉÄÁÌÏÓØ %d ËÏÎÆÌÉËÔÁ ÓÄ×ÉÇÁ/×Ù×ÏÄÁ\n"
msgstr[2] "ÏÖÉÄÁÌÏÓØ %d ËÏÎÆÌÉËÔÏ× ÓÄ×ÉÇÁ/×Ù×ÏÄÁ\n"
#: src/conflicts.c:463 src/conflicts.c:540
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)]\n"
#: src/conflicts.c:600 src/print.c:171
#: src/conflicts.c:467 src/print.c:154
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
@@ -110,46 +116,37 @@ msgstr ""
" $default\t×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)\n"
"\n"
#: src/conflicts.c:689 src/conflicts.c:703
#: src/conflicts.c:521 src/conflicts.c:534
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\t×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)\n"
#: src/conflicts.c:730
#: src/conflicts.c:550
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\t×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)\n"
#: src/derives.c:43
msgid "DERIVES"
msgstr "DERIVES"
#: src/derives.c:48
#, c-format
msgid "%s derives"
msgstr "%s ×Ù×ÏÄÉÔ"
#: src/files.c:133
#: src/files.c:151
#, c-format
msgid "cannot open file `%s'"
msgstr "ÎÅ ÕÄÁÅÔÓÑ ÏÔËÒÙÔØ ÆÁÊÌ `%s'"
#: src/files.c:152
#: src/files.c:170
msgid "cannot close file"
msgstr "ÎÅ ÕÄÁÅÔÓÑ ÚÁËÒÙÔØ ÆÁÊÌ"
#. Some efforts were made to ease the translators' task, please
#. continue.
#: src/getargs.c:83
#: src/getargs.c:84
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
msgstr "GNU bison ÇÅÎÅÒÉÒÕÅÔ ÁÎÁÌÉÚÁÔÏÒÙ ÄÌÑ ÇÒÁÍÍÁÔÉË LALR(1).\n"
#: src/getargs.c:87
#: src/getargs.c:88
#, c-format
msgid "Usage: %s [OPTION]... FILE\n"
msgstr "éÓÐÏÌØÚÏ×ÁÎÉÅ: %s [ëìàþé]... æáêì\n"
#: src/getargs.c:91
#: src/getargs.c:92
msgid ""
"If a long option shows an argument as mandatory, then it is mandatory\n"
"for the equivalent short option also. Similarly for optional arguments.\n"
@@ -158,7 +155,7 @@ msgstr ""
"Ñ×ÌÑÅÔÓÑ ÏÂÑÚÁÔÅÌØÎÙÍ ÄÌÑ ËÏÒÏÔËÏÊ ÆÏÒÍÙ. ôÏ ÖÅ ËÁÓÁÅÔÓÑ ÎÅÏÂÑÚÁÔÅÌØÎÙÈ\n"
"ÁÒÇÕÍÅÎÔÏ×.\n"
#: src/getargs.c:97
#: src/getargs.c:98
msgid ""
"Operation modes:\n"
" -h, --help display this help and exit\n"
@@ -170,7 +167,7 @@ msgstr ""
" -V, --version ×Ù×ÅÓÔÉ ÉÎÆÏÒÍÁÃÉÀ Ï ×ÅÒÓÉÉ É ×ÙÊÔÉ\n"
" -y, --yacc ÜÍÕÌÉÒÏ×ÁÔØ POSIX yacc\n"
#: src/getargs.c:104
#: src/getargs.c:105
msgid ""
"Parser:\n"
" -S, --skeleton=FILE specify the skeleton to use\n"
@@ -190,42 +187,44 @@ msgstr ""
" -n, --no-parser ÇÅÎÅÒÉÒÏ×ÁÔØ ÔÏÌØËÏ ÔÁÂÌÉÃÙ\n"
" -k, --token-table ×ËÌÀÞÉÔØ ÔÁÂÌÉÃÕ ÉÍÅÎ ÌÅËÓÅÍ\n"
#: src/getargs.c:116
#: src/getargs.c:117
msgid ""
"Output:\n"
" -d, --defines also produce a header file\n"
" -v, --verbose also produce an explanation of the automaton\n"
" -b, --file-prefix=PREFIX specify a PREFIX for output files\n"
" -o, --output-file=FILE leave output to FILE\n"
" -g, --graph also produce a VCG graph description of the "
" -o, --output=FILE leave output to FILE\n"
" -g, --graph also produce a VCG description of the "
"automaton\n"
msgstr ""
"÷Ù×ÏÄ:\n"
" -d, --defines ÓÏÚÄÁÔØ ÔÁËÖÅ ÆÁÊÌ ÚÁÇÏÌÏ×ËÏ×\n"
" -v, --verbose ÓÏÚÄÁÔØ ÔÁËÖÅ ÐÏÑÓÎÅÎÉÑ × Á×ÔÏÍÁÔÕ\n"
" -b, --file-prefix=ðòåæéëó ÕËÁÚÁÔØ ðòåæéëó ÄÌÑ ×ÙÈÏÄÎÙÈ ÆÁÊÌÏ×\n"
" -o, --output-file=æáêì ÐÏÍÅÓÔÉÔØ ÒÅÚÕÌØÔÁÔ × æáêì\n"
" -o, --output=æáêì ÐÏÍÅÓÔÉÔØ ÒÅÚÕÌØÔÁÔ × æáêì\n"
" -g, --graph ÓÏÚÄÁÔØ ÔÁËÖÅ ÐÏÑÓÎÅÎÉÑ Ë Á×ÔÏÍÁÔÕ × ×ÉÄÅ \n"
"VCG-ÇÒÁÆÁ\n"
#: src/getargs.c:126
#: src/getargs.c:127
msgid "Report bugs to <[email protected]>.\n"
msgstr "ïÛÉÂËÉ ÓÏÏÂÝÁÊÔÅ ÐÏ ÁÄÒÅÓÕ <[email protected]>.\n"
#. Some efforts were made to ease the translators' task, please
#. continue.
#: src/getargs.c:140
#: src/getargs.c:141
#, c-format
msgid "bison (GNU Bison) %s"
msgstr "bison (GNU Bison) %s"
#: src/getargs.c:145
#: src/getargs.c:146
msgid ""
"Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
"Free Software Foundation, Inc.\n"
msgstr ""
"Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
"Free Software Foundation, Inc.\n"
#: src/getargs.c:149
#: src/getargs.c:151
msgid ""
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
@@ -236,478 +235,463 @@ msgstr ""
"ðòéçïäîïóôé\n"
"äìñ ïðòåäåìåîîïê ãåìé.\n"
#: src/getargs.c:214 src/lex.c:650
#: src/getargs.c:230 src/lex.c:705
#, c-format
msgid "`%s' is no longer supported"
msgstr "`%s' ÂÏÌØÛÅ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ"
#: src/getargs.c:238
#: src/getargs.c:254
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "éÓÐÏÌØÚÕÊÔÅ `%s --help' ÄÌÑ ÄÏÐÏÌÎÉÔÅÌØÎÏÊ ÉÎÆÏÒÍÁÃÉÉ.\n"
#: src/getargs.c:245
#: src/getargs.c:261
#, c-format
msgid "%s: no grammar file given\n"
msgstr "%s: ÎÅ ÚÁÄÁÎ ÆÁÊÌ Ó ÇÒÁÍÍÁÔÉËÏÊ\n"
#: src/getargs.c:249
#: src/getargs.c:265
#, c-format
msgid "%s: extra arguments ignored after `%s'\n"
msgstr "%s: ÌÉÛÎÉÅ ÁÒÇÕÍÅÎÔÙ ÐÏÓÌÅ `%s' ÉÇÎÏÒÉÒÏ×ÁÎÙ\n"
#: src/lalr.c:311
#: src/lalr.c:256
#, c-format
msgid "too many gotos (max %d)"
msgstr "ÓÌÉÛËÏÍ ÍÎÏÇÏ goto (ÍÁËÓÉÍÁÌØÎÏ %d)"
#: src/lex.c:78
#: src/lex.c:76
msgid "unexpected `/' found and ignored"
msgstr "×ÓÔÒÅÞÅÎ É ÐÒÏÉÇÎÏÒÉÒÏ×ÁÎ ÎÅÏÖÉÄÁÎÎÙÊ ÓÉÍ×ÏÌ `/'"
#: src/lex.c:107 src/reader.c:269
#: src/lex.c:105 src/reader.c:280
msgid "unterminated comment"
msgstr "ÎÅÚÁËÏÎÞÅÎÎÙÊ ËÏÍÍÅÎÔÁÒÉÊ"
#: src/lex.c:139
#: src/lex.c:137
msgid "unexpected end of file"
msgstr "ÎÅÏÖÉÄÁÎÎÙÊ ËÏÎÅÃ ÆÁÊÌÁ"
#: src/lex.c:168
#: src/lex.c:166
msgid "unescaped newline in constant"
msgstr "ÎÅÜËÒÁÎÉÒÏ×ÁÎÎÙÊ ÐÅÒÅ×ÏÄ ÓÔÒÏËÉ × ËÏÎÓÔÁÎÔÅ"
#: src/lex.c:210
#: src/lex.c:208
#, c-format
msgid "octal value outside range 0...255: `\\%o'"
msgstr "×ÏÓØÍÅÒÉÞÎÁÑ ×ÅÌÉÞÉÎÁ ÚÁ ÐÒÅÄÅÌÁÍÉ ÄÉÁÐÁÚÏÎÁ 0...255: `\\%o'"
#: src/lex.c:235
#: src/lex.c:233
#, c-format
msgid "hexadecimal value above 255: `\\x%x'"
msgstr "ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÁÑ ×ÅÌÉÞÉÎÁ ÐÒÅ×ÙÛÁÅÔ 255: `\\x%x'"
#: src/lex.c:247
#: src/lex.c:245
#, c-format
msgid "unknown escape sequence: `\\' followed by `%s'"
msgstr "ÎÅÉÚ×ÅÓÔÎÁÑ escape-ÐÏÓÌÅÄÏ×ÁÔÅÌØÎÏÓÔØ: `%s' ÐÏÓÌÅ `\\'"
#: src/lex.c:343
#: src/lex.c:342
msgid "unterminated type name at end of file"
msgstr "ÎÅÚÁËÏÎÞÅÎÎÏÅ ÉÍÑ ÔÉÐÁ × ËÏÎÃÅ ÆÁÊÌÁ"
#: src/lex.c:346
#: src/lex.c:345
msgid "unterminated type name"
msgstr "ÎÅÚÁËÏÎÞÅÎÎÏÅ ÉÍÑ ÔÉÐÁ"
#: src/lex.c:437
#: src/lex.c:438
msgid "use \"...\" for multi-character literal tokens"
msgstr "ÉÓÐÏÌØÚÕÊÔÅ \"...\" ÄÌÑ ÍÎÏÇÏÓÉÍ×ÏÌØÎÙÈ ÌÉÔÅÒÁÌØÎÙÈ ÌÅËÓÅÍ"
#: src/main.c:125
#: src/lex.c:678
#, c-format
msgid "%s: internal error: %s\n"
msgstr "%s: ×ÎÕÔÒÅÎÎÑÑ ÏÛÉÂËÁ: %s\n"
msgid "`%s' supports no argument: %s"
msgstr "`%s' ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ ÁÒÇÕÍÅÎÔÁ %s"
#: src/nullable.c:51
msgid "Entering set_nullable"
msgstr "÷ÈÏÄ × set_nullable"
#: src/lex.c:694
#, c-format
msgid "`%s' requires an argument"
msgstr "ËÌÀÞ `%s' ÄÏÌÖÅÎ ÉÓÐÏÌØÚÏ×ÁÔØÓÑ Ó ÁÒÇÕÍÅÎÔÏÍ"
#: src/output.c:986
#: src/output.c:951
#, c-format
msgid "maximum table size (%d) exceeded"
msgstr "ÐÒÅ×ÙÛÅÎ ÍÁËÓÉÍÁÌØÎÙÊ ÒÁÚÍÅÒ ÔÁÂÌÉÃÙ (%d)"
#: src/print.c:37
#: src/print.c:39
#, c-format
msgid " type %d is %s\n"
msgstr " ÔÉÐ %d Ñ×ÌÑÅÔÓÑ %s\n"
#: src/print.c:85
#: src/print.c:88
#, c-format
msgid " (rule %d)"
msgstr " (ÐÒÁ×ÉÌÏ %d)"
#: src/print.c:111
#: src/print.c:108
msgid " $default\taccept\n"
msgstr " $default\tÐÒÉÎÑÔÉÅ\n"
#: src/print.c:113
#: src/print.c:110
msgid " NO ACTIONS\n"
msgstr " îåô äåêóô÷éê\n"
#: src/print.c:132
#: src/print.c:124
#, c-format
msgid " $ \tgo to state %d\n"
msgstr " $ \tÐÅÒÅÈÏÄ × ÓÏÓÔÏÑÎÉÅ %d\n"
#: src/print.c:135
#: src/print.c:127
#, c-format
msgid " %-4s\tshift, and go to state %d\n"
msgstr " %-4s\tÓÄ×ÉÇ, É ÐÅÒÅÈÏÄ × ÓÏÓÔÏÑÎÉÅ %d\n"
#: src/print.c:159
#: src/print.c:142
#, c-format
msgid " %-4s\terror (nonassociative)\n"
msgstr " %-4s\tÏÛÉÂËÁ (ÎÅÁÓÓÏÃÉÁÔÉ×ÎÁÑ)\n"
#: src/print.c:187
#: src/print.c:169
#, c-format
msgid " %-4s\tgo to state %d\n"
msgstr " %-4s\tÐÅÒÅÈÏÄ × ÓÏÓÔÏÑÎÉÅ %d\n"
#: src/print.c:199
#: src/print.c:180
#, c-format
msgid "state %d"
msgstr "ÓÏÓÔÏÑÎÉÅ %d"
#. rule # : LHS -> RHS
#: src/print.c:229
#: src/print.c:211
msgid "Grammar"
msgstr "çÒÁÍÍÁÔÉËÁ"
#: src/print.c:234
#, c-format
msgid "rule %-4d %s ->"
msgstr "ÐÒÁ×ÉÌÏ %-4d %s ->"
#: src/print.c:212
msgid "Number, Line, Rule"
msgstr "îÏÍÅÒ, óÔÒÏËÁ, ðÒÁ×ÉÌÏ"
#: src/print.c:240
#: src/print.c:217
#, c-format
msgid " %3d %3d %s ->"
msgstr " %3d %3d %s ->"
#: src/print.c:224
msgid "empty"
msgstr ""
msgstr "ÐÕÓÔÏ"
#. TERMINAL (type #) : rule #s terminal is on RHS
#: src/print.c:244
#: src/print.c:231
msgid "Terminals, with rules where they appear"
msgstr "ôÅÒÍÉÎÁÌØÎÙÅ ÓÉÍ×ÏÌÙ Ó ÐÒÁ×ÉÌÁÍÉ, × ËÏÔÏÒÙÈ ÏÎÉ ÐÏÑ×ÌÑÀÔÓÑ"
#: src/print.c:268
#: src/print.c:256
msgid "Nonterminals, with rules where they appear"
msgstr "îÅÔÅÒÍÉÎÁÌØÎÙÅ ÓÉÍ×ÏÌÙ Ó ÐÒÁ×ÉÌÁÍÉ, × ËÏÔÏÒÙÈ ÏÎÉ ÐÏÑ×ÌÑÀÔÓÑ"
#: src/print.c:294
#: src/print.c:282
msgid " on left:"
msgstr " ÎÁÌÅ×Ï:"
#: src/print.c:309
#: src/print.c:297
msgid " on right:"
msgstr " ÎÁÐÒÁ×Ï:"
#: src/print_graph.c:174
#. If something has been added in the NODE_OBSTACK after
#. the declaration of the label, then we need a `\n'.
#. if (obstack_object_size (node_obstack) > node_output_size)
#. obstack_sgrow (node_obstack, "\n");
#.
#: src/print_graph.c:146
#, c-format
msgid "%-4s\terror (nonassociative)"
msgstr "%-4s\tÏÛÉÂËÁ (ÎÅÁÓÓÏÃÉÁÔÉ×ÎÁÑ)"
#: src/print_graph.c:187
#.
#. if (obstack_object_size (node_obstack) > node_output_size)
#. obstack_sgrow (node_obstack, "\n");
#.
#: src/print_graph.c:161
#, c-format
msgid "$default\treduce using rule %d (%s)"
msgstr "$default\t×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)"
#: src/reader.c:78
#: src/reader.c:89
msgid " Skipping to next \\n"
msgstr " ðÒÏÐÕÓË ÄÏ ÓÌÅÄÕÀÝÅÇÏ \\n"
#: src/reader.c:80
#: src/reader.c:91
#, c-format
msgid " Skipping to next %c"
msgstr " ðÒÏÐÕÓË ÄÏ ÓÌÅÄÕÀÝÅÇÏ %c"
#: src/reader.c:131 src/reader.c:143
#: src/reader.c:142 src/reader.c:154
msgid "invalid $ value"
msgstr "ÎÅ×ÅÒÎÏÅ $ ÚÎÁÞÅÎÉÅ"
#: src/reader.c:169 src/reader.c:184
#: src/reader.c:180 src/reader.c:195
msgid "unterminated string at end of file"
msgstr "ÎÅÚÁËÏÎÞÅÎÎÁÑ ÓÔÒÏËÁ × ËÏÎÃÅ ÆÁÊÌÁ"
#: src/reader.c:172
#: src/reader.c:183
msgid "unterminated string"
msgstr "ÎÅÚÁËÏÎÞÅÎÎÁÑ ÓÔÒÏËÁ"
#: src/reader.c:325 src/reader.c:389
#: src/reader.c:339
#, fuzzy
msgid "invalid @ value"
msgstr "ÎÅ×ÅÒÎÏÅ $ ÚÎÁÞÅÎÉÅ"
#: src/reader.c:352 src/reader.c:416
#, c-format
msgid "%s is invalid"
msgstr "ÎÅ×ÅÒÎÙÊ ÚÎÁË %s"
#: src/reader.c:365
#: src/reader.c:392
#, c-format
msgid "$$ of `%s' has no declared type"
msgstr "$$ × `%s' ÎÅ ÉÍÅÅÔ ÏÐÉÓÁÎÎÏÇÏ ÔÉÐÁ"
#: src/reader.c:382
#: src/reader.c:409
#, c-format
msgid "$%d of `%s' has no declared type"
msgstr "$%d ÉÚ `%s' ÎÅ ÉÍÅÅÔ ÏÐÉÓÁÎÎÏÇÏ ÔÉÐÁ"
#: src/reader.c:436
#: src/reader.c:463
msgid "unterminated `%{' definition"
msgstr "ÎÅÚÁËÏÎÞÅÎÎÏÅ ÏÐÒÅÄÅÌÅÎÉÅ `%{'"
#: src/reader.c:481 src/reader.c:595 src/reader.c:645
#: src/reader.c:508 src/reader.c:623 src/reader.c:673
#, c-format
msgid "Premature EOF after %s"
msgstr "ðÒÅÖÄÅ×ÒÅÍÅÎÎÙÊ ËÏÎÅà ÆÁÊÌÁ ÐÏÓÌÅ %s"
#: src/reader.c:498
#: src/reader.c:525
#, c-format
msgid "symbol `%s' used more than once as a literal string"
msgstr ""
#: src/reader.c:501
#: src/reader.c:528
#, c-format
msgid "symbol `%s' given more than one literal string"
msgstr ""
#: src/reader.c:522 src/reader.c:664
#: src/reader.c:549 src/reader.c:692
#, c-format
msgid "symbol %s redefined"
msgstr "ÐÏ×ÔÏÒÎÏÅ ÏÐÒÅÄÅÌÅÎÉÅ ÓÉÍ×ÏÌÁ %s"
#: src/reader.c:532 src/reader.c:610 src/reader.c:671 src/reader.c:1285
#: src/reader.c:559 src/reader.c:638 src/reader.c:699 src/reader.c:1314
#, c-format
msgid "type redeclaration for %s"
msgstr "ÐÏ×ÔÏÒÎÏÅ ÏÐÉÓÁÎÉÅ ÔÉÐÁ ÄÌÑ %s"
#: src/reader.c:541
#: src/reader.c:568
#, c-format
msgid "`%s' is invalid in %s"
msgstr "`%s' ÎÅ×ÅÒÎÏ × %s"
#: src/reader.c:558 src/reader.c:717
#: src/reader.c:586 src/reader.c:751
#, c-format
msgid "multiple %s declarations"
msgstr "ÍÎÏÖÅÓÔ×ÅÎÎÏÅ ÏÐÉÓÁÎÉÅ %s"
#: src/reader.c:560 src/reader.c:897 src/reader.c:922 src/reader.c:1263
#: src/reader.c:588 src/reader.c:930 src/reader.c:955 src/reader.c:1292
#, c-format
msgid "invalid %s declaration"
msgstr "ÎÅ×ÅÒÎÏÅ ÏÐÉÓÁÎÉÅ %s"
#: src/reader.c:580
#: src/reader.c:608
msgid "%type declaration has no <typename>"
msgstr "ÏÐÉÓÁÎÉÅ %type ÎÅ ÉÍÅÅÔ <ÉÍÑ_ÔÉÐÁ>"
#: src/reader.c:615
#: src/reader.c:643
#, c-format
msgid "invalid %%type declaration due to item: %s"
msgstr "ÎÅ×ÅÒÎÏÅ ÏÐÉÓÁÎÉÅ %%type ÉÚ-ÚÁ ÜÌÅÍÅÎÔÁ: %s"
#: src/reader.c:660
#: src/reader.c:688
#, c-format
msgid "redefining precedence of %s"
msgstr "ÐÅÒÅÏÐÒÅÄÅÌÅÎÉÅ ÐÒÉÏÒÉÔÅÔÁ ÄÌÑ %s"
#: src/reader.c:683
#: src/reader.c:711
#, c-format
msgid "invalid text (%s) - number should be after identifier"
msgstr "ÎÅ×ÅÒÎÙÊ ÔÅËÓÔ (%s) - ÞÉÓÌÏ ÄÏÌÖÎÏ ÓÌÅÄÏ×ÁÔØ ÚÁ ÉÄÅÎÔÉÆÉËÁÔÏÒÏÍ"
#: src/reader.c:693
#: src/reader.c:721
#, c-format
msgid "unexpected item: %s"
msgstr "ÎÅÏÖÉÄÁÎÎÙÊ ÜÌÅÍÅÎÔ: %s"
#: src/reader.c:760 src/reader.c:1089 src/reader.c:1160
#: src/reader.c:794 src/reader.c:1126 src/reader.c:1203
#, c-format
msgid "unmatched %s"
msgstr "ÎÅÐÁÒÎÁÑ %s"
#: src/reader.c:792
#: src/reader.c:826
#, c-format
msgid "argument of %%expect is not an integer"
msgstr "ÁÒÇÕÍÅÎÔ %%expect ÎÅ Ñ×ÌÑÅÔÓÑ ÃÅÌÙÍ ÞÉÓÌÏÍ"
#: src/reader.c:838
#: src/reader.c:872
#, c-format
msgid "unrecognized item %s, expected an identifier"
msgstr "ÎÅÒÁÓÐÏÚÎÁÎÎÙÊ ÜÌÅÍÅÎÔ %s, ÏÖÉÄÁÌÓÑ ÉÄÅÎÔÉÆÉËÁÔÏÒ"
#: src/reader.c:862
#: src/reader.c:894
#, c-format
msgid "expected string constant instead of %s"
msgstr "×ÍÅÓÔÏ %s ÏÖÉÄÁÌÁÓØ ÓÔÒÏËÏ×ÁÑ ÐÏÓÔÏÑÎÎÁÑ"
#: src/reader.c:1005
#: src/reader.c:1042
#, c-format
msgid "unrecognized: %s"
msgstr "ÎÅÒÁÓÐÏÚÎÁÎÏ: %s"
#: src/reader.c:1010
#: src/reader.c:1047
msgid "no input grammar"
msgstr "ÎÅÔ ×ÈÏÄÎÏÊ ÇÒÁÍÍÁÔÉËÉ"
#: src/reader.c:1015
#: src/reader.c:1052
#, c-format
msgid "unknown character: %s"
msgstr "ÎÅÉÚ×ÅÓÔÎÙÊ ÓÉÍ×ÏÌ: %s"
#: src/reader.c:1183
#: src/reader.c:1226
#, c-format
msgid "unterminated %guard clause"
msgstr "ÎÅÚÁËÏÎÞÅÎÎÙÊ ÏÐÅÒÁÔÏÒ %guard"
#: src/reader.c:1350
#: src/reader.c:1379
msgid "ill-formed rule: initial symbol not followed by colon"
msgstr "ÎÅ×ÅÒÎÏÅ ÐÒÁ×ÉÌÏ: Ä×ÏÅÔÏÞÉÅ ÎÅ ÓÌÅÄÕÅÔ ÚÁ ÎÁÞÁÌØÎÙÍ ÓÉÍ×ÏÌÏÍ"
#: src/reader.c:1357
#: src/reader.c:1386
msgid "grammar starts with vertical bar"
msgstr "ÇÒÁÍÍÁÔÉËÁ ÎÁÞÉÎÁÅÔÓÑ Ó ×ÅÒÔÉËÁÌØÎÏÊ ÞÅÒÔÙ"
#: src/reader.c:1388
#: src/reader.c:1414
#, c-format
msgid "rule given for %s, which is a token"
msgstr "ÐÒÁ×ÉÌÏ ÚÁÄÁÎÏ ÄÌÑ %s, ËÏÔÏÒÙÊ Ñ×ÌÑÅÔÓÑ ÌÅËÓÅÍÏÊ"
#: src/reader.c:1490
#: src/reader.c:1444 src/reader.c:1556
msgid "previous rule lacks an ending `;'"
msgstr ""
#: src/reader.c:1517
msgid "two @prec's in a row"
msgstr "Ä×Á @prec ÐÏÄÒÑÄ"
#: src/reader.c:1498
#: src/reader.c:1525
#, c-format
msgid "%%guard present but %%semantic_parser not specified"
msgstr "%%guard ÐÒÉÓÕÔÓÔ×ÕÅÔ, Á %%semantic_parser ÎÅ ÚÁÄÁÎ"
#: src/reader.c:1507
#: src/reader.c:1534
msgid "two actions at end of one rule"
msgstr "Ä×Á ÄÅÊÓÔ×ÉÑ × ËÏÎÃÅ ÏÄÎÏÇÏ ÐÒÁ×ÉÌÁ"
#: src/reader.c:1521
#: src/reader.c:1548
#, c-format
msgid "type clash (`%s' `%s') on default action"
msgstr "ËÏÎÆÌÉËÔ ÔÉÐÏ× (`%s' `%s') ÎÁ ÄÅÊÓÔ×ÉÉ ÐÏ ÕÍÏÌÞÁÎÉÀ"
#: src/reader.c:1527
#: src/reader.c:1554
msgid "empty rule for typed nonterminal, and no action"
msgstr ""
"ÐÕÓÔÏÅ ÐÒÁ×ÉÌÏ ÄÌÑ ÔÉÐÉÚÉÒÏ×ÁÎÎÏÇÏ ÎÅÔÅÒÍÉÎÁÌØÎÏÇÏ ÓÉÍ×ÏÌÁ, É ÎÅÔ ÄÅÊÓÔ×ÉÑ"
#: src/reader.c:1571
#: src/reader.c:1600
#, c-format
msgid "invalid input: %s"
msgstr "ÎÅ×ÅÒÎÙÅ ×ÈÏÄÎÙÅ ÄÁÎÎÙÅ: %s"
#: src/reader.c:1579
#: src/reader.c:1608
#, c-format
msgid "too many symbols (tokens plus nonterminals); maximum %d"
msgstr "ÓÌÉÛËÏÍ ÍÎÏÇÏ ÓÉÍ×ÏÌÏ× (ÌÅËÓÅÍÙ ÐÌÀÓ ÎÅÔÅÒÍÉÎÁÌÙ); ÍÁËÓÉÍÁÌØÎÏ %d"
#: src/reader.c:1582
#: src/reader.c:1611
msgid "no rules in the input grammar"
msgstr "ÏÔÓÕÔÓÔ×ÕÀÔ ÐÒÁ×ÉÌÁ ×Ï ×ÈÏÄÎÏÊ ÇÒÁÍÍÁÔÉËÅ"
#: src/reader.c:1606
#: src/reader.c:1635
#, c-format
msgid "symbol %s is used, but is not defined as a token and has no rules"
msgstr "ÓÉÍ×ÏÌ %s ÉÓÐÏÌØÚÕÅÔÓÑ, ÎÏ ÎÅ ÏÐÒÅÄÅÌÅÎ ËÁË ÌÅËÓÅÍÁ É ÎÅ ÉÍÅÅÔ ÐÒÁ×ÉÌ"
#: src/reader.c:1712
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "ÐÒÏÔÉ×ÏÒÅÞÉ×ÙÅ ÐÒÉÏÒÉÔÅÔÙ ÄÌÑ %s É %s"
#: src/reader.c:1724
#, c-format
msgid "conflicting assoc values for %s and %s"
msgstr "ÐÒÏÔÉ×ÏÒÅÞÉ×ÙÅ ÚÎÁÞÅÎÉÑ ÁÓÓÏÃÉÁÔÉ×ÎÏÓÔÉ ÄÌÑ %s É %s"
#: src/reader.c:1770
#, c-format
msgid "tokens %s and %s both assigned number %d"
msgstr "ÏÂÅÉÍ ÌÅËÓÅÍÁÍ %s É %s ÐÒÉÓ×ÏÅÎ ÎÏÍÅÒ %d"
#: src/reader.c:1782
#: src/reader.c:1823
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "ÐÒÏÔÉ×ÏÒÅÞÉ×ÙÅ ÐÒÉÏÒÉÔÅÔÙ ÄÌÑ %s É %s"
#: src/reader.c:1835
#, c-format
msgid "conflicting assoc values for %s and %s"
msgstr "ÐÒÏÔÉ×ÏÒÅÞÉ×ÙÅ ÚÎÁÞÅÎÉÑ ÁÓÓÏÃÉÁÔÉ×ÎÏÓÔÉ ÄÌÑ %s É %s"
#: src/reader.c:1874
#, c-format
msgid "the start symbol %s is undefined"
msgstr "ÎÁÞÁÌØÎÙÊ ÓÉÍ×ÏÌ %s ÎÅÏÐÒÅÄÅÌÅÎ"
#: src/reader.c:1784
#: src/reader.c:1876
#, c-format
msgid "the start symbol %s is a token"
msgstr "ÎÁÞÁÌØÎÙÊ ÓÉÍ×ÏÌ %s Ñ×ÌÑÅÔÓÑ ÌÅËÓÅÍÏÊ"
#: src/reduce.c:401
#: src/reduce.c:409
msgid "Useless nonterminals:"
msgstr "âÅÓÐÏÌÅÚÎÙÅ ÎÅÔÅÒÍÉÎÁÌÙ:"
#: src/reduce.c:416
#: src/reduce.c:422
msgid "Terminals which are not used:"
msgstr "îÅÉÓÐÏÌØÚÏ×ÁÎÎÙÅ ÔÅÒÍÉÎÁÌÙ:"
#: src/reduce.c:427
#: src/reduce.c:433
msgid "Useless rules:"
msgstr "âÅÓÐÏÌÅÚÎÙÅ ÐÒÁ×ÉÌÁ:"
#: src/reduce.c:456
msgid ""
"Variables\n"
"---------\n"
"\n"
msgstr ""
"ðÅÒÅÍÅÎÎÙÅ\n"
"----------\n"
"\n"
#: src/reduce.c:458
msgid "Value Sprec Sassoc Tag\n"
msgstr "úÎÁÞ ðÒÉÏÒ áÓÓÏÃ ôÅÇ\n"
#: src/reduce.c:463
msgid ""
"Rules\n"
"-----\n"
"\n"
msgstr ""
"ðÒÁ×ÉÌÁ\n"
"-------\n"
"\n"
#: src/reduce.c:474
msgid ""
"Rules interpreted\n"
"-----------------\n"
"\n"
msgstr ""
"éÎÔÅÒÐÒÅÔÉÒÏ×ÁÎÎÙÅ ÐÒÁ×ÉÌÁ\n"
"--------------------------\n"
"\n"
#: src/reduce.c:491
#: src/reduce.c:503
#, c-format
msgid "%d rules never reduced\n"
msgstr "%d ÐÒÁ×ÉÌ ÎÅ Ó×ÅÄÅÎÏ\n"
msgid "%d rule never reduced\n"
msgid_plural "%d rules never reduced\n"
msgstr[0] "%d ÐÒÁ×ÉÌÏ ÎÅ Ó×ÅÄÅÎÏ\n"
msgstr[1] "%d ÐÒÁ×ÉÌÁ ÎÅ Ó×ÅÄÅÎÏ\n"
msgstr[2] "%d ÐÒÁ×ÉÌ ÎÅ Ó×ÅÄÅÎÏ\n"
#: src/reduce.c:493
#: src/reduce.c:511
#, c-format
msgid "%s contains "
msgstr "%s ÓÏÄÅÒÖÉÔ "
msgid "%d useless nonterminal"
msgid_plural "%d useless nonterminals"
msgstr[0] "%d ÂÅÓÐÏÌÅÚÎÙÊ ÎÅÔÅÒÍÉÎÁÌ"
msgstr[1] "%d ÂÅÓÐÏÌÅÚÎÙÈ ÎÅÔÅÒÍÉÎÁÌÁ"
msgstr[2] "%d ÂÅÓÐÏÌÅÚÎÙÈ ÎÅÔÅÒÍÉÎÁÌÏ×"
#: src/reduce.c:497
#, c-format
msgid "%d useless nonterminal%s"
msgstr "%d ÂÅÓÐÏÌÅÚÎÙÈ ÎÅÔÅÒÍÉÎÁÌÏ×%s"
#: src/reduce.c:502
#: src/reduce.c:517
msgid " and "
msgstr " É "
#: src/reduce.c:506
#: src/reduce.c:520
#, c-format
msgid "%d useless rule%s"
msgstr "%d ÂÅÓÐÏÌÅÚÎÙÈ ÐÒÁ×ÉÌ%s"
msgid "%d useless rule"
msgid_plural "%d useless rules"
msgstr[0] "%d ÂÅÓÐÏÌÅÚÎÏÅ ÐÒÁ×ÉÌÏ"
msgstr[1] "%d ÂÅÓÐÏÌÅÚÎÙÈ ÐÒÁ×ÉÌÁ"
msgstr[2] "%d ÂÅÓÐÏÌÅÚÎÙÈ ÐÒÁ×ÉÌ"
#: src/reduce.c:539
#: src/reduce.c:551
#, c-format
msgid "Start symbol %s does not derive any sentence"
msgstr "îÁÞÁÌØÎÙÊ ÓÉÍ×ÏÌ %s ÎÅ ×Ù×ÏÄÉÔ ÎÉ ÏÄÎÏÇÏ ÐÒÅÄÌÏÖÅÎÉÑ"
#: src/reduce.c:552
#, c-format
msgid ""
"reduced %s defines %d terminal%s, %d nonterminal%s, and %d production%s.\n"
msgstr ""
"×Ù×ÅÄÅÎÎÙÊ %s ÏÐÒÅÄÅÌÑÅÔ %d ÔÅÒÍÉÎÁÌÏ×%s, %d ÎÅÔÅÒÍÉÎÁÌÏ×%s, É %d ÐÒÁ×ÉÌ "
"×Ù×ÏÄÁ%s.\n"
#: lib/getopt.c:694
#, c-format
msgid "%s: option `%s' is ambiguous\n"
@@ -787,14 +771,35 @@ msgstr "
#. MARK). A British English Unicode locale should instead
#. translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and
#. U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.
#: lib/quotearg.c:268
#: lib/quotearg.c:274
msgid "`"
msgstr "`"
#: lib/quotearg.c:269
#: lib/quotearg.c:275
msgid "'"
msgstr "'"
#~ msgid " 1 shift/reduce conflict"
#~ msgstr " 1 ËÏÎÆÌÉËÔ ÓÄ×ÉÇÁ/×Ù×ÏÄÁ"
#~ msgid " 1 reduce/reduce conflict"
#~ msgstr " 1 ËÏÎÆÌÉËÔ ×Ù×ÏÄÁ/×Ù×ÏÄÁ"
#~ msgid "%s contains"
#~ msgstr "%s ÓÏÄÅÒÖÉÔ"
#~ msgid "DERIVES"
#~ msgstr "DERIVES"
#~ msgid "%s derives"
#~ msgstr "%s ×Ù×ÏÄÉÔ"
#~ msgid "%s: internal error: %s\n"
#~ msgstr "%s: ×ÎÕÔÒÅÎÎÑÑ ÏÛÉÂËÁ: %s\n"
#~ msgid "Entering set_nullable"
#~ msgstr "÷ÈÏÄ × set_nullable"
#~ msgid "\t\t/* empty */"
#~ msgstr "\t\t/* ÐÕÓÔÏ */"
@@ -804,5 +809,41 @@ msgstr "'"
#~ msgid "multiple %%source_extension declarations"
#~ msgstr "ÍÎÏÖÅÓÔ×ÅÎÎÙÅ ÏÐÉÓÁÎÉÑ %%source_extension"
#~ msgid ""
#~ "Variables\n"
#~ "---------\n"
#~ "\n"
#~ msgstr ""
#~ "ðÅÒÅÍÅÎÎÙÅ\n"
#~ "----------\n"
#~ "\n"
#~ msgid "Value Sprec Sassoc Tag\n"
#~ msgstr "úÎÁÞ ðÒÉÏÒ áÓÓÏÃ ôÅÇ\n"
#~ msgid ""
#~ "Rules\n"
#~ "-----\n"
#~ "\n"
#~ msgstr ""
#~ "ðÒÁ×ÉÌÁ\n"
#~ "-------\n"
#~ "\n"
#~ msgid ""
#~ "Rules interpreted\n"
#~ "-----------------\n"
#~ "\n"
#~ msgstr ""
#~ "éÎÔÅÒÐÒÅÔÉÒÏ×ÁÎÎÙÅ ÐÒÁ×ÉÌÁ\n"
#~ "--------------------------\n"
#~ "\n"
#~ msgid ""
#~ "reduced %s defines %d terminal%s, %d nonterminal%s, and %d production%s.\n"
#~ msgstr ""
#~ "×Ù×ÅÄÅÎÎÙÊ %s ÏÐÒÅÄÅÌÑÅÔ %d ÔÅÒÍÉÎÁÌÏ×%s, %d ÎÅÔÅÒÍÉÎÁÌÏ×%s, É %d ÐÒÁ×ÉÌ "
#~ "×Ù×ÏÄÁ%s.\n"
#~ msgid "@%s is invalid"
#~ msgstr "ÎÅ×ÅÒÎÙÊ ÚÎÁË @%s"
+778
View File
@@ -0,0 +1,778 @@
# Swedish messages for bison.
# Copyright © 2001, 2002 Free Software Foundation, Inc.
# Göran Uddeborg <[email protected]>, 2001, 2002.
# $Revision$
#
msgid ""
msgstr ""
"Project-Id-Version: bison 1.33b\n"
"POT-Creation-Date: 2002-03-04 19:13+0100\n"
"PO-Revision-Date: 2002-03-05 10:18+0100\n"
"Last-Translator: Göran Uddeborg <[email protected]>\n"
"Language-Team: Swedish <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/LR0.c:189
#, c-format
msgid "too many states (max %d)"
msgstr "för många tillstånd (max %d)"
#: lib/error.c:128 lib/error.c:156 src/complain.c:99
msgid "Unknown system error"
msgstr "Okänt systemfel"
#: src/complain.c:150
msgid "warning: "
msgstr "varning: "
#: src/complain.c:238
msgid "fatal error: "
msgstr "ödesdigert fel: "
#: src/conflicts.c:44
#, c-format
msgid "Conflict in state %d between rule %d and token %s resolved as %s.\n"
msgstr ""
"Konflikt i tillstånd %d mellan regel %d och element %s, löstes med %s.\n"
#: src/conflicts.c:94 src/conflicts.c:119
msgid "reduce"
msgstr "reducera"
#: src/conflicts.c:101 src/conflicts.c:115
msgid "shift"
msgstr "skifta"
#: src/conflicts.c:123
msgid "an error"
msgstr "ett fel"
#: src/conflicts.c:302
#, c-format
msgid "%d shift/reduce conflict"
msgid_plural "%d shift/reduce conflicts"
msgstr[0] "%d skifta/reducerakonflikt"
msgstr[1] "%d skifta/reducerakonflikter"
#: src/conflicts.c:309
msgid "and"
msgstr "och"
#: src/conflicts.c:315
#, c-format
msgid "%d reduce/reduce conflict"
msgid_plural "%d reduce/reduce conflicts"
msgstr[0] "%d reducera/reducerakonflikt"
msgstr[1] "%d reducera/reducerakonflikter"
#: src/conflicts.c:340
#, c-format
msgid "State %d contains "
msgstr "Tillstånd %d innehåller "
#. If invoked with `--yacc', use the output format specified by
#. POSIX.
#: src/conflicts.c:387
msgid "conflicts: "
msgstr "konflikter: "
#: src/conflicts.c:389
#, c-format
msgid " %d shift/reduce"
msgstr " %d skifta/reducera"
#: src/conflicts.c:393
#, c-format
msgid " %d reduce/reduce"
msgstr " %d reducera/reducera"
#: src/conflicts.c:398 src/reduce.c:508
#, c-format
msgid "%s contains "
msgstr "%s innehåller "
#: src/conflicts.c:412
#, c-format
msgid "expected %d shift/reduce conflict\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] "förväntade %d skifta/reducerakonflikt\n"
msgstr[1] "förväntade %d skifta/reducerakonflikter\n"
#: src/conflicts.c:463 src/conflicts.c:540
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[reducera med regel %d (%s)]\n"
#: src/conflicts.c:467 src/print.c:154
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
"\n"
msgstr ""
" $standard\treducera med regel %d (%s)\n"
"\n"
#: src/conflicts.c:521 src/conflicts.c:534
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\treducera med regel %d (%s)\n"
#: src/conflicts.c:550
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $standard\treducera med regel %d (%s)\n"
#: src/files.c:151
#, c-format
msgid "cannot open file `%s'"
msgstr "kan inte öppna filen \"%s\""
#: src/files.c:170
msgid "cannot close file"
msgstr "kan inte stänga fil"
#. Some efforts were made to ease the translators' task, please
#. continue.
#: src/getargs.c:84
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
msgstr "GNU bison genererar parsrar för LALR(1)-grammatiker.\n"
#: src/getargs.c:88
#, c-format
msgid "Usage: %s [OPTION]... FILE\n"
msgstr "Användning: %s [FLAGGA]... FIL\n"
#: src/getargs.c:92
msgid ""
"If a long option shows an argument as mandatory, then it is mandatory\n"
"for the equivalent short option also. Similarly for optional arguments.\n"
msgstr ""
"Om en lång flagga visar ett argument som obligatoriskt är det\n"
"obligatoriskt för den motsvarande korta flaggan också. Motsvarande\n"
"för valfria argument.\n"
#: src/getargs.c:98
msgid ""
"Operation modes:\n"
" -h, --help display this help and exit\n"
" -V, --version output version information and exit\n"
" -y, --yacc emulate POSIX yacc\n"
msgstr ""
"Arbetslägen:\n"
" -h, --help visa denna hjälptext och avsluta\n"
" -V, --version visa versionsinformation och avsluta\n"
" -y, --yacc emulera POSIX-yacc\n"
#: src/getargs.c:105
msgid ""
"Parser:\n"
" -S, --skeleton=FILE specify the skeleton to use\n"
" -t, --debug instrument the parser for debugging\n"
" --locations enable locations computation\n"
" -p, --name-prefix=PREFIX prepend PREFIX to the external symbols\n"
" -l, --no-lines don't generate `#line' directives\n"
" -n, --no-parser generate the tables only\n"
" -k, --token-table include a table of token names\n"
msgstr ""
"Tolk:\n"
" -S, --skeleton=FIL ange skelettfilen som skall användas\n"
" -t, --debug instrumentera tolken för felsökning\n"
" --locations aktivera lägesberäkning\n"
" -p, --name-prefix=PREFIX lägg till PREFIX före externa symboler\n"
" -l, --no-lines generera inte \"#line\"-direktiv\n"
" -n, --no-parser generera endast tabellerna\n"
" -k, --token-table inkludera en tabell över elementnamn\n"
#: src/getargs.c:117
msgid ""
"Output:\n"
" -d, --defines also produce a header file\n"
" -v, --verbose also produce an explanation of the automaton\n"
" -b, --file-prefix=PREFIX specify a PREFIX for output files\n"
" -o, --output=FILE leave output to FILE\n"
" -g, --graph also produce a VCG description of the "
"automaton\n"
msgstr ""
"Utdata:\n"
" -d, --defines skapa också en huvudfil\n"
" -v, --verbose skapa också en förklaring av automaten\n"
" -b, --file-prefix=PREFIX ange ett PREFIX för utdatafiler\n"
" -o, --output=FIL lägg utdata i FIL\n"
" -g, --graph skapa också en VCG-beskrivning av automaten\n"
#: src/getargs.c:127
msgid "Report bugs to <[email protected]>.\n"
msgstr ""
"Rapportera fel till <[email protected]>.\n"
"Rapportera synpunkter på översättningen till <[email protected]>.\n"
#. Some efforts were made to ease the translators' task, please
#. continue.
#: src/getargs.c:141
#, c-format
msgid "bison (GNU Bison) %s"
msgstr "bison (GNU Bison) %s"
#: src/getargs.c:146
msgid ""
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
"Free Software Foundation, Inc.\n"
msgstr ""
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
"Free Software Foundation, Inc.\n"
#: src/getargs.c:151
msgid ""
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
msgstr ""
"Detta är fri programvara, se källkoden för kopieringsvillkor. Det\n"
"finns INGEN garanti, inte ens för SÄLJBARHET eller LÄMPLIGHET FÖR ETT\n"
"SPECIELLT ÄNDAMÅL.\n"
#: src/getargs.c:230 src/lex.c:705
#, c-format
msgid "`%s' is no longer supported"
msgstr "\"%s\" stöds inte längre"
#: src/getargs.c:254
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "Försök med \"%s --help\" för mer information.\n"
#: src/getargs.c:261
#, c-format
msgid "%s: no grammar file given\n"
msgstr "%s: ingen grammatikfil angiven\n"
#: src/getargs.c:265
#, c-format
msgid "%s: extra arguments ignored after `%s'\n"
msgstr "%s: extra argument ignorerade efter \"%s\"\n"
#: src/lalr.c:256
#, c-format
msgid "too many gotos (max %d)"
msgstr "för många goto (max %d)"
#: src/lex.c:76
msgid "unexpected `/' found and ignored"
msgstr "oväntat \"/\" hittat och ignorerat"
#: src/lex.c:105 src/reader.c:280
msgid "unterminated comment"
msgstr "oavslutad kommentar"
#: src/lex.c:137
msgid "unexpected end of file"
msgstr "oväntat filslut"
#: src/lex.c:166
msgid "unescaped newline in constant"
msgstr "oskyddat nyradstecken i konstant"
#: src/lex.c:208
#, c-format
msgid "octal value outside range 0...255: `\\%o'"
msgstr "oktalt värde utanför intervallet 0-255: \"\\%o\""
#: src/lex.c:233
#, c-format
msgid "hexadecimal value above 255: `\\x%x'"
msgstr "hexadecimalt värde över 255: \"\\x%x\""
#: src/lex.c:245
#, c-format
msgid "unknown escape sequence: `\\' followed by `%s'"
msgstr "okänd specialsekvens: \"\\\" följt av \"%s\""
#: src/lex.c:342
msgid "unterminated type name at end of file"
msgstr "oavslutat typnamn vid filslut"
#: src/lex.c:345
msgid "unterminated type name"
msgstr "oavslutat typnamn"
#: src/lex.c:438
msgid "use \"...\" for multi-character literal tokens"
msgstr "använd \"...\" för bokstavliga element med mer än ett tecken"
#: src/lex.c:678
#, c-format
msgid "`%s' supports no argument: %s"
msgstr "\"%s\" stödjer inga argument: %s"
#: src/lex.c:694
#, c-format
msgid "`%s' requires an argument"
msgstr "\"%s\" behöver ett argument"
#: src/output.c:951
#, c-format
msgid "maximum table size (%d) exceeded"
msgstr "maximal tabellstorlek (%d) överskriden"
#: src/print.c:39
#, c-format
msgid " type %d is %s\n"
msgstr " typ %d är %s\n"
#: src/print.c:88
#, c-format
msgid " (rule %d)"
msgstr " (regel %d)"
#: src/print.c:108
msgid " $default\taccept\n"
msgstr " $standard\tacceptera\n"
#: src/print.c:110
msgid " NO ACTIONS\n"
msgstr " INGA ÅTGÄRDER\n"
#: src/print.c:124
#, c-format
msgid " $ \tgo to state %d\n"
msgstr " $ \tgå till tillstånd %d\n"
#: src/print.c:127
#, c-format
msgid " %-4s\tshift, and go to state %d\n"
msgstr " %-4s\tskifta, och gå till tillstånd %d\n"
#: src/print.c:142
#, c-format
msgid " %-4s\terror (nonassociative)\n"
msgstr " %-4s\tfel (ickeassociativ)\n"
#: src/print.c:169
#, c-format
msgid " %-4s\tgo to state %d\n"
msgstr " %-4s\tgå till tillstånd %d\n"
#: src/print.c:180
#, c-format
msgid "state %d"
msgstr "tillstånd %d"
#. rule # : LHS -> RHS
#: src/print.c:211
msgid "Grammar"
msgstr "Grammatik"
#: src/print.c:212
msgid "Number, Line, Rule"
msgstr "Nummer, Rad, Regel"
#: src/print.c:217
#, c-format
msgid " %3d %3d %s ->"
msgstr " %3d %3d %s ->"
#: src/print.c:224
msgid "empty"
msgstr "tom"
#. TERMINAL (type #) : rule #s terminal is on RHS
#: src/print.c:231
msgid "Terminals, with rules where they appear"
msgstr "Terminaler, med regler där de förekommer"
#: src/print.c:256
msgid "Nonterminals, with rules where they appear"
msgstr "Icketerminaler, med regler där de förekommer"
#: src/print.c:282
msgid " on left:"
msgstr " till vänster:"
#: src/print.c:297
msgid " on right:"
msgstr " till höger:"
#. If something has been added in the NODE_OBSTACK after
#. the declaration of the label, then we need a `\n'.
#. if (obstack_object_size (node_obstack) > node_output_size)
#. obstack_sgrow (node_obstack, "\n");
#.
#: src/print_graph.c:146
#, c-format
msgid "%-4s\terror (nonassociative)"
msgstr "%-4s\tfel (ickeassociativ)"
#.
#. if (obstack_object_size (node_obstack) > node_output_size)
#. obstack_sgrow (node_obstack, "\n");
#.
#: src/print_graph.c:161
#, c-format
msgid "$default\treduce using rule %d (%s)"
msgstr "$standard\treducera med regel %d (%s)"
#: src/reader.c:89
msgid " Skipping to next \\n"
msgstr " Hoppar över till nästa \\n"
#: src/reader.c:91
#, c-format
msgid " Skipping to next %c"
msgstr " Hoppar över till nästa %c"
#: src/reader.c:142 src/reader.c:154
msgid "invalid $ value"
msgstr "felaktigt $-värde"
#: src/reader.c:180 src/reader.c:195
msgid "unterminated string at end of file"
msgstr "oavslutad sträng vid filslut"
#: src/reader.c:183
msgid "unterminated string"
msgstr "oavslutad sträng"
#: src/reader.c:339
msgid "invalid @ value"
msgstr "felaktigt @-värde"
#: src/reader.c:352 src/reader.c:416
#, c-format
msgid "%s is invalid"
msgstr "%s är felaktigt"
#: src/reader.c:392
#, c-format
msgid "$$ of `%s' has no declared type"
msgstr "$$ för \"%s\" har ingen deklarerad typ"
#: src/reader.c:409
#, c-format
msgid "$%d of `%s' has no declared type"
msgstr "$%d för \"%s\" har ingen deklarerad typ"
#: src/reader.c:463
msgid "unterminated `%{' definition"
msgstr "oavslutad \"%{\"-definition"
#: src/reader.c:508 src/reader.c:623 src/reader.c:673
#, c-format
msgid "Premature EOF after %s"
msgstr "Förtida filslut efter %s"
#: src/reader.c:525
#, c-format
msgid "symbol `%s' used more than once as a literal string"
msgstr "symbolen \"%s\" används mer än en gång som en bokstavlig sträng"
#: src/reader.c:528
#, c-format
msgid "symbol `%s' given more than one literal string"
msgstr "symbolen \"%s\" har fått mer än en bokstavlig sträng"
#: src/reader.c:549 src/reader.c:692
#, c-format
msgid "symbol %s redefined"
msgstr "symbolen %s omdefinierad"
#: src/reader.c:559 src/reader.c:638 src/reader.c:699 src/reader.c:1314
#, c-format
msgid "type redeclaration for %s"
msgstr "typen omdeklarerad för %s"
#: src/reader.c:568
#, c-format
msgid "`%s' is invalid in %s"
msgstr "\"%s\" är felaktig i %s"
#: src/reader.c:586 src/reader.c:751
#, c-format
msgid "multiple %s declarations"
msgstr "flera %s-deklarationer"
#: src/reader.c:588 src/reader.c:930 src/reader.c:955 src/reader.c:1292
#, c-format
msgid "invalid %s declaration"
msgstr "felaktig %s-deklaration"
#: src/reader.c:608
msgid "%type declaration has no <typename>"
msgstr "%type-deklaration har inget <typnamn>"
#: src/reader.c:643
#, c-format
msgid "invalid %%type declaration due to item: %s"
msgstr "felaktig %%type-deklaration på grund av objekt: %s"
#: src/reader.c:688
#, c-format
msgid "redefining precedence of %s"
msgstr "omdefinition av precedens för %s"
#: src/reader.c:711
#, c-format
msgid "invalid text (%s) - number should be after identifier"
msgstr "felaktig text (%s) - tal skulle följa efter identifierare"
#: src/reader.c:721
#, c-format
msgid "unexpected item: %s"
msgstr "oväntat objekt: %s"
#: src/reader.c:794 src/reader.c:1126 src/reader.c:1203
#, c-format
msgid "unmatched %s"
msgstr "ensam %s"
#: src/reader.c:826
#, c-format
msgid "argument of %%expect is not an integer"
msgstr "argument till %%expect är inte ett heltal"
#: src/reader.c:872
#, c-format
msgid "unrecognized item %s, expected an identifier"
msgstr "oväntat objekt %s, förväntade en identifierare"
#: src/reader.c:894
#, c-format
msgid "expected string constant instead of %s"
msgstr "förväntade strängkonstant istället för %s"
#: src/reader.c:1042
#, c-format
msgid "unrecognized: %s"
msgstr "okänt: %s"
#: src/reader.c:1047
msgid "no input grammar"
msgstr "ingen ingrammatik"
#: src/reader.c:1052
#, c-format
msgid "unknown character: %s"
msgstr "okänt tecken: %s"
#: src/reader.c:1226
#, c-format
msgid "unterminated %guard clause"
msgstr "oavlutad %guard-sats"
#: src/reader.c:1379
msgid "ill-formed rule: initial symbol not followed by colon"
msgstr "felskriven regel: första symbolen följs inte av ett kolon"
#: src/reader.c:1386
msgid "grammar starts with vertical bar"
msgstr "grammatiken startar med ett vertikalt streck"
#: src/reader.c:1414
#, c-format
msgid "rule given for %s, which is a token"
msgstr "regel given för %s, som är ett element"
#: src/reader.c:1444 src/reader.c:1556
msgid "previous rule lacks an ending `;'"
msgstr "föregående regel saknar ett avslutande \";\""
#: src/reader.c:1517
msgid "two @prec's in a row"
msgstr "två @prec i rad"
#: src/reader.c:1525
#, c-format
msgid "%%guard present but %%semantic_parser not specified"
msgstr "%%guard finns men %%semantic_parser är inte angiven"
#: src/reader.c:1534
msgid "two actions at end of one rule"
msgstr "två åtgärder vid slutet av en regel"
#: src/reader.c:1548
#, c-format
msgid "type clash (`%s' `%s') on default action"
msgstr "typkonflikt (\"%s\" \"%s\") för standardåtgärd"
#: src/reader.c:1554
msgid "empty rule for typed nonterminal, and no action"
msgstr "tom regel för typad icketerminal, och ingen åtgärd"
#: src/reader.c:1600
#, c-format
msgid "invalid input: %s"
msgstr "felaktig indata: %s"
#: src/reader.c:1608
#, c-format
msgid "too many symbols (tokens plus nonterminals); maximum %d"
msgstr "för många symboler (element plus icketerminaler); max %d"
#: src/reader.c:1611
msgid "no rules in the input grammar"
msgstr "inga regler i ingrammatiken"
#: src/reader.c:1635
#, c-format
msgid "symbol %s is used, but is not defined as a token and has no rules"
msgstr ""
"symbolen %s används, men är inte definierad som ett element och har inga "
"regler"
#: src/reader.c:1770
#, c-format
msgid "tokens %s and %s both assigned number %d"
msgstr "elementen %s och %s har båda fått nummer %d"
#: src/reader.c:1823
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "motstridiga precedenser mellan %s och %s"
#: src/reader.c:1835
#, c-format
msgid "conflicting assoc values for %s and %s"
msgstr "motstridiga assoc-värden mellan %s och %s"
#: src/reader.c:1874
#, c-format
msgid "the start symbol %s is undefined"
msgstr "startsymbolen %s är odefinierad"
#: src/reader.c:1876
#, c-format
msgid "the start symbol %s is a token"
msgstr "startsymbolen %s är ett element"
#: src/reduce.c:409
msgid "Useless nonterminals:"
msgstr "Oanvändbara icketerminaler:"
#: src/reduce.c:422
msgid "Terminals which are not used:"
msgstr "Terminaler som inte används:"
#: src/reduce.c:433
msgid "Useless rules:"
msgstr "Oanvändbara regler:"
#: src/reduce.c:503
#, c-format
msgid "%d rule never reduced\n"
msgid_plural "%d rules never reduced\n"
msgstr[0] "%d regel reduceras aldrig\n"
msgstr[1] "%d regler reduceras aldrig\n"
#: src/reduce.c:511
#, c-format
msgid "%d useless nonterminal"
msgid_plural "%d useless nonterminals"
msgstr[0] "%d oanvändbar icketerminal"
msgstr[1] "%d oanvändbara icketerminaler"
#: src/reduce.c:517
msgid " and "
msgstr " och "
#: src/reduce.c:520
#, c-format
msgid "%d useless rule"
msgid_plural "%d useless rules"
msgstr[0] "%d oanvändbar regel"
msgstr[1] "%d oanvändbara regler"
#: src/reduce.c:551
#, c-format
msgid "Start symbol %s does not derive any sentence"
msgstr "Startsymbolen %s genererar inga meningar"
#: lib/getopt.c:694
#, c-format
msgid "%s: option `%s' is ambiguous\n"
msgstr "%s: flaggan \"%s\" är tvetydig\n"
#: lib/getopt.c:719
#, c-format
msgid "%s: option `--%s' doesn't allow an argument\n"
msgstr "%s: flaggan \"--%s\" tar inget argument\n"
#: lib/getopt.c:724
#, c-format
msgid "%s: option `%c%s' doesn't allow an argument\n"
msgstr "%s: flaggan \"%c%s\" tar inget argument\n"
#: lib/getopt.c:742 lib/getopt.c:915
#, c-format
msgid "%s: option `%s' requires an argument\n"
msgstr "%s: flaggan \"%s\" behöver ett argument\n"
#. --option
#: lib/getopt.c:771
#, c-format
msgid "%s: unrecognized option `--%s'\n"
msgstr "%s: okänd flagga \"--%s\"\n"
#. +option or -option
#: lib/getopt.c:775
#, c-format
msgid "%s: unrecognized option `%c%s'\n"
msgstr "%s: okänd flagga \"%c%s\"\n"
#. 1003.2 specifies the format of this message.
#: lib/getopt.c:801
#, c-format
msgid "%s: illegal option -- %c\n"
msgstr "%s: otillåten flagga -- %c\n"
#: lib/getopt.c:804
#, c-format
msgid "%s: invalid option -- %c\n"
msgstr "%s: ogiltig flagga --%c\n"
#. 1003.2 specifies the format of this message.
#: lib/getopt.c:834 lib/getopt.c:964
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr "%s: flaggan behöver ett argument -- %c\n"
#: lib/getopt.c:881
#, c-format
msgid "%s: option `-W %s' is ambiguous\n"
msgstr "%s: flaggan \"-W %s\" är tvetydig\n"
#: lib/getopt.c:899
#, c-format
msgid "%s: option `-W %s' doesn't allow an argument\n"
msgstr "%s: flaggan \"-W %s\" tar inget argument\n"
#. If XALLOC_FAIL_FUNC is NULL, or does return, display this message
#. before exiting when memory is exhausted. Goes through gettext.
#: lib/obstack.c:494 lib/obstack.c:497 lib/xmalloc.c:66
msgid "memory exhausted"
msgstr "minnet slut"
# När vi går över till Unicode mer allmänt kanske vi bör översätta båda dessa
# med U+201D (RIGHT DOUBLE QUOTATION MARK) på svenska. Eller?
#
#. Get translations for open and closing quotation marks.
#.
#. The message catalog should translate "`" to a left
#. quotation mark suitable for the locale, and similarly for
#. "'". If the catalog has no translation,
#. locale_quoting_style quotes `like this', and
#. clocale_quoting_style quotes "like this".
#.
#. For example, an American English Unicode locale should
#. translate "`" to U+201C (LEFT DOUBLE QUOTATION MARK), and
#. should translate "'" to U+201D (RIGHT DOUBLE QUOTATION
#. MARK). A British English Unicode locale should instead
#. translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and
#. U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.
#: lib/quotearg.c:274
msgid "`"
msgstr "\""
#: lib/quotearg.c:275
msgid "'"
msgstr "\""
+232 -295
View File
@@ -1,25 +1,26 @@
# Turkish translations for GNU Bison messages.
# Copyright (C) 2001 Free Software Foundation, Inc.
# Altug Bayram <[email protected]>, 2001.
# Altuð Bayram <[email protected]>, 2001.
#
msgid ""
msgstr ""
"Project-Id-Version: bison 1.28c\n"
"POT-Creation-Date: 2001-10-26 14:37+0200\n"
"PO-Revision-Date: 2001-09-10 10:54GMT\n"
"Last-Translator: Altug Bayram <[email protected]>\n"
"Project-Id-Version: bison 1.33b\n"
"POT-Creation-Date: 2002-03-04 19:13+0100\n"
"PO-Revision-Date: 2002-03-05 14:30GMT +02:00\n"
"Last-Translator: Altuð Bayram <[email protected]>\n"
"Language-Team: Turkish <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-9\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: KBabel 0.9.5\n"
#: src/LR0.c:207
#: src/LR0.c:189
#, c-format
msgid "too many states (max %d)"
msgstr "çok fazla durum (en fazla %d)"
#: lib/error.c:128 lib/error.c:156 src/complain.c:96
#: lib/error.c:128 lib/error.c:156 src/complain.c:99
msgid "Unknown system error"
msgstr "Bilinmeyen sistem hatasý"
@@ -27,83 +28,86 @@ msgstr "Bilinmeyen sistem hatas
msgid "warning: "
msgstr "uyarý: "
#: src/complain.c:238 src/complain.c:279
#: src/complain.c:238
msgid "fatal error: "
msgstr "ölümcül hata:"
#: src/conflicts.c:48
#: src/conflicts.c:44
#, c-format
msgid "Conflict in state %d between rule %d and token %s resolved as %s.\n"
msgstr ""
"%d durumu içinde %d kuralý ve %s andaçý arasýndaki çeliþki %s "
"olarakçözümlendi.\n"
"%d durumu içinde %d kuralý ve %s andaçý arasýndaki çeliþki %s olarak\n"
"çözümlendi.\n"
#: src/conflicts.c:114 src/conflicts.c:137
#: src/conflicts.c:94 src/conflicts.c:119
msgid "reduce"
msgstr "indirgeme"
#: src/conflicts.c:120 src/conflicts.c:133
#: src/conflicts.c:101 src/conflicts.c:115
msgid "shift"
msgstr "öteleme"
msgstr "shift"
#: src/conflicts.c:141
#: src/conflicts.c:123
msgid "an error"
msgstr "bir hata"
#: src/conflicts.c:421
msgid " 1 shift/reduce conflict"
msgstr " 1 öteleme/indirgeme çeliþkisi"
#: src/conflicts.c:426
#: src/conflicts.c:302
#, c-format
msgid " %d shift/reduce conflicts"
msgstr " %d öteleme/indirgeme çeliþkisi"
msgid "%d shift/reduce conflict"
msgid_plural "%d shift/reduce conflicts"
msgstr[0] "%d öteleme/indirgeme çeliþkisi"
msgstr[1] ""
#: src/conflicts.c:432
msgid " and"
msgstr " ve"
#: src/conflicts.c:309
msgid "and"
msgstr "ve"
#: src/conflicts.c:438
msgid " 1 reduce/reduce conflict"
msgstr " 1 indirgeme/indirgeme çeliþkisi"
#: src/conflicts.c:443
#: src/conflicts.c:315
#, c-format
msgid " %d reduce/reduce conflicts"
msgstr " %d indirgeme/indirgeme çeliþkisi"
msgid "%d reduce/reduce conflict"
msgid_plural "%d reduce/reduce conflicts"
msgstr[0] "%d indirgeme/indirgeme çeliþkisi"
msgstr[1] ""
#: src/conflicts.c:480
#: src/conflicts.c:340
#, c-format
msgid "State %d contains"
msgid "State %d contains "
msgstr "%d durumu içerir"
#. If invoked with `--yacc', use the output format specified by
#. POSIX.
#: src/conflicts.c:491
#: src/conflicts.c:387
msgid "conflicts: "
msgstr "çeliþkiler: "
#: src/conflicts.c:493
#: src/conflicts.c:389
#, c-format
msgid " %d shift/reduce"
msgstr " %d öteleme/indirgeme"
#: src/conflicts.c:497
#: src/conflicts.c:393
#, c-format
msgid " %d reduce/reduce"
msgstr " %d indirgeme/indirgeme"
#: src/conflicts.c:502
#: src/conflicts.c:398 src/reduce.c:508
#, c-format
msgid "%s contains"
msgid "%s contains "
msgstr "%s içerir"
#: src/conflicts.c:588 src/conflicts.c:709
#: src/conflicts.c:412
#, c-format
msgid "expected %d shift/reduce conflict\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] "beklenen %d öteleme/indirgeme çeliþkisi\n"
msgstr[1] "beklenen %d öteleme/indirgeme çeliþkisi\n"
#: src/conflicts.c:463 src/conflicts.c:540
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[indirgeme kural %d (%s)'i kullanýyor]\n"
#: src/conflicts.c:600 src/print.c:171
#: src/conflicts.c:467 src/print.c:154
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
@@ -112,55 +116,47 @@ msgstr ""
" $default\tindirgeme kural %d (%s)'i kullanýyor\n"
"\n"
#: src/conflicts.c:689 src/conflicts.c:703
#: src/conflicts.c:521 src/conflicts.c:534
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\tindirgeme kural %d (%s)'i kullanýyor\n"
#: src/conflicts.c:730
#: src/conflicts.c:550
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\tindirgeme kural %d (%s)'i kullanýyor\n"
#: src/derives.c:43
msgid "DERIVES"
msgstr "TÜRETÝLENLER"
#: src/derives.c:48
#, c-format
msgid "%s derives"
msgstr "%s türetildi"
#: src/files.c:133
#: src/files.c:151
#, c-format
msgid "cannot open file `%s'"
msgstr "`%s' dosyasý açýlamadý"
#: src/files.c:152
#: src/files.c:170
msgid "cannot close file"
msgstr "dosya kapatýlamýyor"
#. Some efforts were made to ease the translators' task, please
#. continue.
#: src/getargs.c:83
#: src/getargs.c:84
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
msgstr "GNU bison LALR(1) gramerler için ayrýþtýrýcýlar üretir.\n"
#: src/getargs.c:87
#: src/getargs.c:88
#, c-format
msgid "Usage: %s [OPTION]... FILE\n"
msgstr "Kullaným: %s [SEÇENEK]... DOSYA\n"
#: src/getargs.c:91
#: src/getargs.c:92
msgid ""
"If a long option shows an argument as mandatory, then it is mandatory\n"
"for the equivalent short option also. Similarly for optional arguments.\n"
msgstr ""
"Eðer bir uzun seçenek bir argümaný gerektirirse, bu gereklilik, denk olan\n"
"kýsa seçenek için de geçerlidir. Bu durum, seçimli argümanlar için de\n"
"Eðer bir uzun seçenek bir argümaný gerektirirse, bu gereklilik, denk olan "
"kýsa\n"
"seçenek için de geçerlidir. Bu durum, seçimli argümanlar için de "
"geçerlidir.\n"
#: src/getargs.c:97
#: src/getargs.c:98
msgid ""
"Operation modes:\n"
" -h, --help display this help and exit\n"
@@ -172,7 +168,7 @@ msgstr ""
" -V, --version sürüm bilgisini ver ve çýk\n"
" -y, --yacc POSIX yacc öykünmesi\n"
#: src/getargs.c:104
#: src/getargs.c:105
msgid ""
"Parser:\n"
" -S, --skeleton=FILE specify the skeleton to use\n"
@@ -184,32 +180,32 @@ msgid ""
" -k, --token-table include a table of token names\n"
msgstr ""
"Ayrýþtýrýcý:\n"
" -S, --skeleton=DOSYA kullanýlacak iskeleti belirler\n"
" -S, --skeleton=FILE kullanýlacak iskeleti belirle\n"
" -t, --debug ayrýþtýrýcý için hata ayýklayýcý aracý\n"
" --locations konum hesaplamalarýný etkinleþtirir\n"
" -p, --name-prefix=ÖNEK dýþ simgelere eklenen ÖNEK\n"
" -l, --no-lines `#line' bildirimlerini üretmez\n"
" -n, --no-parser sadece tablolarý üretir\n"
" -k, --token-table andaç isimlerinin bir tablosunu içerir\n"
" --locations konum hesaplamalarýný etkinleþtir\n"
" -p, --name-prefix=PREFIX dýþ simgelere hazýr bekletilen ÖNEK\n"
" -l, --no-lines `#line' bildirimlerini üretme\n"
" -n, --no-parser sadece tablolarý üret\n"
" -k, --token-table andaç isimlerinin bir tablosunu içer\n"
#: src/getargs.c:116
#, fuzzy
#: src/getargs.c:117
msgid ""
"Output:\n"
" -d, --defines also produce a header file\n"
" -v, --verbose also produce an explanation of the automaton\n"
" -b, --file-prefix=PREFIX specify a PREFIX for output files\n"
" -o, --output-file=FILE leave output to FILE\n"
" -g, --graph also produce a VCG graph description of the "
" -o, --output=FILE leave output to FILE\n"
" -g, --graph also produce a VCG description of the "
"automaton\n"
msgstr ""
"Çýktý:\n"
" -d, --defines bir baþlýk dosyasý da üretir\n"
" -d, --defines bir baþlýk dosyasýda üretir\n"
" -v, --verbose otomatýn bir açýklamasýný da üretir\n"
" -b, --file-prefix=ÖNEK çýktý dosyalarý için bir ÖNEK belirtir\n"
" -o, --output-file=DOSYA çýktýyý DOSYAYA býrakýr\n"
" -b, --file-prefix=ÖNEK çýktý dosyalarý için bir önek belirtir\n"
" -o, --output=DOSYA çýktýyý dosyaya býrakýr\n"
" -g, --graph otomatýn bir VCG grafik açýklamasýný da üretir\n"
#: src/getargs.c:126
#: src/getargs.c:127
msgid "Report bugs to <[email protected]>.\n"
msgstr ""
"Hatalarý <[email protected]>'a,\n"
@@ -217,499 +213,482 @@ msgstr ""
#. Some efforts were made to ease the translators' task, please
#. continue.
#: src/getargs.c:140
#: src/getargs.c:141
#, c-format
msgid "bison (GNU Bison) %s"
msgstr "bison (GNU Bison) %s"
#: src/getargs.c:145
#: src/getargs.c:146
msgid ""
"Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
"Free Software Foundation, Inc.\n"
msgstr ""
"Telifhakký 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, "
"Inc.\n"
"Kopyahakký 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
"Free Software Foundation, Inc.\n"
#: src/getargs.c:149
#: src/getargs.c:151
msgid ""
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
msgstr ""
"Bu bir serbest yazýlýmdýr; kopyalama koþullarý için kaynak koduna bakýnýz.\n"
"Hiçbir garantisi yoktur; hatta SATILABÝLÝRLÝÐÝ veya HERHANGÝ BÝR AMACA\n"
"Hiçbir garantisi yoktur; hatta SATILABÝLÝRLÝÐÝ veya ÞAHSÝ KULLANIMINIZA\n"
"UYGUNLUÐU için bile garanti verilmez.\n"
#: src/getargs.c:214 src/lex.c:650
#: src/getargs.c:230 src/lex.c:705
#, c-format
msgid "`%s' is no longer supported"
msgstr "`%s' artýk desteklenmiyor"
msgstr "`%s' artýk desteklenmeyecek"
#: src/getargs.c:238
#: src/getargs.c:254
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "Daha fazla bilgi için `%s --help' yazýn.\n"
#: src/getargs.c:245
#: src/getargs.c:261
#, c-format
msgid "%s: no grammar file given\n"
msgstr "%s: gramer dosyasý verilmemiþ\n"
#: src/getargs.c:249
#: src/getargs.c:265
#, c-format
msgid "%s: extra arguments ignored after `%s'\n"
msgstr "%s: '%s' den sonraki argümanlar yoksayýldý\n"
#: src/lalr.c:311
#: src/lalr.c:256
#, c-format
msgid "too many gotos (max %d)"
msgstr "gotos çok fazla (en fazla %d)"
#: src/lex.c:78
#: src/lex.c:76
msgid "unexpected `/' found and ignored"
msgstr "beklenmeyen `/' bulundu ve yoksayýldý"
#: src/lex.c:107 src/reader.c:269
#: src/lex.c:105 src/reader.c:280
msgid "unterminated comment"
msgstr "sonlandýrýlmamýþ açýklama"
#: src/lex.c:139
#: src/lex.c:137
msgid "unexpected end of file"
msgstr "beklenmeyen dosya sonu"
#: src/lex.c:168
#: src/lex.c:166
msgid "unescaped newline in constant"
msgstr "sabit içinde kaçýþsýz yeni satýr"
msgstr "sabit içinde kaçamayan yeni satýr"
#: src/lex.c:210
#: src/lex.c:208
#, c-format
msgid "octal value outside range 0...255: `\\%o'"
msgstr "sekizli deðer 0...255'in dýþýnda: `\\%o'"
#: src/lex.c:235
#: src/lex.c:233
#, c-format
msgid "hexadecimal value above 255: `\\x%x'"
msgstr "onaltýlýk deðer 255'in üstünde: `\\x%x'"
#: src/lex.c:247
#: src/lex.c:245
#, c-format
msgid "unknown escape sequence: `\\' followed by `%s'"
msgstr "bilinmeyen kaçýþ sýrasý: `\\' `%s' tarafýndan takip edildi"
#: src/lex.c:343
#: src/lex.c:342
msgid "unterminated type name at end of file"
msgstr "dosya sonunda sonlandýrýlmamýþ tip adý"
#: src/lex.c:346
#: src/lex.c:345
msgid "unterminated type name"
msgstr "sonlandýrýlmamýþ tip ismi"
#: src/lex.c:437
#: src/lex.c:438
msgid "use \"...\" for multi-character literal tokens"
msgstr "çok-karakterli yazýn andaçlarý için \"...\" kullan"
#: src/main.c:125
#: src/lex.c:678
#, c-format
msgid "%s: internal error: %s\n"
msgstr "%s: iç hata: %s\n"
msgid "`%s' supports no argument: %s"
msgstr "`%s' argüman %s'i desteklemez"
#: src/nullable.c:51
msgid "Entering set_nullable"
msgstr "set_nullable'a girildi"
#: src/lex.c:694
#, c-format
msgid "`%s' requires an argument"
msgstr "`%s' bir argüman gerektirir"
#: src/output.c:986
#: src/output.c:951
#, c-format
msgid "maximum table size (%d) exceeded"
msgstr "en büyük tablo uzunluðu (%d) aþýldý"
#: src/print.c:37
#: src/print.c:39
#, c-format
msgid " type %d is %s\n"
msgstr " tip %d %s'dir\n"
#: src/print.c:85
#: src/print.c:88
#, c-format
msgid " (rule %d)"
msgstr " (kural %d)"
#: src/print.c:111
#: src/print.c:108
msgid " $default\taccept\n"
msgstr " $default\tonayla\n"
#: src/print.c:113
#: src/print.c:110
msgid " NO ACTIONS\n"
msgstr " EYLEM YOK\n"
#: src/print.c:132
#: src/print.c:124
#, c-format
msgid " $ \tgo to state %d\n"
msgstr " $ \tdurum %d'ye git\n"
#: src/print.c:135
#: src/print.c:127
#, c-format
msgid " %-4s\tshift, and go to state %d\n"
msgstr " %-4s\tötele, ve durum %d'ye git\n"
#: src/print.c:159
#: src/print.c:142
#, c-format
msgid " %-4s\terror (nonassociative)\n"
msgstr " %-4s\thata (birleþmeli deðil)\n"
#: src/print.c:187
#: src/print.c:169
#, c-format
msgid " %-4s\tgo to state %d\n"
msgstr " %-4s\tdurum %d'ye git\n"
#: src/print.c:199
#: src/print.c:180
#, c-format
msgid "state %d"
msgstr "durum %d"
#. rule # : LHS -> RHS
#: src/print.c:229
#: src/print.c:211
msgid "Grammar"
msgstr "Gramer"
#: src/print.c:234
#, c-format
msgid "rule %-4d %s ->"
msgstr "kural %-4d %s ->"
#: src/print.c:212
msgid "Number, Line, Rule"
msgstr "Sayý, Satýr, Kural"
#: src/print.c:240
#: src/print.c:217
#, c-format
msgid " %3d %3d %s ->"
msgstr " %3d %3d %s ->"
#: src/print.c:224
msgid "empty"
msgstr ""
msgstr "boþ"
#. TERMINAL (type #) : rule #s terminal is on RHS
#: src/print.c:244
#: src/print.c:231
msgid "Terminals, with rules where they appear"
msgstr "Sabit simgeler, kurallarýnýn bulunduklarý yerde"
#: src/print.c:268
#: src/print.c:256
msgid "Nonterminals, with rules where they appear"
msgstr "Deðiþken simgeler, kurallarýnýn bulunduklarý yerde"
#: src/print.c:294
#: src/print.c:282
msgid " on left:"
msgstr " solda:"
#: src/print.c:309
#: src/print.c:297
msgid " on right:"
msgstr " saðda:"
#: src/print_graph.c:174
#. If something has been added in the NODE_OBSTACK after
#. the declaration of the label, then we need a `\n'.
#. if (obstack_object_size (node_obstack) > node_output_size)
#. obstack_sgrow (node_obstack, "\n");
#.
#: src/print_graph.c:146
#, c-format
msgid "%-4s\terror (nonassociative)"
msgstr "%-4s\thata (birleþmeli deðil)"
#: src/print_graph.c:187
#.
#. if (obstack_object_size (node_obstack) > node_output_size)
#. obstack_sgrow (node_obstack, "\n");
#.
#: src/print_graph.c:161
#, c-format
msgid "$default\treduce using rule %d (%s)"
msgstr "$default\tindirgeme kural %d (%s)'i kullanýyor"
#: src/reader.c:78
#: src/reader.c:89
msgid " Skipping to next \\n"
msgstr " Sonrakine atlanýyor \\n"
#: src/reader.c:80
#: src/reader.c:91
#, c-format
msgid " Skipping to next %c"
msgstr " Sonraki %c'ye atlanýyor"
#: src/reader.c:131 src/reader.c:143
#: src/reader.c:142 src/reader.c:154
msgid "invalid $ value"
msgstr "geçersiz $ deðeri"
#: src/reader.c:169 src/reader.c:184
#: src/reader.c:180 src/reader.c:195
msgid "unterminated string at end of file"
msgstr "dosyanýn sonunda sonlandýrýlmamýþ dizge"
#: src/reader.c:172
#: src/reader.c:183
msgid "unterminated string"
msgstr "sonlandýrýlmamýþ dizge"
#: src/reader.c:325 src/reader.c:389
#: src/reader.c:339
msgid "invalid @ value"
msgstr "geçersiz @ deðeri"
#: src/reader.c:352 src/reader.c:416
#, c-format
msgid "%s is invalid"
msgstr "%s geçersizdir"
#: src/reader.c:365
#: src/reader.c:392
#, c-format
msgid "$$ of `%s' has no declared type"
msgstr "`%s''in $$'ý bildirilmiþ tip deðil"
#: src/reader.c:382
#: src/reader.c:409
#, c-format
msgid "$%d of `%s' has no declared type"
msgstr "`%d''in $%s'i bildirilmiþ tip deðil"
msgstr "`%2$s''in %1$d'i bildirilmiþ tip deðil"
#: src/reader.c:436
#: src/reader.c:463
msgid "unterminated `%{' definition"
msgstr "`%{' tanýmlamasý sonlandýrýlmamýþ"
#: src/reader.c:481 src/reader.c:595 src/reader.c:645
#: src/reader.c:508 src/reader.c:623 src/reader.c:673
#, c-format
msgid "Premature EOF after %s"
msgstr "%s'den sonra erken EOF"
#: src/reader.c:498
#: src/reader.c:525
#, c-format
msgid "symbol `%s' used more than once as a literal string"
msgstr "simge `%s' birden fazla defa sabit dizge olarak kullanýldý"
msgstr "simge `%s' bir harfiyen uyumlu dizgi gibi birden fazla kullanýldý"
#: src/reader.c:501
#: src/reader.c:528
#, c-format
msgid "symbol `%s' given more than one literal string"
msgstr "`%s' simgesine birden fazla sabit dizge verilmiþ"
msgstr "simge `%s' bir harfiyen uyumlu dizgi gibi birden fazla verilmiþ"
#: src/reader.c:522 src/reader.c:664
#: src/reader.c:549 src/reader.c:692
#, c-format
msgid "symbol %s redefined"
msgstr "%s simgesi yeniden tanýmlandý"
#: src/reader.c:532 src/reader.c:610 src/reader.c:671 src/reader.c:1285
#: src/reader.c:559 src/reader.c:638 src/reader.c:699 src/reader.c:1314
#, c-format
msgid "type redeclaration for %s"
msgstr "%s için yeniden tip bildirimi"
#: src/reader.c:541
#: src/reader.c:568
#, c-format
msgid "`%s' is invalid in %s"
msgstr "`%s' %s içinde geçersizdir"
#: src/reader.c:558 src/reader.c:717
#: src/reader.c:586 src/reader.c:751
#, c-format
msgid "multiple %s declarations"
msgstr "çoklu %s bildirimleri"
#: src/reader.c:560 src/reader.c:897 src/reader.c:922 src/reader.c:1263
#: src/reader.c:588 src/reader.c:930 src/reader.c:955 src/reader.c:1292
#, c-format
msgid "invalid %s declaration"
msgstr "geçersiz %s bildirimi"
#: src/reader.c:580
#: src/reader.c:608
msgid "%type declaration has no <typename>"
msgstr "%type bildirimi <tipadý>'na sahip deðil"
#: src/reader.c:615
#: src/reader.c:643
#, c-format
msgid "invalid %%type declaration due to item: %s"
msgstr "geçersiz %%type bildirimine neden olan öðe: %s"
msgstr "geçersiz %%type bildirimine neden olan öðe: `%s'"
#: src/reader.c:660
#: src/reader.c:688
#, c-format
msgid "redefining precedence of %s"
msgstr "%s'in önceliði tekrar tanýmlandý"
#: src/reader.c:683
#: src/reader.c:711
#, c-format
msgid "invalid text (%s) - number should be after identifier"
msgstr "geçersiz metin (%s) - sayý tanýtýcýdan sonra olmalýdýr"
#: src/reader.c:693
#: src/reader.c:721
#, c-format
msgid "unexpected item: %s"
msgstr "beklenmeyen öðe: %s"
#: src/reader.c:760 src/reader.c:1089 src/reader.c:1160
#: src/reader.c:794 src/reader.c:1126 src/reader.c:1203
#, c-format
msgid "unmatched %s"
msgstr "eþlenemeyen %s"
#: src/reader.c:792
#: src/reader.c:826
#, c-format
msgid "argument of %%expect is not an integer"
msgstr "%%expect'in argümaný bir tamsayý deðil"
msgstr "%%expect'in argümaný bir tamsayý deðildir"
#: src/reader.c:838
#: src/reader.c:872
#, c-format
msgid "unrecognized item %s, expected an identifier"
msgstr "%s öðesi tanýnmadý, beklenen bir tanýtýcýdýr"
#: src/reader.c:862
#: src/reader.c:894
#, c-format
msgid "expected string constant instead of %s"
msgstr "%s'in yerine sabit dizge beklendi"
#: src/reader.c:1005
#: src/reader.c:1042
#, c-format
msgid "unrecognized: %s"
msgstr "tanýnmayan: %s"
#: src/reader.c:1010
#: src/reader.c:1047
msgid "no input grammar"
msgstr "girdi grameri yok"
#: src/reader.c:1015
#: src/reader.c:1052
#, c-format
msgid "unknown character: %s"
msgstr "bilinmeyen karakter: %s"
#: src/reader.c:1183
#: src/reader.c:1226
#, c-format
msgid "unterminated %guard clause"
msgstr "sonlandýrýlmamýþ %guard yantümcesi"
#: src/reader.c:1350
#: src/reader.c:1379
msgid "ill-formed rule: initial symbol not followed by colon"
msgstr "kötü-biçemli kural: baþlangýç simgesini takip eden \":\" yok"
#: src/reader.c:1357
#: src/reader.c:1386
msgid "grammar starts with vertical bar"
msgstr "gramer düþey çubuk ile baþlýyor"
#: src/reader.c:1388
#: src/reader.c:1414
#, c-format
msgid "rule given for %s, which is a token"
msgstr "bir andaç olan %s için verilen kural"
#: src/reader.c:1490
#: src/reader.c:1444 src/reader.c:1556
msgid "previous rule lacks an ending `;'"
msgstr "önceki kuralda bir bitiþ `;' eksik"
#: src/reader.c:1517
msgid "two @prec's in a row"
msgstr "bir satýrda iki @prec"
#: src/reader.c:1498
#: src/reader.c:1525
#, c-format
msgid "%%guard present but %%semantic_parser not specified"
msgstr "%%guard sunulmuþ fakat %%semantic_parser belirlenmemiþ"
#: src/reader.c:1507
#: src/reader.c:1534
msgid "two actions at end of one rule"
msgstr "bir kuralýn sonunda iki eylem"
#: src/reader.c:1521
#: src/reader.c:1548
#, c-format
msgid "type clash (`%s' `%s') on default action"
msgstr "öntanýmlý eylem üzerinde (`%s' `%s') tip çatýþmasý"
#: src/reader.c:1527
#: src/reader.c:1554
msgid "empty rule for typed nonterminal, and no action"
msgstr "Tipli deðiþken simge için boþ kural tanýmlanmýþ, ve eylembelirtilmemiþ"
msgstr ""
"Tipli deðiþken simge için boþ kural tanýmlanmýþ, ve eylem belirtilmemiþ"
#: src/reader.c:1571
#: src/reader.c:1600
#, c-format
msgid "invalid input: %s"
msgstr "geçersiz girdi: %s"
#: src/reader.c:1579
#: src/reader.c:1608
#, c-format
msgid "too many symbols (tokens plus nonterminals); maximum %d"
msgstr "çok fazla simge var (andaçlar ve deðiþken simgeler); en fazla %d"
#: src/reader.c:1582
#: src/reader.c:1611
msgid "no rules in the input grammar"
msgstr "girdi grameri içinde kurallar yok"
#: src/reader.c:1606
#: src/reader.c:1635
#, c-format
msgid "symbol %s is used, but is not defined as a token and has no rules"
msgstr ""
"simge %s kullanýldý, fakat bir andaç olarak tanýmlanmadý vekurallarý yok"
#: src/reader.c:1712
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "%s ve %s için çeliþen öncelikler"
#: src/reader.c:1724
#, c-format
msgid "conflicting assoc values for %s and %s"
msgstr "%s ve %s için çeliþen birleþmeli deðerler"
"simge %s kullanýldý, fakat bir andaç olarak tanýmlanmadý ve kurallarý yok"
#: src/reader.c:1770
#, c-format
msgid "tokens %s and %s both assigned number %d"
msgstr "%s ve %s andaçlarýnýn her ikisi %d sayýsýna atandý"
#: src/reader.c:1782
#: src/reader.c:1823
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "%s ve %s için çeliþen öncelikler"
#: src/reader.c:1835
#, c-format
msgid "conflicting assoc values for %s and %s"
msgstr "%s ve %s için çeliþen birleþmeli deðerler"
#: src/reader.c:1874
#, c-format
msgid "the start symbol %s is undefined"
msgstr "baþlangýç simgesi %s tanýmlanmadý"
#: src/reader.c:1784
#: src/reader.c:1876
#, c-format
msgid "the start symbol %s is a token"
msgstr "baþlangýç simgesi %s bir andaçtýr"
#: src/reduce.c:401
#: src/reduce.c:409
msgid "Useless nonterminals:"
msgstr "Yararsýz kurallar:"
msgstr "Yararsýz deðiþken simgeler:"
#: src/reduce.c:416
#: src/reduce.c:422
msgid "Terminals which are not used:"
msgstr "Kullanýlmayan sabit simgeler:"
#: src/reduce.c:427
#: src/reduce.c:433
msgid "Useless rules:"
msgstr "Yararsýz kurallar:"
#: src/reduce.c:456
msgid ""
"Variables\n"
"---------\n"
"\n"
msgstr ""
"Deðiþkenler\n"
"-----------\n"
"\n"
#: src/reduce.c:458
msgid "Value Sprec Sassoc Tag\n"
msgstr "Deðer Söncel Sbirleþ Etiket\n"
#: src/reduce.c:463
msgid ""
"Rules\n"
"-----\n"
"\n"
msgstr ""
"Kurallar\n"
"--------\n"
"\n"
#: src/reduce.c:474
msgid ""
"Rules interpreted\n"
"-----------------\n"
"\n"
msgstr ""
"Kurallar yorumlandý\n"
"-------------------\n"
"\n"
#: src/reduce.c:491
#: src/reduce.c:503
#, c-format
msgid "%d rules never reduced\n"
msgstr "%d kural asla indirgenmedi\n"
msgid "%d rule never reduced\n"
msgid_plural "%d rules never reduced\n"
msgstr[0] "%d kural asla indirgenmedi\n"
msgstr[1] "%d kural asla indirgenmedi\n"
#: src/reduce.c:493
#: src/reduce.c:511
#, c-format
msgid "%s contains "
msgstr "%s içerir "
msgid "%d useless nonterminal"
msgid_plural "%d useless nonterminals"
msgstr[0] "%d yararsýz deðiþken simge"
msgstr[1] ""
#: src/reduce.c:497
#, c-format
msgid "%d useless nonterminal%s"
msgstr "%d yararsýz deðiþken simge%s"
#: src/reduce.c:502
#: src/reduce.c:517
msgid " and "
msgstr " ve "
#: src/reduce.c:506
#: src/reduce.c:520
#, c-format
msgid "%d useless rule%s"
msgstr "%d yararsýz kural%s"
msgid "%d useless rule"
msgid_plural "%d useless rules"
msgstr[0] "%d yararsýz kural"
msgstr[1] ""
#: src/reduce.c:539
#: src/reduce.c:551
#, c-format
msgid "Start symbol %s does not derive any sentence"
msgstr "Baþlangýç simgesi %s herhangi bir cümleden türemez"
#: src/reduce.c:552
#, fuzzy, c-format
msgid ""
"reduced %s defines %d terminal%s, %d nonterminal%s, and %d production%s.\n"
msgstr ""
"indirgenen %s tanýmlanan %d sabit simge%s, %d deðiþken simge%s, ve %düretilen"
"%s.\n"
#: lib/getopt.c:694
#, c-format
msgid "%s: option `%s' is ambiguous\n"
@@ -789,52 +768,10 @@ msgstr "bellek t
#. MARK). A British English Unicode locale should instead
#. translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and
#. U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.
#: lib/quotearg.c:268
#: lib/quotearg.c:274
msgid "`"
msgstr "`"
#: lib/quotearg.c:269
#: lib/quotearg.c:275
msgid "'"
msgstr "'"
#~ msgid "\t\t/* empty */"
#~ msgstr "\t\t/* boþ */"
#~ msgid "multiple %%header_extension declarations"
#~ msgstr "çoklu %%header_extension bildirimleri"
#~ msgid "multiple %%source_extension declarations"
#~ msgstr "çoklu %%source_extension bildirimleri"
#~ msgid "vcg graph: no such color."
#~ msgstr "vcg graph: böyle bir renk yok."
#~ msgid "vcg graph: no such text mode"
#~ msgstr "vcg graph: böyle bir metin kipi yok"
#~ msgid "vcg graph: no such shape"
#~ msgstr "vcg graph: böyle bir þekil yok"
#~ msgid "vcg graph: no such decision"
#~ msgstr "vcg graph: böyle bir karar yok"
#~ msgid "vcg graph: no such an orientation"
#~ msgstr "vcg graph: böyle bir konum yok"
#~ msgid "vcg graph: no such an alignement"
#~ msgstr "vcg graph: böyle bir hizalama yok"
#~ msgid "vcg graph: no such an arrow mode"
#~ msgstr "vcg graph: böyle bir yön kipi yok"
#~ msgid "vcg graph: no such crossing_type"
#~ msgstr "vcg graph: böyle bir kesme tipi yok"
#~ msgid "vcg graph: no such view"
#~ msgstr "vcg graph: böyle bir görünüm yok"
#~ msgid "vcg graph: no such linestyle"
#~ msgstr "vcg graph: böyle bir çizgi biçemi yok"
#~ msgid "vcg graph: no such an arrowstyle"
#~ msgstr "vcg graph: böyle bir yön biçemi yok"
+200 -288
View File
@@ -1,5 +1,5 @@
/* Generate the nondeterministic finite state machine for bison,
Copyright 1984, 1986, 1989, 2000 Free Software Foundation, Inc.
Copyright 1984, 1986, 1989, 2000, 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -23,12 +23,14 @@
The entry point is generate_states. */
#include "system.h"
#include "getargs.h"
#include "reader.h"
#include "gram.h"
#include "state.h"
#include "complain.h"
#include "closure.h"
#include "LR0.h"
#include "reduce.h"
int nstates;
int final_state;
@@ -48,7 +50,7 @@ static short *redset = NULL;
static short *shiftset = NULL;
static short **kernel_base = NULL;
static short **kernel_end = NULL;
static int *kernel_size = NULL;
static short *kernel_items = NULL;
/* hash table for states, to recognize equivalent ones. */
@@ -60,26 +62,21 @@ static core **state_table = NULL;
static void
allocate_itemsets (void)
{
short *itemp = NULL;
int symbol;
int i;
int count;
short *symbol_count = NULL;
count = 0;
symbol_count = XCALLOC (short, nsyms);
/* Count the number of occurrences of all the symbols in RITEMS.
Note that useless productions (hence useless nonterminals) are
browsed too, hence we need to allocate room for _all_ the
symbols. */
int count = 0;
short *symbol_count = XCALLOC (short, nsyms + nuseless_nonterminals);
itemp = ritem;
symbol = *itemp++;
while (symbol)
{
if (symbol > 0)
{
count++;
symbol_count[symbol]++;
}
symbol = *itemp++;
}
for (i = 0; ritem[i]; ++i)
if (ritem[i] > 0)
{
count++;
symbol_count[ritem[i]]++;
}
/* See comments before new_itemsets. All the vectors of items
live inside KERNEL_ITEMS. The number of active items after
@@ -98,8 +95,8 @@ allocate_itemsets (void)
count += symbol_count[i];
}
shift_symbol = symbol_count;
kernel_end = XCALLOC (short *, nsyms);
free (symbol_count);
kernel_size = XCALLOC (int, nsyms);
}
@@ -117,13 +114,13 @@ allocate_storage (void)
static void
free_storage (void)
{
XFREE (shift_symbol);
XFREE (redset);
XFREE (shiftset);
XFREE (kernel_base);
XFREE (kernel_end);
free (shift_symbol);
free (redset);
free (shiftset);
free (kernel_base);
free (kernel_size);
XFREE (kernel_items);
XFREE (state_table);
free (state_table);
}
@@ -137,50 +134,39 @@ free_storage (void)
| shift_symbol is set to a vector of the symbols that can be |
| shifted. For each symbol in the grammar, kernel_base[symbol] |
| points to a vector of item numbers activated if that symbol is |
| shifted, and kernel_end[symbol] points after the end of that |
| vector. |
| shifted, and kernel_size[symbol] is their numbers. |
`----------------------------------------------------------------*/
static void
new_itemsets (void)
{
int i;
int shiftcount;
short *isp;
short *ksp;
int symbol;
#if TRACE
fprintf (stderr, "Entering new_itemsets\n");
#endif
if (trace_flag)
fprintf (stderr, "Entering new_itemsets, state = %d\n",
this_state->number);
for (i = 0; i < nsyms; i++)
kernel_end[i] = NULL;
kernel_size[i] = 0;
shiftcount = 0;
shift_symbol = XCALLOC (short, nsyms);
nshifts = 0;
isp = itemset;
while (isp < itemsetend)
for (i = 0; i < nitemset; ++i)
{
i = *isp++;
symbol = ritem[i];
int symbol = ritem[itemset[i]];
if (symbol > 0)
{
ksp = kernel_end[symbol];
if (!ksp)
if (!kernel_size[symbol])
{
shift_symbol[shiftcount++] = symbol;
ksp = kernel_base[symbol];
shift_symbol[nshifts] = symbol;
nshifts++;
}
*ksp++ = i + 1;
kernel_end[symbol] = ksp;
kernel_base[symbol][kernel_size[symbol]] = itemset[i] + 1;
kernel_size[symbol]++;
}
}
nshifts = shiftcount;
}
@@ -193,36 +179,24 @@ new_itemsets (void)
static core *
new_state (int symbol)
{
int n;
core *p;
short *isp1;
short *isp2;
short *iend;
#if TRACE
fprintf (stderr, "Entering new_state, symbol = %d\n", symbol);
#endif
if (trace_flag)
fprintf (stderr, "Entering new_state, state = %d, symbol = %d (%s)\n",
this_state->number, symbol, tags[symbol]);
if (nstates >= MAXSHORT)
fatal (_("too many states (max %d)"), MAXSHORT);
isp1 = kernel_base[symbol];
iend = kernel_end[symbol];
n = iend - isp1;
p =
(core *) xcalloc ((unsigned) (sizeof (core) + (n - 1) * sizeof (short)), 1);
p = CORE_ALLOC (kernel_size[symbol]);
p->accessing_symbol = symbol;
p->number = nstates;
p->nitems = n;
p->nitems = kernel_size[symbol];
isp2 = p->items;
while (isp1 < iend)
*isp2++ = *isp1++;
shortcpy (p->items, kernel_base[symbol], kernel_size[symbol]);
last_state->next = p;
last_state = p;
nstates++;
return p;
@@ -232,54 +206,39 @@ new_state (int symbol)
/*--------------------------------------------------------------.
| Find the state number for the state we would get to (from the |
| current state) by shifting symbol. Create a new state if no |
| equivalent one exists already. Used by append_states. |
| equivalent one exists already. Used by append_states. |
`--------------------------------------------------------------*/
static int
get_state (int symbol)
{
int key;
short *isp1;
short *isp2;
short *iend;
int i;
core *sp;
int found;
int n;
if (trace_flag)
fprintf (stderr, "Entering get_state, state = %d, symbol = %d (%s)\n",
this_state->number, symbol, tags[symbol]);
#if TRACE
fprintf (stderr, "Entering get_state, symbol = %d\n", symbol);
#endif
isp1 = kernel_base[symbol];
iend = kernel_end[symbol];
n = iend - isp1;
/* add up the target state's active item numbers to get a hash key */
/* Add up the target state's active item numbers to get a hash key.
*/
key = 0;
while (isp1 < iend)
key += *isp1++;
for (i = 0; i < kernel_size[symbol]; ++i)
key += kernel_base[symbol][i];
key = key % STATE_TABLE_SIZE;
sp = state_table[key];
if (sp)
{
found = 0;
int found = 0;
while (!found)
{
if (sp->nitems == n)
if (sp->nitems == kernel_size[symbol])
{
found = 1;
isp1 = kernel_base[symbol];
isp2 = sp->items;
while (found && isp1 < iend)
{
if (*isp1++ != *isp2++)
found = 0;
}
for (i = 0; i < kernel_size[symbol]; ++i)
if (kernel_base[symbol][i] != sp->items[i])
found = 0;
}
if (!found)
@@ -301,6 +260,9 @@ get_state (int symbol)
state_table[key] = sp = new_state (symbol);
}
if (trace_flag)
fprintf (stderr, "Exiting get_state => %d\n", sp->number);
return sp->number;
}
@@ -318,9 +280,9 @@ append_states (void)
int j;
int symbol;
#if TRACE
fprintf (stderr, "Entering append_states\n");
#endif
if (trace_flag)
fprintf (stderr, "Entering append_states, state = %d\n",
this_state->number);
/* first sort shift_symbol into increasing order */
@@ -337,55 +299,36 @@ append_states (void)
}
for (i = 0; i < nshifts; i++)
{
symbol = shift_symbol[i];
shiftset[i] = get_state (symbol);
}
shiftset[i] = get_state (shift_symbol[i]);
}
static void
new_states (void)
{
core *p;
p = (core *) xcalloc ((unsigned) (sizeof (core) - sizeof (short)), 1);
first_state = last_state = this_state = p;
first_state = last_state = this_state = CORE_ALLOC (0);
nstates = 1;
}
/*------------------------------------------------------------.
| Save the NSHIFTS of SHIFTSET into the current linked list. |
`------------------------------------------------------------*/
static void
save_shifts (void)
{
shifts *p;
short *sp1;
short *sp2;
short *send;
p = (shifts *) xcalloc ((unsigned) (sizeof (shifts) +
(nshifts - 1) * sizeof (short)), 1);
shifts *p = shifts_new (nshifts);
p->number = this_state->number;
p->nshifts = nshifts;
sp1 = shiftset;
sp2 = p->shifts;
send = shiftset + nshifts;
while (sp1 < send)
*sp2++ = *sp1++;
shortcpy (p->shifts, shiftset, nshifts);
if (last_shift)
{
last_shift->next = p;
last_shift = p;
}
last_shift->next = p;
else
{
first_shift = p;
last_shift = p;
}
first_shift = p;
last_shift = p;
}
@@ -400,7 +343,7 @@ insert_start_shift (void)
core *statep;
shifts *sp;
statep = (core *) xcalloc ((unsigned) (sizeof (core) - sizeof (short)), 1);
statep = CORE_ALLOC (0);
statep->number = nstates;
statep->accessing_symbol = start_symbol;
@@ -408,9 +351,8 @@ insert_start_shift (void)
last_state = statep;
/* Make a shift from this state to (what will be) the final state. */
sp = XCALLOC (shifts, 1);
sp = shifts_new (1);
sp->number = nstates++;
sp->nshifts = 1;
sp->shifts[0] = nstates;
last_shift->next = sp;
@@ -429,135 +371,18 @@ insert_start_shift (void)
static void
augment_automaton (void)
{
int i;
int k;
core *statep;
shifts *sp;
shifts *sp2;
shifts *sp1 = NULL;
sp = first_shift;
if (sp)
if (!sp->nshifts)
{
if (sp->number == 0)
{
k = sp->nshifts;
statep = first_state->next;
/* There are no shifts for any state. Make one shift, from the
initial state to the next-to-final state. */
/* The states reached by shifts from first_state are numbered 1...K.
Look for one reached by start_symbol. */
while (statep->accessing_symbol < start_symbol
&& statep->number < k)
statep = statep->next;
if (statep->accessing_symbol == start_symbol)
{
/* We already have a next-to-final state.
Make sure it has a shift to what will be the final state. */
k = statep->number;
while (sp && sp->number < k)
{
sp1 = sp;
sp = sp->next;
}
if (sp && sp->number == k)
{
sp2 = (shifts *) xcalloc ((unsigned) (sizeof (shifts)
+
sp->nshifts *
sizeof (short)), 1);
sp2->number = k;
sp2->nshifts = sp->nshifts + 1;
sp2->shifts[0] = nstates;
for (i = sp->nshifts; i > 0; i--)
sp2->shifts[i] = sp->shifts[i - 1];
/* Patch sp2 into the chain of shifts in place of sp,
following sp1. */
sp2->next = sp->next;
sp1->next = sp2;
if (sp == last_shift)
last_shift = sp2;
XFREE (sp);
}
else
{
sp2 = XCALLOC (shifts, 1);
sp2->number = k;
sp2->nshifts = 1;
sp2->shifts[0] = nstates;
/* Patch sp2 into the chain of shifts between sp1 and sp. */
sp2->next = sp;
sp1->next = sp2;
if (sp == 0)
last_shift = sp2;
}
}
else
{
/* There is no next-to-final state as yet. */
/* Add one more shift in first_shift,
going to the next-to-final state (yet to be made). */
sp = first_shift;
sp2 = (shifts *) xcalloc (sizeof (shifts)
+ sp->nshifts * sizeof (short), 1);
sp2->nshifts = sp->nshifts + 1;
/* Stick this shift into the vector at the proper place. */
statep = first_state->next;
for (k = 0, i = 0; i < sp->nshifts; k++, i++)
{
if (statep->accessing_symbol > start_symbol && i == k)
sp2->shifts[k++] = nstates;
sp2->shifts[k] = sp->shifts[i];
statep = statep->next;
}
if (i == k)
sp2->shifts[k++] = nstates;
/* Patch sp2 into the chain of shifts
in place of sp, at the beginning. */
sp2->next = sp->next;
first_shift = sp2;
if (last_shift == sp)
last_shift = sp2;
XFREE (sp);
/* Create the next-to-final state, with shift to
what will be the final state. */
insert_start_shift ();
}
}
else
{
/* The initial state didn't even have any shifts.
Give it one shift, to the next-to-final state. */
sp = XCALLOC (shifts, 1);
sp->nshifts = 1;
sp->shifts[0] = nstates;
/* Patch sp into the chain of shifts at the beginning. */
sp->next = first_shift;
first_shift = sp;
/* Create the next-to-final state, with shift to
what will be the final state. */
insert_start_shift ();
}
}
else
{
/* There are no shifts for any state.
Make one shift, from the initial state to the next-to-final state. */
sp = XCALLOC (shifts, 1);
sp->nshifts = 1;
sp = shifts_new (1);
sp->shifts[0] = nstates;
/* Initialize the chain of shifts with sp. */
@@ -568,19 +393,121 @@ augment_automaton (void)
what will be the final state. */
insert_start_shift ();
}
else if (sp->number == 0)
{
statep = first_state->next;
/* The states reached by shifts from FIRST_STATE are numbered
1..(SP->NSHIFTS). Look for one reached by START_SYMBOL. */
while (statep->accessing_symbol < start_symbol
&& statep->number < sp->nshifts)
statep = statep->next;
if (statep->accessing_symbol == start_symbol)
{
/* We already have a next-to-final state.
Make sure it has a shift to what will be the final state. */
while (sp && sp->number < statep->number)
{
sp1 = sp;
sp = sp->next;
}
if (sp && sp->number == statep->number)
{
int i;
shifts *sp2 = shifts_new (sp->nshifts + 1);
sp2->number = statep->number;
sp2->shifts[0] = nstates;
for (i = sp->nshifts; i > 0; i--)
sp2->shifts[i] = sp->shifts[i - 1];
/* Patch sp2 into the chain of shifts in place of sp,
following sp1. */
sp2->next = sp->next;
sp1->next = sp2;
if (sp == last_shift)
last_shift = sp2;
XFREE (sp);
}
else
{
shifts *sp2 = shifts_new (1);
sp2->number = statep->number;
sp2->shifts[0] = nstates;
/* Patch sp2 into the chain of shifts between sp1 and sp. */
sp2->next = sp;
sp1->next = sp2;
if (sp == 0)
last_shift = sp2;
}
}
else
{
int i, k;
shifts *sp2;
/* There is no next-to-final state as yet. */
/* Add one more shift in first_shift,
going to the next-to-final state (yet to be made). */
sp = first_shift;
sp2 = shifts_new (sp->nshifts + 1);
/* Stick this shift into the vector at the proper place. */
statep = first_state->next;
for (k = 0, i = 0; i < sp->nshifts; k++, i++)
{
if (statep->accessing_symbol > start_symbol && i == k)
sp2->shifts[k++] = nstates;
sp2->shifts[k] = sp->shifts[i];
statep = statep->next;
}
if (i == k)
sp2->shifts[k++] = nstates;
/* Patch sp2 into the chain of shifts
in place of sp, at the beginning. */
sp2->next = sp->next;
first_shift = sp2;
if (last_shift == sp)
last_shift = sp2;
XFREE (sp);
/* Create the next-to-final state, with shift to
what will be the final state. */
insert_start_shift ();
}
}
else
{
/* The initial state didn't even have any shifts.
Give it one shift, to the next-to-final state. */
sp = shifts_new (1);
sp->shifts[0] = nstates;
/* Patch sp into the chain of shifts at the beginning. */
sp->next = first_shift;
first_shift = sp;
/* Create the next-to-final state, with shift to
what will be the final state. */
insert_start_shift ();
}
/* Make the final state--the one that follows a shift from the
next-to-final state.
The symbol for that shift is 0 (end-of-file). */
statep = (core *) xcalloc ((unsigned) (sizeof (core) - sizeof (short)), 1);
statep = CORE_ALLOC (0);
statep->number = nstates;
last_state->next = statep;
last_state = statep;
/* Make the shift from the final state to the termination state. */
sp = XCALLOC (shifts, 1);
sp = shifts_new (1);
sp->number = nstates++;
sp->nshifts = 1;
sp->shifts[0] = nstates;
last_shift->next = sp;
last_shift = sp;
@@ -590,7 +517,7 @@ augment_automaton (void)
final_state = nstates;
/* Make the termination state. */
statep = (core *) xcalloc ((unsigned) (sizeof (core) - sizeof (short)), 1);
statep = CORE_ALLOC (0);
statep->number = nstates++;
last_state->next = statep;
last_state = statep;
@@ -606,21 +533,15 @@ augment_automaton (void)
static void
save_reductions (void)
{
short *isp;
short *rp1;
short *rp2;
int item;
int count;
reductions *p;
short *rend;
int i;
/* Find and count the active items that represent ends of rules. */
count = 0;
for (isp = itemset; isp < itemsetend; isp++)
for (i = 0; i < nitemset; ++i)
{
item = ritem[*isp];
int item = ritem[itemset[i]];
if (item < 0)
redset[count++] = -item;
}
@@ -629,29 +550,18 @@ save_reductions (void)
if (count)
{
p = (reductions *) xcalloc ((unsigned) (sizeof (reductions) +
(count - 1) * sizeof (short)), 1);
reductions *p = REDUCTIONS_ALLOC (count);
p->number = this_state->number;
p->nreds = count;
rp1 = redset;
rp2 = p->rules;
rend = rp1 + count;
for (/* nothing */; rp1 < rend; ++rp1, ++rp2)
*rp2 = *rp1;
shortcpy (p->rules, redset, count);
if (last_reduction)
{
last_reduction->next = p;
last_reduction = p;
}
last_reduction->next = p;
else
{
first_reduction = p;
last_reduction = p;
}
first_reduction = p;
last_reduction = p;
}
}
@@ -670,6 +580,9 @@ generate_states (void)
while (this_state)
{
if (trace_flag)
fprintf (stderr, "Processing state %d (reached by %s)\n",
this_state->number, tags[this_state->accessing_symbol]);
/* Set up ruleset and itemset for the transitions out of this
state. ruleset gets a 1 bit for each rule that could reduce
now. itemset gets a vector of all the items that could be
@@ -684,8 +597,7 @@ generate_states (void)
/* create the shifts structures for the shifts to those states,
now that the state numbers transitioning to are known */
if (nshifts > 0)
save_shifts ();
save_shifts ();
/* states are queued when they are created; process them all */
this_state = this_state->next;
+31 -6
View File
@@ -1,19 +1,45 @@
## Process this file with automake to produce Makefile.in -*-Makefile-*-
AUTOMAKE_OPTIONS = 1.4 ../lib/ansi2knr
## Copyright 2001, 2002 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
## 02111-1307 USA
AUTOMAKE_OPTIONS = ../lib/ansi2knr
DEFS = @DEFS@ \
-DBISON_SIMPLE=\"$(pkgdatadir)/bison.simple\" \
-DBISON_HAIRY=\"$(pkgdatadir)/bison.hairy\" \
-DLOCALEDIR=\"$(datadir)/locale\"
INCLUDES = -I../intl -I$(top_srcdir)/lib -I..
LDADD = @INTLLIBS@ ../lib/libbison.a
CFLAGS = @CFLAGS@ $(WARNING_CFLAGS) $(WERROR_CFLAGS)
# libintl.h in is build/intl, intl/libgettext.h in src/,
# config.h in build/.
INCLUDES = -I$(top_builddir)/intl \
-I$(top_builddir) \
-I$(top_srcdir)/intl \
-I$(top_srcdir)/lib
LDADD = $(INTLLIBS) ../lib/libbison.a
bin_PROGRAMS = bison
bison_SOURCES = LR0.c closure.c complain.c conflicts.c \
derives.c \
files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
output.c \
output.h output.c \
state.h state.c \
print.c reader.c reduce.c symtab.c warshall.c vcg.c print_graph.c
EXTRA_bison_SOURCES = vmsgetargs.c
@@ -21,7 +47,6 @@ EXTRA_bison_SOURCES = vmsgetargs.c
noinst_HEADERS = LR0.h closure.h complain.h conflicts.h \
derives.h \
files.h getargs.h gram.h lalr.h lex.h nullable.h \
output.h state.h \
print.h reader.h reduce.h symtab.h warshall.h system.h types.h \
vcg.h vcg_defaults.h print_graph.h
+84 -59
View File
@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.5a from Makefile.am.
# Makefile.in generated by automake 1.5c from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,7 +13,6 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -48,6 +47,7 @@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
@@ -84,39 +84,52 @@ INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIB = @LIB@
LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
WERROR_CFLAGS = @WERROR_CFLAGS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
AUTOMAKE_OPTIONS = 1.4 ../lib/ansi2knr
AUTOMAKE_OPTIONS = ../lib/ansi2knr
DEFS = @DEFS@ \
-DBISON_SIMPLE=\"$(pkgdatadir)/bison.simple\" \
-DBISON_HAIRY=\"$(pkgdatadir)/bison.hairy\" \
-DLOCALEDIR=\"$(datadir)/locale\"
INCLUDES = -I../intl -I$(top_srcdir)/lib -I..
LDADD = @INTLLIBS@ ../lib/libbison.a
CFLAGS = @CFLAGS@ $(WARNING_CFLAGS) $(WERROR_CFLAGS)
# libintl.h in is build/intl, intl/libgettext.h in src/,
# config.h in build/.
INCLUDES = -I$(top_builddir)/intl \
-I$(top_builddir) \
-I$(top_srcdir)/intl \
-I$(top_srcdir)/lib
LDADD = $(INTLLIBS) ../lib/libbison.a
bin_PROGRAMS = bison
bison_SOURCES = LR0.c closure.c complain.c conflicts.c \
derives.c \
files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
output.c \
output.h output.c \
state.h state.c \
print.c reader.c reduce.c symtab.c warshall.c vcg.c print_graph.c
@@ -125,7 +138,6 @@ EXTRA_bison_SOURCES = vmsgetargs.c
noinst_HEADERS = LR0.h closure.h complain.h conflicts.h \
derives.h \
files.h getargs.h gram.h lalr.h lex.h nullable.h \
output.h state.h \
print.h reader.h reduce.h symtab.h warshall.h system.h types.h \
vcg.h vcg_defaults.h print_graph.h
@@ -144,9 +156,10 @@ am_bison_OBJECTS = LR0$U.$(OBJEXT) closure$U.$(OBJEXT) \
complain$U.$(OBJEXT) conflicts$U.$(OBJEXT) derives$U.$(OBJEXT) \
files$U.$(OBJEXT) getargs$U.$(OBJEXT) gram$U.$(OBJEXT) \
lalr$U.$(OBJEXT) lex$U.$(OBJEXT) main$U.$(OBJEXT) \
nullable$U.$(OBJEXT) output$U.$(OBJEXT) print$U.$(OBJEXT) \
reader$U.$(OBJEXT) reduce$U.$(OBJEXT) symtab$U.$(OBJEXT) \
warshall$U.$(OBJEXT) vcg$U.$(OBJEXT) print_graph$U.$(OBJEXT)
nullable$U.$(OBJEXT) output$U.$(OBJEXT) state$U.$(OBJEXT) \
print$U.$(OBJEXT) reader$U.$(OBJEXT) reduce$U.$(OBJEXT) \
symtab$U.$(OBJEXT) warshall$U.$(OBJEXT) vcg$U.$(OBJEXT) \
print_graph$U.$(OBJEXT)
bison_OBJECTS = $(am_bison_OBJECTS)
bison_LDADD = $(LDADD)
bison_DEPENDENCIES = ../lib/libbison.a
@@ -156,22 +169,23 @@ CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/LR0$U.Po $(DEPDIR)/closure$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/complain$U.Po $(DEPDIR)/conflicts$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/derives$U.Po $(DEPDIR)/files$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/getargs$U.Po $(DEPDIR)/gram$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/lalr$U.Po $(DEPDIR)/lex$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/main$U.Po $(DEPDIR)/nullable$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/output$U.Po $(DEPDIR)/print$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/print_graph$U.Po $(DEPDIR)/reader$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/reduce$U.Po $(DEPDIR)/symtab$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/vcg$U.Po $(DEPDIR)/vmsgetargs$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/warshall$U.Po
am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/LR0$U.Po ./$(DEPDIR)/closure$U.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/complain$U.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/conflicts$U.Po ./$(DEPDIR)/derives$U.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/files$U.Po ./$(DEPDIR)/getargs$U.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/gram$U.Po ./$(DEPDIR)/lalr$U.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/lex$U.Po ./$(DEPDIR)/main$U.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/nullable$U.Po ./$(DEPDIR)/output$U.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/print$U.Po ./$(DEPDIR)/print_graph$U.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/reader$U.Po ./$(DEPDIR)/reduce$U.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/state$U.Po ./$(DEPDIR)/symtab$U.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/vcg$U.Po ./$(DEPDIR)/vmsgetargs$U.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/warshall$U.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
CFLAGS = @CFLAGS@
DIST_SOURCES = $(bison_SOURCES) $(EXTRA_bison_SOURCES)
DATA = $(pkgdata_DATA)
@@ -188,7 +202,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@@ -229,30 +243,31 @@ ANSI2KNR = ../lib/ansi2knr
mostlyclean-kr:
-test "$U" = "" || rm -f *_.c
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/LR0$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/closure$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/complain$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/conflicts$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/derives$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/files$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getargs$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/gram$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lalr$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lex$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/main$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/nullable$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/output$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/print$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/print_graph$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/reader$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/reduce$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/symtab$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vcg$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vmsgetargs$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/warshall$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LR0$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closure$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/complain$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conflicts$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/derives$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/files$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getargs$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gram$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lalr$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lex$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nullable$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print_graph$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reader$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reduce$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/state$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symtab$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcg$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmsgetargs$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/warshall$U.Po@am__quote@
distclean-depend:
-rm -rf $(DEPDIR)
-rm -rf ./$(DEPDIR)
.c.o:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@@ -300,6 +315,8 @@ reader_.c: reader.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/reader.c; then echo $(srcdir)/reader.c; else echo reader.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > reader_.c || rm -f reader_.c
reduce_.c: reduce.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/reduce.c; then echo $(srcdir)/reduce.c; else echo reduce.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > reduce_.c || rm -f reduce_.c
state_.c: state.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/state.c; then echo $(srcdir)/state.c; else echo state.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > state_.c || rm -f state_.c
symtab_.c: symtab.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/symtab.c; then echo $(srcdir)/symtab.c; else echo symtab.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > symtab_.c || rm -f symtab_.c
vcg_.c: vcg.c $(ANSI2KNR)
@@ -313,17 +330,18 @@ conflicts_.$(OBJEXT) derives_.$(OBJEXT) files_.$(OBJEXT) \
getargs_.$(OBJEXT) gram_.$(OBJEXT) lalr_.$(OBJEXT) lex_.$(OBJEXT) \
main_.$(OBJEXT) nullable_.$(OBJEXT) output_.$(OBJEXT) print_.$(OBJEXT) \
print_graph_.$(OBJEXT) reader_.$(OBJEXT) reduce_.$(OBJEXT) \
symtab_.$(OBJEXT) vcg_.$(OBJEXT) vmsgetargs_.$(OBJEXT) \
state_.$(OBJEXT) symtab_.$(OBJEXT) vcg_.$(OBJEXT) vmsgetargs_.$(OBJEXT) \
warshall_.$(OBJEXT) : $(ANSI2KNR)
uninstall-info-am:
pkgdataDATA_INSTALL = $(INSTALL_DATA)
install-pkgdataDATA: $(pkgdata_DATA)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
@list='$(pkgdata_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
$(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
echo " $(pkgdataDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
$(pkgdataDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
done
uninstall-pkgdataDATA:
@@ -334,29 +352,33 @@ uninstall-pkgdataDATA:
rm -f $(DESTDIR)$(pkgdatadir)/$$f; \
done
ETAGS = etags
ETAGSFLAGS =
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique $(LISP)
mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
@@ -365,7 +387,6 @@ GTAGS:
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
@@ -373,13 +394,16 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
cp -pR $$d/$$file $(distdir)$$dir \
|| exit 1; \
else \
test -f $(distdir)/$$file \
@@ -405,6 +429,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
+307 -211
View File
@@ -1,7 +1,9 @@
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
#line
/* Skeleton output parser for bison,
Copyright 1984, 1989, 1990, 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -28,58 +30,102 @@
It was written by Richard Stallman by simplifying the hairy parser
used when %semantic_parser is specified. */
#ifndef YYSTACK_USE_ALLOCA
# ifdef alloca
# define YYSTACK_USE_ALLOCA 1
# else /* alloca not defined */
# ifdef __GNUC__
# define YYSTACK_USE_ALLOCA 1
# define alloca __builtin_alloca
# else /* not GNU C. */
# if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
# define YYSTACK_USE_ALLOCA 1
# include <alloca.h>
# else /* not sparc */
/* We think this test detects Watcom and Microsoft C. */
/* This used to test MSDOS, but that is a bad idea since that
symbol is in the user namespace. */
# if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
# if 0
/* No need for malloc.h, which pollutes the namespace; instead,
just don't use alloca. */
# include <malloc.h>
# endif
# else /* not MSDOS, or __TURBOC__ */
# if defined(_AIX)
/* I don't know what this was needed for, but it pollutes the
namespace. So I turned it off. rms, 2 May 1997. */
/* #include <malloc.h> */
#pragma alloca
# define YYSTACK_USE_ALLOCA 1
# else /* not MSDOS, or __TURBOC__, or _AIX */
# if 0
/* [email protected] says this works for HPUX 9.05 and up, and on
HPUX 10. Eventually we can turn this on. */
# ifdef __hpux
# define YYSTACK_USE_ALLOCA 1
# define alloca __builtin_alloca
# endif /* __hpux */
# endif
# endif /* not _AIX */
# endif /* not MSDOS, or __TURBOC__ */
# endif /* not sparc */
# endif /* not GNU C */
# endif /* alloca not defined */
#endif /* YYSTACK_USE_ALLOCA not defined */
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
variables, as they might otherwise be expanded by user macros.
There are some unavoidable exceptions within include files to
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
#ifndef YYSTACK_USE_ALLOCA
# define YYSTACK_USE_ALLOCA 0
#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
/* The parser invokes alloca or malloc; define the necessary symbols. */
# if YYSTACK_USE_ALLOCA
# define YYSTACK_ALLOC alloca
# else
# ifndef YYSTACK_USE_ALLOCA
# if defined (alloca) || defined (_ALLOCA_H)
# define YYSTACK_ALLOC alloca
# else
# ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca
# endif
# endif
# endif
# endif
# ifdef YYSTACK_ALLOC
/* Pacify GCC's `empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# else
# if defined (__STDC__) || defined (__cplusplus)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# endif
# define YYSTACK_ALLOC malloc
# define YYSTACK_FREE free
# endif
/* A type that is properly aligned for any stack member. */
union yyalloc
{
short yyss;
YYSTYPE yyvs;
# if YYLSP_NEEDED
YYLTYPE yyls;
# endif
};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# if YYLSP_NEEDED
# define YYSTACK_BYTES(N) \
((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
+ 2 * YYSTACK_GAP_MAX)
# else
# define YYSTACK_BYTES(N) \
((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAX)
# endif
/* Relocate the TYPE STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
# define YYSTACK_RELOCATE(Type, Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
yymemcpy ((char *) yyptr, (char *) (Stack), \
yysize * (YYSIZE_T) sizeof (Type)); \
Stack = &yyptr->Stack; \
yynewbytes = yystacksize * sizeof (Type) + YYSTACK_GAP_MAX; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (0)
#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
#endif
#if YYSTACK_USE_ALLOCA
# define YYSTACK_ALLOC alloca
#else
# define YYSTACK_ALLOC malloc
#if ! defined (YYSIZE_T) && defined (size_t)
# define YYSIZE_T size_t
#endif
#if ! defined (YYSIZE_T)
# if defined (__STDC__) || defined (__cplusplus)
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# endif
#endif
#if ! defined (YYSIZE_T)
# define YYSIZE_T unsigned int
#endif
#define yyerrok (yyerrstatus = 0)
@@ -152,15 +198,19 @@ while (0)
/* Enable debugging if requested. */
#if YYDEBUG
# ifndef YYFPRINTF
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
# define YYFPRINTF fprintf
# endif
# define YYDPRINTF(Args) \
do { \
if (yydebug) \
fprintf Args; \
YYFPRINTF Args; \
} while (0)
/* Nonzero means print parse trace. [The following comment makes no
sense to me. Could someone clarify it? --akim] Since this is
uninitialized, it does not stop multiple parsers from coexisting.
*/
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
@@ -172,7 +222,12 @@ int yydebug;
#endif
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
if the built-in stack extension method is used). */
if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
#if YYMAXDEPTH == 0
# undef YYMAXDEPTH
#endif
@@ -181,35 +236,83 @@ int yydebug;
# define YYMAXDEPTH 10000
#endif
/* Define __yy_memcpy. Note that the size argument
should be passed with type unsigned int, because that is what the non-GCC
definitions require. With GCC, __builtin_memcpy takes an arg
of type size_t, but it can handle unsigned int. */
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
# define __yy_memcpy(To, From, Count) __builtin_memcpy (To, From, Count)
#else /* not GNU C or C++ */
#if ! defined (yyoverflow) && ! defined (yymemcpy)
# if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
# define yymemcpy __builtin_memcpy
# else /* not GNU C or C++ */
/* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */
static void
# ifndef __cplusplus
__yy_memcpy (to, from, count)
char *to;
const char *from;
unsigned int count;
# else /* __cplusplus */
__yy_memcpy (char *to, const char *from, unsigned int count)
# endif
# if defined (__STDC__) || defined (__cplusplus)
yymemcpy (char *yyto, const char *yyfrom, YYSIZE_T yycount)
# else
yymemcpy (yyto, yyfrom, yycount)
char *yyto;
const char *yyfrom;
YYSIZE_T yycount;
# endif
{
register const char *f = from;
register char *t = to;
register int i = count;
register const char *yyf = yyfrom;
register char *yyt = yyto;
register YYSIZE_T yyi = yycount;
while (i-- > 0)
*t++ = *f++;
while (yyi-- != 0)
*yyt++ = *yyf++;
}
# endif
#endif
#ifdef YYERROR_VERBOSE
# ifndef yystrlen
# if defined (__GLIBC__) && defined (_STRING_H)
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
static YYSIZE_T
# if defined (__STDC__) || defined (__cplusplus)
yystrlen (const char *yystr)
# else
yystrlen (yystr)
const char *yystr;
# endif
{
register const char *yys = yystr;
while (*yys++ != '\0')
continue;
return yys - yystr - 1;
}
# endif
# endif
# ifndef yystpcpy
# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
# define yystpcpy stpcpy
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
static char *
# if defined (__STDC__) || defined (__cplusplus)
yystpcpy (char *yydest, const char *yysrc)
# else
yystpcpy (yydest, yysrc)
char *yydest;
const char *yysrc;
# endif
{
register char *yyd = yydest;
register const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
return yyd - 1;
}
# endif
# endif
#endif
#line
@@ -221,13 +324,13 @@ __yy_memcpy (char *to, const char *from, unsigned int count)
to the proper pointer type. */
#ifdef YYPARSE_PARAM
# ifdef __cplusplus
# if defined (__STDC__) || defined (__cplusplus)
# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
# define YYPARSE_PARAM_DECL
# else /* !__cplusplus */
# else
# define YYPARSE_PARAM_ARG YYPARSE_PARAM
# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
# endif /* !__cplusplus */
# endif
#else /* !YYPARSE_PARAM */
# define YYPARSE_PARAM_ARG
# define YYPARSE_PARAM_DECL
@@ -245,7 +348,7 @@ int yyparse (void);
/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
variables are global, or local to YYPARSE. */
#define _YY_DECL_VARIABLES \
#define YY_DECL_NON_LSP_VARIABLES \
/* The lookahead symbol. */ \
int yychar; \
\
@@ -257,13 +360,13 @@ int yynerrs;
#if YYLSP_NEEDED
# define YY_DECL_VARIABLES \
_YY_DECL_VARIABLES \
YY_DECL_NON_LSP_VARIABLES \
\
/* Location data for the lookahead symbol. */ \
YYLTYPE yylloc;
#else
# define YY_DECL_VARIABLES \
_YY_DECL_VARIABLES
YY_DECL_NON_LSP_VARIABLES
#endif
@@ -284,6 +387,7 @@ yyparse (YYPARSE_PARAM_ARG)
register int yystate;
register int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* Lookahead token as an internal (translated) token number. */
@@ -291,7 +395,7 @@ yyparse (YYPARSE_PARAM_ARG)
/* Three stacks and their tools:
`yyss': related to states,
`yysv': related to semantic values,
`yyvs': related to semantic values,
`yyls': related to locations.
Refer to the stacks thru separate pointers, to allow yyoverflow
@@ -320,16 +424,15 @@ yyparse (YYPARSE_PARAM_ARG)
# define YYPOPSTACK (yyvsp--, yyssp--)
#endif
int yystacksize = YYINITDEPTH;
int yyfree_stacks = 0;
YYSIZE_T yystacksize = YYINITDEPTH;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
# if YYLSP_NEEDED
#if YYLSP_NEEDED
YYLTYPE yyloc;
# endif
#endif
/* When reducing, the number of symbols on the RHS of the reduced
rule. */
@@ -368,81 +471,71 @@ yyparse (YYPARSE_PARAM_ARG)
if (yyssp >= yyss + yystacksize - 1)
{
/* Give user a chance to reallocate the stack. Use copies of
these so that the &'s don't force the real ones into memory.
*/
YYSTYPE *yyvs1 = yyvs;
short *yyss1 = yyss;
#if YYLSP_NEEDED
YYLTYPE *yyls1 = yyls;
#endif
/* Get the current used size of the three stacks, in elements. */
int size = yyssp - yyss + 1;
YYSIZE_T yysize = yyssp - yyss + 1;
#ifdef yyoverflow
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. */
# if YYLSP_NEEDED
/* This used to be a conditional around just the two extra args,
but that might be undefined if yyoverflow is a macro. */
yyoverflow ("parser stack overflow",
&yyss1, size * sizeof (*yyssp),
&yyvs1, size * sizeof (*yyvsp),
&yyls1, size * sizeof (*yylsp),
&yystacksize);
# else
yyoverflow ("parser stack overflow",
&yyss1, size * sizeof (*yyssp),
&yyvs1, size * sizeof (*yyvsp),
&yystacksize);
# endif
{
/* Give user a chance to reallocate the stack. Use copies of
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
short *yyss1 = yyss;
yyss = yyss1; yyvs = yyvs1;
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. */
# if YYLSP_NEEDED
yyls = yyls1;
YYLTYPE *yyls1 = yyls;
/* This used to be a conditional around just the two extra args,
but that might be undefined if yyoverflow is a macro. */
yyoverflow ("parser stack overflow",
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
&yyls1, yysize * sizeof (*yylsp),
&yystacksize);
yyls = yyls1;
# else
yyoverflow ("parser stack overflow",
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
&yystacksize);
# endif
yyss = yyss1;
yyvs = yyvs1;
}
#else /* no yyoverflow */
/* Extend the stack our own way. */
if (yystacksize >= YYMAXDEPTH)
{
yyerror ("parser stack overflow");
if (yyfree_stacks)
{
free (yyss);
free (yyvs);
# if YYLSP_NEEDED
free (yyls);
# endif
}
return 2;
}
goto yyoverflowlab;
yystacksize *= 2;
if (yystacksize > YYMAXDEPTH)
yystacksize = YYMAXDEPTH;
# if !YYSTACK_USE_ALLOCA
yyfree_stacks = 1;
# endif
yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
__yy_memcpy ((char *)yyss, (char *)yyss1,
size * (unsigned int) sizeof (*yyssp));
yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
__yy_memcpy ((char *)yyvs, (char *)yyvs1,
size * (unsigned int) sizeof (*yyvsp));
{
short *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyoverflowlab;
YYSTACK_RELOCATE (short, yyss);
YYSTACK_RELOCATE (YYSTYPE, yyvs);
# if YYLSP_NEEDED
yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
__yy_memcpy ((char *)yyls, (char *)yyls1,
size * (unsigned int) sizeof (*yylsp));
YYSTACK_RELOCATE (YYLTYPE, yyls);
# endif
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
}
#endif /* no yyoverflow */
yyssp = yyss + size - 1;
yyvsp = yyvs + size - 1;
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
#if YYLSP_NEEDED
yylsp = yyls + size - 1;
yylsp = yyls + yysize - 1;
#endif
YYDPRINTF ((stderr, "Stack size increased to %d\n", yystacksize));
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
if (yyssp >= yyss + yystacksize - 1)
YYABORT;
@@ -497,13 +590,14 @@ yybackup:
which are defined only if `YYDEBUG' is set. */
if (yydebug)
{
fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
YYFPRINTF (stderr, "Next token is %d (%s",
yychar, yytname[yychar1]);
/* Give the individual parser a way to print the precise
meaning of a token, for further debugging info. */
# ifdef YYPRINT
YYPRINT (stderr, yychar, yylval);
# endif
fprintf (stderr, ")\n");
YYFPRINTF (stderr, ")\n");
}
#endif
}
@@ -535,7 +629,8 @@ yybackup:
YYACCEPT;
/* Shift the lookahead token. */
YYDPRINTF ((stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]));
YYDPRINTF ((stderr, "Shifting token %d (%s), ",
yychar, yytname[yychar1]));
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
@@ -594,15 +689,15 @@ yyreduce:
are defined only if `YYDEBUG' is set. */
if (yydebug)
{
int i;
int yyi;
fprintf (stderr, "Reducing via rule %d (line %d), ",
yyn, yyrline[yyn]);
YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
yyn, yyrline[yyn]);
/* Print the symbols being reduced, and their result. */
for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
fprintf (stderr, "%s ", yytname[yyrhs[i]]);
fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
}
#endif
%% actions /* The action file replaces this line. */
@@ -617,11 +712,11 @@ yyreduce:
#if YYDEBUG
if (yydebug)
{
short *ssp1 = yyss - 1;
fprintf (stderr, "state stack now");
while (ssp1 != yyssp)
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
short *yyssp1 = yyss - 1;
YYFPRINTF (stderr, "state stack now");
while (yyssp1 != yyssp)
YYFPRINTF (stderr, " %d", *++yyssp1);
YYFPRINTF (stderr, "\n");
}
#endif
@@ -659,46 +754,47 @@ yyerrlab:
if (yyn > YYFLAG && yyn < YYLAST)
{
int size = 0;
char *msg;
int x, count;
YYSIZE_T yysize = 0;
char *yymsg;
int yyx, yycount;
count = 0;
/* Start X at -yyn if nec to avoid negative indexes in yycheck. */
for (x = (yyn < 0 ? -yyn : 0);
x < (int) (sizeof (yytname) / sizeof (char *)); x++)
if (yycheck[x + yyn] == x)
size += strlen (yytname[x]) + 15, count++;
size += strlen ("parse error, unexpected `") + 1;
size += strlen (yytname[YYTRANSLATE (yychar)]);
msg = (char *) malloc (size);
if (msg != 0)
yycount = 0;
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */
for (yyx = yyn < 0 ? -yyn : 0;
yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
if (yycheck[yyx + yyn] == yyx)
yysize += yystrlen (yytname[yyx]) + 15, yycount++;
yysize += yystrlen ("parse error, unexpected ") + 1;
yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
yymsg = (char *) YYSTACK_ALLOC (yysize);
if (yymsg != 0)
{
strcpy (msg, "parse error, unexpected `");
strcat (msg, yytname[YYTRANSLATE (yychar)]);
strcat (msg, "'");
char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
if (count < 5)
if (yycount < 5)
{
count = 0;
for (x = (yyn < 0 ? -yyn : 0);
x < (int) (sizeof (yytname) / sizeof (char *)); x++)
if (yycheck[x + yyn] == x)
yycount = 0;
for (yyx = yyn < 0 ? -yyn : 0;
yyx < (int) (sizeof (yytname) / sizeof (char *));
yyx++)
if (yycheck[yyx + yyn] == yyx)
{
strcat (msg, count == 0 ? ", expecting `" : " or `");
strcat (msg, yytname[x]);
strcat (msg, "'");
count++;
const char *yyq = ! yycount ? ", expecting " : " or ";
yyp = yystpcpy (yyp, yyq);
yyp = yystpcpy (yyp, yytname[yyx]);
yycount++;
}
}
yyerror (msg);
free (msg);
yyerror (yymsg);
YYSTACK_FREE (yymsg);
}
else
yyerror ("parse error; also virtual memory exceeded");
yyerror ("parse error; also virtual memory exhausted");
}
else
#endif /* YYERROR_VERBOSE */
#endif /* defined (YYERROR_VERBOSE) */
yyerror ("parse error");
}
goto yyerrlab1;
@@ -761,11 +857,11 @@ yyerrpop:
#if YYDEBUG
if (yydebug)
{
short *ssp1 = yyss - 1;
fprintf (stderr, "Error: state stack now");
while (ssp1 != yyssp)
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
short *yyssp1 = yyss - 1;
YYFPRINTF (stderr, "Error: state stack now");
while (yyssp1 != yyssp)
YYFPRINTF (stderr, " %d", *++yyssp1);
YYFPRINTF (stderr, "\n");
}
#endif
@@ -810,28 +906,28 @@ yyerrhandle:
| yyacceptlab -- YYACCEPT comes here. |
`-------------------------------------*/
yyacceptlab:
if (yyfree_stacks)
{
free (yyss);
free (yyvs);
#if YYLSP_NEEDED
free (yyls);
#endif
}
return 0;
yyresult = 0;
goto yyreturn;
/*-----------------------------------.
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
yyabortlab:
if (yyfree_stacks)
{
free (yyss);
free (yyvs);
#if YYLSP_NEEDED
free (yyls);
yyresult = 1;
goto yyreturn;
/*---------------------------------------------.
| yyoverflowab -- parser overflow comes here. |
`---------------------------------------------*/
yyoverflowlab:
yyerror ("parser stack overflow");
yyresult = 2;
/* Fall through. */
yyreturn:
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
#endif
}
return 1;
return yyresult;
}
+99 -160
View File
@@ -1,5 +1,5 @@
/* Subroutines for bison
Copyright 1984, 1989, 2000 Free Software Foundation, Inc.
Copyright 1984, 1989, 2000, 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -19,61 +19,69 @@
02111-1307, USA. */
#include "system.h"
#include "getargs.h"
#include "gram.h"
#include "reader.h"
#include "closure.h"
#include "derives.h"
#include "warshall.h"
/* NITEMSET is the size of the array ITEMSET. */
short *itemset;
short *itemsetend;
int nitemset;
static unsigned *ruleset;
/* internal data. See comments before set_fderives and set_firsts. */
static unsigned *fderives;
static unsigned *firsts;
/* Retrieve the FDERIVES/FIRSTS sets of the nonterminals numbered Var. */
#define FDERIVES(Var) (fderives + ((Var) - ntokens) * rulesetsize)
#define FIRSTS(Var) (firsts + ((Var) - ntokens) * varsetsize)
/* number of words required to hold a bit for each rule */
static int rulesetsize;
/* number of words required to hold a bit for each variable */
static int varsetsize;
#if DEBUG
/*-----------------.
| Debugging code. |
`-----------------*/
static void
print_closure (int n)
print_closure (const char *title, short *array, size_t size)
{
short *isp;
printf ("\n\nn = %d\n\n", n);
for (isp = itemset; isp < itemsetend; isp++)
printf (" %d\n", *isp);
size_t i;
fprintf (stderr, "Closure: %s\n", title);
for (i = 0; i < size; ++i)
{
short *rp;
fprintf (stderr, " %2d: .", array[i]);
for (rp = &ritem[array[i]]; *rp > 0; ++rp)
fprintf (stderr, " %s", tags[*rp]);
fprintf (stderr, " (rule %d)\n", -*rp);
}
fputs ("\n\n", stderr);
}
static void
print_firsts (void)
{
int i;
int j;
unsigned *rowp;
printf ("\n\n\nFIRSTS\n\n");
int i, j;
fprintf (stderr, "FIRSTS\n");
for (i = ntokens; i < nsyms; i++)
{
printf ("\n\n%s firsts\n\n", tags[i]);
rowp = firsts + ((i - ntokens) * varsetsize);
fprintf (stderr, "\t%s firsts\n", tags[i]);
for (j = 0; j < nvars; j++)
if (BITISSET (rowp, j))
printf (" %s\n", tags[j + ntokens]);
if (BITISSET (FIRSTS (i), j))
fprintf (stderr, "\t\t%d (%s)\n", j + ntokens, tags[j + ntokens]);
}
fprintf (stderr, "\n\n");
}
@@ -82,23 +90,24 @@ print_fderives (void)
{
int i;
int j;
unsigned *rp;
printf ("\n\n\nFDERIVES\n");
fprintf (stderr, "FDERIVES\n");
for (i = ntokens; i < nsyms; i++)
{
printf ("\n\n%s derives\n\n", tags[i]);
rp = fderives + i * rulesetsize;
fprintf (stderr, "\t%s derives\n", tags[i]);
for (j = 0; j <= nrules; j++)
if (BITISSET (rp, j))
printf (" %d\n", j);
if (BITISSET (FDERIVES (i), j))
{
short *rhsp;
fprintf (stderr, "\t\t%d:", j);
for (rhsp = ritem + rule_table[j].rhs; *rhsp > 0; ++rhsp)
fprintf (stderr, " %s", tags[*rhsp]);
fputc ('\n', stderr);
}
}
fflush (stdout);
fprintf (stderr, "\n\n");
}
#endif
/*-------------------------------------------------------------------.
| Set FIRSTS to be an NVARS by NVARS bit matrix indicating which |
@@ -113,39 +122,24 @@ print_fderives (void)
static void
set_firsts (void)
{
unsigned *row;
int symbol;
short *sp;
int rowsize;
int i, j;
int i;
varsetsize = WORDSIZE (nvars);
varsetsize = rowsize = WORDSIZE (nvars);
firsts = XCALLOC (unsigned, nvars * varsetsize);
firsts = XCALLOC (unsigned, nvars * rowsize);
row = firsts;
for (i = ntokens; i < nsyms; i++)
{
sp = derives[i];
while (*sp >= 0)
{
symbol = ritem[rrhs[*sp++]];
if (ISVAR (symbol))
{
symbol -= ntokens;
SETBIT (row, symbol);
}
}
row += rowsize;
}
for (j = 0; derives[i][j] >= 0; ++j)
{
int symbol = ritem[rule_table[derives[i][j]].rhs];
if (ISVAR (symbol))
SETBIT (FIRSTS (i), symbol - ntokens);
}
RTC (firsts, nvars);
#ifdef DEBUG
print_firsts ();
#endif
if (trace_flag)
print_firsts ();
}
/*-------------------------------------------------------------------.
@@ -161,52 +155,20 @@ set_firsts (void)
static void
set_fderives (void)
{
unsigned *rrow;
unsigned *vrow;
int j;
unsigned cword;
short *rp;
int b;
int i, j, k;
int ruleno;
int i;
fderives = XCALLOC (unsigned, nvars * rulesetsize) - ntokens * rulesetsize;
fderives = XCALLOC (unsigned, nvars * rulesetsize);
set_firsts ();
rrow = fderives + ntokens * rulesetsize;
for (i = ntokens; i < nsyms; ++i)
for (j = ntokens; j < nsyms; ++j)
if (BITISSET (FIRSTS (i), j - ntokens))
for (k = 0; derives[j][k] > 0; ++k)
SETBIT (FDERIVES (i), derives[j][k]);
for (i = ntokens; i < nsyms; i++)
{
vrow = firsts + ((i - ntokens) * varsetsize);
cword = *vrow++;
b = 0;
for (j = ntokens; j < nsyms; j++)
{
if (cword & (1 << b))
{
rp = derives[j];
while ((ruleno = *rp++) > 0)
{
SETBIT (rrow, ruleno);
}
}
b++;
if (b >= BITS_PER_WORD && j + 1 < nsyms)
{
cword = *vrow++;
b = 0;
}
}
rrow += rulesetsize;
}
#ifdef DEBUG
print_fderives ();
#endif
if (trace_flag)
print_fderives ();
XFREE (firsts);
}
@@ -228,82 +190,59 @@ new_closure (int n)
void
closure (short *core, int n)
{
/* Index over CORE. */
int c;
/* Index over RULESET. */
int r;
/* A bit index over RULESET. */
int ruleno;
unsigned word;
short *csp;
unsigned *dsp;
unsigned *rsp;
short *csend;
unsigned *rsend;
int symbol;
int itemno;
rsp = ruleset;
rsend = ruleset + rulesetsize;
csend = core + n;
if (trace_flag)
print_closure ("input", core, n);
if (n == 0)
{
dsp = fderives + start_symbol * rulesetsize;
while (rsp < rsend)
*rsp++ = *dsp++;
for (r = 0; r < rulesetsize; ++r)
ruleset[r] = FDERIVES (start_symbol)[r];
}
else
{
while (rsp < rsend)
*rsp++ = 0;
for (r = 0; r < rulesetsize; ++r)
ruleset[r] = 0;
csp = core;
while (csp < csend)
{
symbol = ritem[*csp++];
if (ISVAR (symbol))
{
dsp = fderives + symbol * rulesetsize;
rsp = ruleset;
while (rsp < rsend)
*rsp++ |= *dsp++;
}
}
for (c = 0; c < n; ++c)
if (ISVAR (ritem[core[c]]))
for (r = 0; r < rulesetsize; ++r)
ruleset[r] |= FDERIVES (ritem[core[c]])[r];
}
ruleno = 0;
itemsetend = itemset;
csp = core;
rsp = ruleset;
while (rsp < rsend)
nitemset = 0;
c = 0;
for (ruleno = 0; ruleno < rulesetsize * BITS_PER_WORD; ++ruleno)
if (BITISSET (ruleset, ruleno))
{
int itemno = rule_table[ruleno].rhs;
while (c < n && core[c] < itemno)
{
itemset[nitemset] = core[c];
nitemset++;
c++;
}
itemset[nitemset] = itemno;
nitemset++;
}
while (c < n)
{
word = *rsp++;
if (word == 0)
{
ruleno += BITS_PER_WORD;
}
else
{
int b;
for (b = 0; b < BITS_PER_WORD; b++)
{
if (word & (1 << b))
{
itemno = rrhs[ruleno];
while (csp < csend && *csp < itemno)
*itemsetend++ = *csp++;
*itemsetend++ = itemno;
}
ruleno++;
}
}
itemset[nitemset] = core[c];
nitemset++;
c++;
}
while (csp < csend)
*itemsetend++ = *csp++;
#if DEBUG
print_closure (n);
#endif
if (trace_flag)
print_closure ("output", itemset, nitemset);
}
@@ -312,5 +251,5 @@ free_closure (void)
{
XFREE (itemset);
XFREE (ruleset);
XFREE (fderives + ntokens * rulesetsize);
XFREE (fderives);
}
+10 -9
View File
@@ -1,5 +1,5 @@
/* Subroutines for bison
Copyright 1984, 1989, 2000 Free Software Foundation, Inc.
Copyright 1984, 1989, 2000, 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -30,18 +30,19 @@
void new_closure PARAMS ((int n));
/* Given a vector of item numbers ITEMS, of length N, set up ruleset
and itemset to indicate what rules could be run and which items
could be accepted when those items are the active ones.
/* Given the kernel (aka core) of a state (a vector of item numbers
ITEMS, of length N), set up ruleset and itemset to indicate what
rules could be run and which items could be accepted when those
items are the active ones.
ruleset contains a bit for each rule. closure sets the bits for
all rules which could potentially describe the next input to be
read.
itemset is a vector of item numbers; itemsetend points to just
beyond the end of the part of it that is significant. closure
places there the indices of all items which represent units of
input that could arrive next. */
ITEMSET is a vector of item numbers; NITEMSET is its size
9actually, points to just beyond the end of the part of it that is
significant). closure places there the indices of all items which
represent units of input that could arrive next. */
void closure PARAMS ((short *items, int n));
@@ -51,6 +52,6 @@ void closure PARAMS ((short *items, int n));
void free_closure PARAMS ((void));
extern short *itemset;
extern short *itemsetend;
extern int nitemset;
#endif /* !CLOSURE_H_ */
+4 -63
View File
@@ -1,5 +1,5 @@
/* Declaration for error-reporting function for Bison.
Copyright 2000 Free Software Foundation, Inc.
Copyright 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -41,6 +41,9 @@
void exit ();
#endif
/* To get error_one_per_line. */
#include "error.h"
#include "complain.h"
#ifndef HAVE_DECL_STRERROR_R
@@ -106,9 +109,6 @@ unsigned int warn_message_count;
/* This variable is incremented each time `complain' is called. */
unsigned int complain_message_count;
/* Sometimes we want to have at most one error per line. This
variable controls whether this mode is selected or not. */
int error_one_per_line;
/*--------------------------------.
| Report a warning, and proceed. |
@@ -248,62 +248,3 @@ fatal (message, va_alist)
fflush (stderr);
exit (1);
}
/*------------------------------------------------------------------.
| A severe error has occurred, we cannot proceed. Exit with STATUS, |
| and report the error message of the errno ERRNUM. |
`------------------------------------------------------------------*/
void
#if defined VA_START && defined __STDC__
error (int status, int errnum,
const char *message, ...)
#else
error (status, errnum, message, va_alist)
int status;
int errnum;
char *message;
va_dcl
#endif
{
#ifdef VA_START
va_list args;
#endif
fflush (stdout);
if (infile != NULL)
fprintf (stderr, "%s:%d: ", infile, lineno);
else
fprintf (stderr, "%s:", program_name);
fputs (_("fatal error: "), stderr);
#ifdef VA_START
VA_START (args, message);
vfprintf (stderr, message, args);
va_end (args);
#else
fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
#endif
if (errnum)
{
#if defined HAVE_STRERROR_R || _LIBC
char errbuf[1024];
# if HAVE_WORKING_STRERROR_R || _LIBC
fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
# else
/* Don't use __strerror_r's return value because on some systems
(at least DEC UNIX 4.0[A-D]) strerror_r returns `int'. */
__strerror_r (errnum, errbuf, sizeof errbuf);
fprintf (stderr, ": %s", errbuf);
# endif
#else
fprintf (stderr, ": %s", strerror (errnum));
#endif
}
putc ('\n', stderr);
fflush (stderr);
if (status)
exit (status);
}
+2 -14
View File
@@ -1,5 +1,5 @@
/* Declaration for error-reporting function for Bison.
Copyright 2000 Free Software Foundation, Inc.
Copyright 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -40,18 +40,10 @@ extern void complain (const char *format, ...)
extern void fatal (const char *format, ...)
__attribute__ ((__format__ (__printf__, 1, 2)));
/* Print a message with `fprintf (stderr, FORMAT, ...)';
if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
If STATUS is nonzero, terminate the program with `exit (STATUS)'. */
extern void error (int status, int errnum,
const char *format, ...)
__attribute__ ((__format__ (__printf__, 3, 4)));
#else
void warn ();
void complain ();
void error ();
void fatal ();
#endif
/* Position in the current input file. */
@@ -64,10 +56,6 @@ extern unsigned int warn_message_count;
/* This variable is incremented each time `complain' is called. */
extern unsigned int complain_message_count;
/* Sometimes we want to have at most one error per line. This
variable controls whether this mode is selected or not. */
extern int error_one_per_line;
#ifdef __cplusplus
}
#endif
+253 -435
View File
@@ -19,6 +19,7 @@
02111-1307, USA. */
#include "system.h"
#include "complain.h"
#include "getargs.h"
#include "files.h"
#include "gram.h"
@@ -28,17 +29,12 @@
#include "reader.h"
#include "LR0.h"
int any_conflicts = 0;
errs **err_table = NULL;
int expected_conflicts;
/* -1 stands for not specified. */
int expected_conflicts = -1;
static char *conflicts = NULL;
static unsigned *shiftset = NULL;
static unsigned *lookaheadset = NULL;
static int src_total;
static int rrc_total;
static int src_count;
static int rrc_count;
static inline void
@@ -60,21 +56,12 @@ Conflict in state %d between rule %d and token %s resolved as %s.\n"),
static void
flush_shift (int state, int token)
{
shifts *shiftp;
int k, i;
shifts *shiftp = state_table[state].shifts;
int i;
shiftp = shift_table[state];
if (shiftp)
{
k = shiftp->nshifts;
for (i = 0; i < k; i++)
{
if (shiftp->shifts[i]
&& token == accessing_symbol[shiftp->shifts[i]])
(shiftp->shifts[i]) = 0;
}
}
for (i = 0; i < shiftp->nshifts; i++)
if (!SHIFT_IS_DISABLED (shiftp, i) && SHIFT_SYMBOL (shiftp, i) == token)
SHIFT_DISABLE (shiftp, i);
}
@@ -89,95 +76,79 @@ static void
resolve_sr_conflict (int state, int lookaheadnum)
{
int i;
int mask;
unsigned *fp1;
unsigned *fp2;
int redprec;
errs *errp = (errs *) xcalloc (sizeof (errs) + ntokens * sizeof (short), 1);
/* find the rule to reduce by to get precedence of reduction */
int redprec = rule_table[LAruleno[lookaheadnum]].prec;
errs *errp = ERRS_ALLOC (ntokens + 1);
short *errtokens = errp->errs;
/* find the rule to reduce by to get precedence of reduction */
redprec = rprec[LAruleno[lookaheadnum]];
mask = 1;
fp1 = LA + lookaheadnum * tokensetsize;
fp2 = lookaheadset;
for (i = 0; i < ntokens; i++)
{
if ((mask & *fp2 & *fp1) && sprec[i])
/* Shift-reduce conflict occurs for token number i
and it has a precedence.
The precedence of shifting is that of token i. */
{
if (sprec[i] < redprec)
{
log_resolution (state, lookaheadnum, i, _("reduce"));
*fp2 &= ~mask; /* flush the shift for this token */
flush_shift (state, i);
}
else if (sprec[i] > redprec)
{
log_resolution (state, lookaheadnum, i, _("shift"));
*fp1 &= ~mask; /* flush the reduce for this token */
}
else
{
/* Matching precedence levels.
For left association, keep only the reduction.
For right association, keep only the shift.
For nonassociation, keep neither. */
if (BITISSET (LA (lookaheadnum), i)
&& BITISSET (lookaheadset, i)
&& sprec[i])
/* Shift-reduce conflict occurs for token number i
and it has a precedence.
The precedence of shifting is that of token i. */
{
if (sprec[i] < redprec)
{
log_resolution (state, lookaheadnum, i, _("reduce"));
/* flush the shift for this token */
RESETBIT (lookaheadset, i);
flush_shift (state, i);
}
else if (sprec[i] > redprec)
{
log_resolution (state, lookaheadnum, i, _("shift"));
/* flush the reduce for this token */
RESETBIT (LA (lookaheadnum), i);
}
else
{
/* Matching precedence levels.
For left association, keep only the reduction.
For right association, keep only the shift.
For nonassociation, keep neither. */
switch (sassoc[i])
{
case right_assoc:
log_resolution (state, lookaheadnum, i, _("shift"));
break;
switch (sassoc[i])
{
case right_assoc:
log_resolution (state, lookaheadnum, i, _("shift"));
break;
case left_assoc:
log_resolution (state, lookaheadnum, i, _("reduce"));
break;
case left_assoc:
log_resolution (state, lookaheadnum, i, _("reduce"));
break;
case non_assoc:
log_resolution (state, lookaheadnum, i, _("an error"));
break;
}
case non_assoc:
log_resolution (state, lookaheadnum, i, _("an error"));
break;
}
if (sassoc[i] != right_assoc)
{
*fp2 &= ~mask; /* flush the shift for this token */
flush_shift (state, i);
}
if (sassoc[i] != left_assoc)
{
*fp1 &= ~mask; /* flush the reduce for this token */
}
if (sassoc[i] == non_assoc)
{
/* Record an explicit error for this token. */
*errtokens++ = i;
}
}
}
if (sassoc[i] != right_assoc)
{
/* flush the shift for this token */
RESETBIT (lookaheadset, i);
flush_shift (state, i);
}
if (sassoc[i] != left_assoc)
{
/* flush the reduce for this token */
RESETBIT (LA (lookaheadnum), i);
}
if (sassoc[i] == non_assoc)
{
/* Record an explicit error for this token. */
*errtokens++ = i;
}
}
}
mask <<= 1;
if (mask == 0)
{
mask = 1;
fp2++;
fp1++;
}
}
errp->nerrs = errtokens - errp->errs;
if (errp->nerrs)
{
/* Some tokens have been explicitly made errors. Allocate
a permanent errs structure for this state, to record them. */
i = (char *) errtokens - (char *) errp;
err_table[state] = (errs *) xcalloc ((unsigned int) i, 1);
bcopy (errp, err_table[state], i);
}
else
err_table[state] = 0;
/* Some tokens have been explicitly made errors. Allocate a
permanent errs structure for this state, to record them. */
i = (char *) errtokens - (char *) errp;
state_table[state].errs = ERRS_ALLOC (i + 1);
memcpy (state_table[state].errs, errp, i);
free (errp);
}
@@ -185,80 +156,47 @@ resolve_sr_conflict (int state, int lookaheadnum)
static void
set_conflicts (int state)
{
int i;
int k;
int i, j;
shifts *shiftp;
unsigned *fp2;
unsigned *fp3;
unsigned *fp4;
unsigned *fp1;
int symbol;
if (consistent[state])
if (state_table[state].consistent)
return;
for (i = 0; i < tokensetsize; i++)
lookaheadset[i] = 0;
shiftp = shift_table[state];
if (shiftp)
{
k = shiftp->nshifts;
for (i = 0; i < k; i++)
{
symbol = accessing_symbol[shiftp->shifts[i]];
if (ISVAR (symbol))
break;
SETBIT (lookaheadset, symbol);
}
}
k = lookaheads[state + 1];
fp4 = lookaheadset + tokensetsize;
shiftp = state_table[state].shifts;
for (i = 0; i < shiftp->nshifts && SHIFT_IS_SHIFT (shiftp, i); i++)
if (!SHIFT_IS_DISABLED (shiftp, i))
SETBIT (lookaheadset, SHIFT_SYMBOL (shiftp, i));
/* Loop over all rules which require lookahead in this state. First
check for shift-reduce conflict, and try to resolve using
precedence */
for (i = lookaheads[state]; i < k; i++)
if (rprec[LAruleno[i]])
{
fp1 = LA + i * tokensetsize;
fp2 = fp1;
fp3 = lookaheadset;
while (fp3 < fp4)
for (i = state_table[state].lookaheads;
i < state_table[state + 1].lookaheads;
++i)
if (rule_table[LAruleno[i]].prec)
for (j = 0; j < tokensetsize; ++j)
if (LA (i)[j] & lookaheadset[j])
{
if (*fp2++ & *fp3++)
{
resolve_sr_conflict (state, i);
break;
}
resolve_sr_conflict (state, i);
break;
}
}
/* Loop over all rules which require lookahead in this state. Check
for conflicts not resolved above. */
for (i = lookaheads[state]; i < k; i++)
for (i = state_table[state].lookaheads;
i < state_table[state + 1].lookaheads;
++i)
{
fp1 = LA + i * tokensetsize;
fp2 = fp1;
fp3 = lookaheadset;
for (j = 0; j < tokensetsize; ++j)
if (LA (i)[j] & lookaheadset[j])
conflicts[state] = 1;
while (fp3 < fp4)
{
if (*fp2++ & *fp3++)
{
conflicts[state] = 1;
any_conflicts = 1;
}
}
fp2 = fp1;
fp3 = lookaheadset;
while (fp3 < fp4)
*fp3++ |= *fp2++;
for (j = 0; j < tokensetsize; ++j)
lookaheadset[j] |= LA (i)[j];
}
}
@@ -271,10 +209,6 @@ solve_conflicts (void)
shiftset = XCALLOC (unsigned, tokensetsize);
lookaheadset = XCALLOC (unsigned, tokensetsize);
err_table = XCALLOC (errs *, nstates);
any_conflicts = 0;
for (i = 0; i < nstates; i++)
set_conflicts (i);
}
@@ -284,23 +218,15 @@ solve_conflicts (void)
| Count the number of shift/reduce conflicts. |
`---------------------------------------------*/
static void
static int
count_sr_conflicts (int state)
{
int i;
int k;
int mask;
shifts *shiftp;
unsigned *fp1;
unsigned *fp2;
unsigned *fp3;
int symbol;
int i, k;
int src_count = 0;
shifts *shiftp = state_table[state].shifts;
src_count = 0;
shiftp = shift_table[state];
if (!shiftp)
return;
return 0;
for (i = 0; i < tokensetsize; i++)
{
@@ -308,49 +234,24 @@ count_sr_conflicts (int state)
lookaheadset[i] = 0;
}
k = shiftp->nshifts;
for (i = 0; i < k; i++)
{
if (!shiftp->shifts[i])
continue;
symbol = accessing_symbol[shiftp->shifts[i]];
if (ISVAR (symbol))
break;
SETBIT (shiftset, symbol);
}
for (i = 0; i < shiftp->nshifts && SHIFT_IS_SHIFT (shiftp, i); i++)
if (!SHIFT_IS_DISABLED (shiftp, i))
SETBIT (shiftset, SHIFT_SYMBOL (shiftp, i));
k = lookaheads[state + 1];
fp3 = lookaheadset + tokensetsize;
for (i = state_table[state].lookaheads;
i < state_table[state + 1].lookaheads;
++i)
for (k = 0; k < tokensetsize; ++k)
lookaheadset[k] |= LA (i)[k];
for (i = lookaheads[state]; i < k; i++)
{
fp1 = LA + i * tokensetsize;
fp2 = lookaheadset;
for (k = 0; k < tokensetsize; ++k)
lookaheadset[k] &= shiftset[k];
while (fp2 < fp3)
*fp2++ |= *fp1++;
}
fp1 = shiftset;
fp2 = lookaheadset;
while (fp2 < fp3)
*fp2++ &= *fp1++;
mask = 1;
fp2 = lookaheadset;
for (i = 0; i < ntokens; i++)
{
if (mask & *fp2)
src_count++;
if (BITISSET (lookaheadset, i))
src_count++;
mask <<= 1;
if (mask == 0)
{
mask = 1;
fp2++;
}
}
return src_count;
}
@@ -358,51 +259,31 @@ count_sr_conflicts (int state)
| Count the number of reduce/reduce conflicts. |
`----------------------------------------------*/
static void
static int
count_rr_conflicts (int state)
{
int i;
int j;
int count;
unsigned mask;
unsigned *baseword;
unsigned *wordp;
int m;
int n;
int rrc_count = 0;
rrc_count = 0;
m = lookaheads[state];
n = lookaheads[state + 1];
int m = state_table[state].lookaheads;
int n = state_table[state + 1].lookaheads;
if (n - m < 2)
return;
return 0;
mask = 1;
baseword = LA + m * tokensetsize;
for (i = 0; i < ntokens; i++)
{
wordp = baseword;
count = 0;
int count = 0;
int j;
for (j = m; j < n; j++)
{
if (mask & *wordp)
count++;
wordp += tokensetsize;
}
if (BITISSET (LA (j), i))
count++;
if (count >= 2)
rrc_count++;
mask <<= 1;
if (mask == 0)
{
mask = 1;
baseword++;
}
}
return rrc_count;
}
/*--------------------------------------------------------------.
@@ -416,31 +297,23 @@ conflict_report (int src_num, int rrc_num)
static char res[4096];
char *cp = res;
if (src_num == 1)
if (src_num >= 1)
{
sprintf (cp, _(" 1 shift/reduce conflict"));
cp += strlen (cp);
}
else if (src_num > 1)
{
sprintf (cp, _(" %d shift/reduce conflicts"), src_num);
sprintf (cp, ngettext ("%d shift/reduce conflict",
"%d shift/reduce conflicts", src_num), src_num);
cp += strlen (cp);
}
if (src_num > 0 && rrc_num > 0)
{
sprintf (cp, _(" and"));
sprintf (cp, " %s ", _("and"));
cp += strlen (cp);
}
if (rrc_num == 1)
if (rrc_num >= 1)
{
sprintf (cp, _(" 1 reduce/reduce conflict"));
cp += strlen (cp);
}
else if (rrc_num > 1)
{
sprintf (cp, _(" %d reduce/reduce conflicts"), rrc_num);
sprintf (cp, ngettext ("%d reduce/reduce conflict",
"%d reduce/reduce conflicts", rrc_num), rrc_num);
cp += strlen (cp);
}
@@ -452,36 +325,59 @@ conflict_report (int src_num, int rrc_num)
}
/*---------------------------------------------.
| Compute and give a report on the conflicts. |
`---------------------------------------------*/
/*-----------------------------------------------------------.
| Output the detailed description of states with conflicts. |
`-----------------------------------------------------------*/
void
print_conflicts (FILE *out)
conflicts_output (FILE *out)
{
bool printed_sth = FALSE;
int i;
for (i = 0; i < nstates; i++)
if (conflicts[i])
{
fprintf (out, _("State %d contains "), i);
fputs (conflict_report (count_sr_conflicts (i),
count_rr_conflicts (i)), out);
printed_sth = TRUE;
}
if (printed_sth)
fputs ("\n\n", out);
}
/*------------------------------------------.
| Reporting the total number of conflicts. |
`------------------------------------------*/
void
conflicts_print (void)
{
int i;
src_total = 0;
rrc_total = 0;
/* Is the number of SR conflicts OK? Either EXPECTED_CONFLICTS is
not set, and then we want 0 SR, or else it is specified, in which
case we want equality. */
int src_ok = 0;
/* Count the total number of conflicts, and if wanted, give a
detailed report in FOUTPUT. */
int src_total = 0;
int rrc_total = 0;
/* Conflicts by state. */
for (i = 0; i < nstates; i++)
{
if (conflicts[i])
{
count_sr_conflicts (i);
count_rr_conflicts (i);
src_total += src_count;
rrc_total += rrc_count;
if (conflicts[i])
{
src_total += count_sr_conflicts (i);
rrc_total += count_rr_conflicts (i);
}
if (verbose_flag)
{
fprintf (out, _("State %d contains"), i);
fputs (conflict_report (src_count, rrc_count), out);
}
}
}
src_ok = src_total == (expected_conflicts == -1 ? 0 : expected_conflicts);
/* If there are no RR conflicts, and as many SR conflicts as
expected, then there is nothing to report. */
if (!rrc_total && src_ok)
return;
/* Report the total number of conflicts on STDERR. */
if (yacc_flag)
@@ -499,31 +395,34 @@ print_conflicts (FILE *out)
}
else
{
fprintf (stderr, _("%s contains"), infile);
fprintf (stderr, _("%s contains "), infile);
fputs (conflict_report (src_total, rrc_total), stderr);
}
if (expected_conflicts != -1 && !src_ok)
{
/* FIXME: BIG ATTROCIOUS HACK. For flames, complaints and so
on, see Bruno Haible. GNU Gettext's plural.y's %expect is
wrong, and newer Bison reject it. But then, Bruno will be
overwhelmed by bug reports, until a fixed Gettext is
released. So for the 1.3x generation only, we leave a puke
puke hack. */
if (!strsuffix (infile, "plural.y"))
complain_message_count++;
fprintf (stderr, ngettext ("expected %d shift/reduce conflict\n",
"expected %d shift/reduce conflicts\n",
expected_conflicts),
expected_conflicts);
}
}
void
print_reductions (int state)
print_reductions (FILE *out, int state)
{
int i;
int j;
int k;
unsigned *fp1;
unsigned *fp2;
unsigned *fp3;
unsigned *fp4;
int rule;
int symbol;
unsigned mask;
int m;
int n;
int default_LA;
int default_rule = 0;
int cmax;
int count;
shifts *shiftp;
errs *errp;
int nodefault = 0;
@@ -531,106 +430,61 @@ print_reductions (int state)
for (i = 0; i < tokensetsize; i++)
shiftset[i] = 0;
shiftp = shift_table[state];
if (shiftp)
{
k = shiftp->nshifts;
for (i = 0; i < k; i++)
{
if (!shiftp->shifts[i])
continue;
symbol = accessing_symbol[shiftp->shifts[i]];
if (ISVAR (symbol))
break;
/* if this state has a shift for the error token,
don't use a default rule. */
if (symbol == error_token_number)
nodefault = 1;
SETBIT (shiftset, symbol);
}
}
shiftp = state_table[state].shifts;
for (i = 0; i < shiftp->nshifts && SHIFT_IS_SHIFT (shiftp, i); i++)
if (!SHIFT_IS_DISABLED (shiftp, i))
{
/* if this state has a shift for the error token, don't use a
default rule. */
if (SHIFT_IS_ERROR (shiftp, i))
nodefault = 1;
SETBIT (shiftset, SHIFT_SYMBOL (shiftp, i));
}
errp = err_table[state];
errp = state_table[state].errs;
if (errp)
{
k = errp->nerrs;
for (i = 0; i < k; i++)
{
if (!errp->errs[i])
continue;
symbol = errp->errs[i];
SETBIT (shiftset, symbol);
}
}
for (i = 0; i < errp->nerrs; i++)
if (errp->errs[i])
SETBIT (shiftset, errp->errs[i]);
m = lookaheads[state];
n = lookaheads[state + 1];
m = state_table[state].lookaheads;
n = state_table[state + 1].lookaheads;
if (n - m == 1 && !nodefault)
{
default_rule = LAruleno[m];
int k;
int default_rule = LAruleno[m];
fp1 = LA + m * tokensetsize;
fp2 = shiftset;
fp3 = lookaheadset;
fp4 = lookaheadset + tokensetsize;
while (fp3 < fp4)
*fp3++ = *fp1++ & *fp2++;
mask = 1;
fp3 = lookaheadset;
for (k = 0; k < tokensetsize; ++k)
lookaheadset[k] = LA (m)[k] & shiftset[k];
for (i = 0; i < ntokens; i++)
{
if (mask & *fp3)
obstack_fgrow3 (&output_obstack,
_(" %-4s\t[reduce using rule %d (%s)]\n"),
tags[i], default_rule, tags[rlhs[default_rule]]);
if (BITISSET (lookaheadset, i))
fprintf (out, _(" %-4s\t[reduce using rule %d (%s)]\n"),
tags[i], default_rule,
tags[rule_table[default_rule].lhs]);
mask <<= 1;
if (mask == 0)
{
mask = 1;
fp3++;
}
}
obstack_fgrow2 (&output_obstack,
_(" $default\treduce using rule %d (%s)\n\n"),
default_rule, tags[rlhs[default_rule]]);
fprintf (out, _(" $default\treduce using rule %d (%s)\n\n"),
default_rule, tags[rule_table[default_rule].lhs]);
}
else if (n - m >= 1)
{
cmax = 0;
default_LA = -1;
fp4 = lookaheadset + tokensetsize;
int cmax = 0;
int default_LA = -1;
int default_rule = 0;
if (!nodefault)
for (i = m; i < n; i++)
{
fp1 = LA + i * tokensetsize;
fp2 = shiftset;
fp3 = lookaheadset;
int count = 0;
int j, k;
while (fp3 < fp4)
*fp3++ = *fp1++ & (~(*fp2++));
for (k = 0; k < tokensetsize; ++k)
lookaheadset[k] = LA (i)[k] & ~shiftset[k];
count = 0;
mask = 1;
fp3 = lookaheadset;
for (j = 0; j < ntokens; j++)
{
if (mask & *fp3)
count++;
mask <<= 1;
if (mask == 0)
{
mask = 1;
fp3++;
}
}
if (BITISSET (lookaheadset, j))
count++;
if (count > cmax)
{
@@ -639,56 +493,35 @@ print_reductions (int state)
default_rule = LAruleno[i];
}
fp2 = shiftset;
fp3 = lookaheadset;
while (fp3 < fp4)
*fp2++ |= *fp3++;
for (k = 0; k < tokensetsize; ++k)
shiftset[k] |= lookaheadset[k];
}
for (i = 0; i < tokensetsize; i++)
shiftset[i] = 0;
if (shiftp)
{
k = shiftp->nshifts;
for (i = 0; i < k; i++)
{
if (!shiftp->shifts[i])
continue;
symbol = accessing_symbol[shiftp->shifts[i]];
if (ISVAR (symbol))
break;
SETBIT (shiftset, symbol);
}
}
for (i = 0; i < shiftp->nshifts && SHIFT_IS_SHIFT (shiftp, i); i++)
if (!SHIFT_IS_DISABLED (shiftp, i))
SETBIT (shiftset, SHIFT_SYMBOL (shiftp, i));
mask = 1;
fp1 = LA + m * tokensetsize;
fp2 = shiftset;
for (i = 0; i < ntokens; i++)
{
int j;
int defaulted = 0;
int count = BITISSET (shiftset, i);
if (mask & *fp2)
count = 1;
else
count = 0;
fp3 = fp1;
for (j = m; j < n; j++)
{
if (mask & *fp3)
if (BITISSET (LA (j), i))
{
if (count == 0)
{
if (j != default_LA)
{
rule = LAruleno[j];
obstack_fgrow3 (&output_obstack,
_(" %-4s\treduce using rule %d (%s)\n"),
tags[i], rule, tags[rlhs[rule]]);
}
fprintf (out,
_(" %-4s\treduce using rule %d (%s)\n"),
tags[i],
LAruleno[j],
tags[rule_table[LAruleno[j]].lhs]);
else
defaulted = 1;
@@ -697,40 +530,25 @@ print_reductions (int state)
else
{
if (defaulted)
{
rule = LAruleno[default_LA];
obstack_fgrow3 (&output_obstack,
_(" %-4s\treduce using rule %d (%s)\n"),
tags[i], rule, tags[rlhs[rule]]);
defaulted = 0;
}
rule = LAruleno[j];
obstack_fgrow3 (&output_obstack,
fprintf (out,
_(" %-4s\treduce using rule %d (%s)\n"),
tags[i],
LAruleno[default_LA],
tags[rule_table[LAruleno[default_LA]].lhs]);
defaulted = 0;
fprintf (out,
_(" %-4s\t[reduce using rule %d (%s)]\n"),
tags[i], rule, tags[rlhs[rule]]);
tags[i],
LAruleno[j],
tags[rule_table[LAruleno[j]].lhs]);
}
}
fp3 += tokensetsize;
}
mask <<= 1;
if (mask == 0)
{
mask = 1;
/* We tried incrementing just fp1, and just fp2; both seem wrong.
It seems necessary to increment both in sync. */
fp1++;
fp2++;
}
}
if (default_LA >= 0)
obstack_fgrow2 (&output_obstack,
_(" $default\treduce using rule %d (%s)\n"),
default_rule, tags[rlhs[default_rule]]);
obstack_1grow (&output_obstack, '\n');
fprintf (out, _(" $default\treduce using rule %d (%s)\n"),
default_rule, tags[rule_table[default_rule].lhs]);
}
}
+4 -5
View File
@@ -1,5 +1,5 @@
/* Find and resolve or report look-ahead conflicts for bison,
Copyright 2000 Free Software Foundation, Inc.
Copyright 2000, 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -23,12 +23,11 @@
# include "state.h"
void solve_conflicts PARAMS ((void));
void print_conflicts PARAMS ((FILE *out));
void print_reductions PARAMS ((int));
void conflicts_print PARAMS ((void));
void conflicts_output PARAMS ((FILE *out));
void print_reductions PARAMS ((FILE*out, int state));
void free_conflicts PARAMS ((void));
/* Were there conflicts? */
extern int any_conflicts;
extern errs **err_table;
extern int expected_conflicts;
#endif /* !CONFLICTS_H_ */
+23 -32
View File
@@ -1,5 +1,5 @@
/* Match rules with nonterminals for bison,
Copyright 1984, 1989, 2000 Free Software Foundation, Inc.
Copyright 1984, 1989, 2000, 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -19,50 +19,44 @@
Boston, MA 02111-1307, USA. */
/* set_derives finds, for each variable (nonterminal), which rules can
derive it. It sets up the value of derives so that derives[i -
ntokens] points to a vector of rule numbers, terminated with -1.
*/
#include "system.h"
#include "getargs.h"
#include "types.h"
#include "reader.h"
#include "gram.h"
#include "derives.h"
short **derives;
#if DEBUG
short **derives = NULL;
static void
print_derives (void)
{
int i;
short *sp;
fputs ("\n\n\n", stdout);
printf (_("DERIVES"));
fputs ("\n\n", stdout);
fputs ("DERIVES\n", stderr);
for (i = ntokens; i < nsyms; i++)
{
printf (_("%s derives"), tags[i]);
short *sp;
fprintf (stderr, "\t%s derives\n", tags[i]);
for (sp = derives[i]; *sp > 0; sp++)
{
printf (" %d", *sp);
short *rhsp;
fprintf (stderr, "\t\t%d:", *sp);
for (rhsp = ritem + rule_table[*sp].rhs; *rhsp > 0; ++rhsp)
fprintf (stderr, " %s", tags[*rhsp]);
fprintf (stderr, " (rule %d)\n", -*rhsp);
}
putchar ('\n');
}
putchar ('\n');
fputs ("\n\n", stderr);
}
#endif
void
set_derives (void)
{
int i;
int lhs;
shorts *p;
short *q;
shorts **dset;
@@ -73,16 +67,14 @@ set_derives (void)
p = delts;
for (i = nrules; i > 0; i--)
{
lhs = rlhs[i];
if (lhs >= 0)
{
p->next = dset[lhs];
p->value = i;
dset[lhs] = p;
p++;
}
}
if (rule_table[i].useful)
{
int lhs = rule_table[i].lhs;
p->next = dset[lhs];
p->value = i;
dset[lhs] = p;
p++;
}
derives = XCALLOC (short *, nvars) - ntokens;
q = XCALLOC (short, nvars + nrules);
@@ -99,9 +91,8 @@ set_derives (void)
*q++ = -1;
}
#if DEBUG
print_derives ();
#endif
if (trace_flag)
print_derives ();
XFREE (dset + ntokens);
XFREE (delts);
+4 -5
View File
@@ -1,5 +1,5 @@
/* Match rules with nonterminals for bison,
Copyright 1984, 1989, 2000 Free Software Foundation, Inc.
Copyright 1984, 1989, 2000, 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -21,12 +21,11 @@
#ifndef DERIVES_H_
# define DERIVES_H_
/* DERIVES[SYMBOL - NTOKENS] points to a vector of the number of the
rules that SYMBOL derives, terminated with -1. */
extern short **derives;
/* set_derives finds, for each variable (nonterminal), which rules can
derive it. It sets up the value of derives so that derives[i -
ntokens] points to a vector of rule numbers, terminated with -1.
*/
/* Compute DERIVES. */
void set_derives PARAMS((void));
void free_derives PARAMS((void));
+150 -125
View File
@@ -1,5 +1,6 @@
/* Open and close files for bison,
Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.
Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -21,10 +22,17 @@
#include "system.h"
#include "getargs.h"
#include "quote.h"
#include "files.h"
#include "gram.h"
#include "error.h"
#include "complain.h"
/* From basename.c. Almost a lie, as it returns a char *. */
const char *base_name PARAMS ((char const *name));
/* From xstrndup.c. */
char *xstrndup PARAMS ((const char *s, size_t n));
FILE *finput = NULL;
struct obstack action_obstack;
@@ -44,7 +52,7 @@ char *spec_defines_file = NULL; /* for --defines. */
char *infile = NULL;
char *attrsfile = NULL;
static char *base_name = NULL;
static char *full_base_name = NULL;
static char *short_base_name = NULL;
/* C source file extension (the parser source). */
@@ -57,7 +65,7 @@ const char *header_extension = NULL;
| Is SUFFIX ending STRING? |
`--------------------------*/
static int
int
strsuffix (const char *string, const char *suffix)
{
size_t string_len = strlen (string);
@@ -86,26 +94,36 @@ stringappend (const char *string1, const char *string2)
}
/*---------------------------------------------------------------.
| Computes the macro name used to avoid double inclusion in the |
| header of the parser and store it in header_macro_name. |
`---------------------------------------------------------------*/
/*-----------------------------------------------------------------.
| Computes the macro name used to avoid double inclusion in the |
| header of the parser and store it in header_macro_name. Be sure |
| to produce valid CPP names (don't start with digit, remain |
| alphanumerical + underscore). |
`-----------------------------------------------------------------*/
static char *
compute_header_macro (void)
{
const char *prefix = "BISON_";
char *macro_name, *cp;
if (spec_defines_file)
macro_name = xstrdup (spec_defines_file);
{
macro_name = XMALLOC (char,
strlen (prefix) +
strlen (spec_defines_file) + 1);
cp = stpcpy (macro_name, prefix);
cp = stpcpy (cp, spec_defines_file);
}
else
{
macro_name = XMALLOC (char,
strlen (base_name) +
strlen (prefix) +
strlen (full_base_name) +
strlen (header_extension) + 1);
stpcpy (macro_name, base_name);
strcat (macro_name, header_extension);
cp = stpcpy (macro_name, prefix);
cp = stpcpy (cp, full_base_name);
cp = stpcpy (cp, header_extension);
}
for (cp = macro_name; *cp; ++cp)
@@ -197,20 +215,20 @@ skeleton_find (const char *envvar, const char *skeleton_name)
{
const char *res = getenv (envvar);
#if defined (MSDOS) || defined (_WIN32)
#if (defined (MSDOS) && !defined(__DJGPP__)) || defined (_WIN32)
const char *cp = getenv ("INIT");
if (!res)
{
/* Skeleton file name without path */
const char *skel_name = strrchr(skeleton_name, '/');
const char *skel_name = strrchr (skeleton_name, '/');
if (!skel_name)
skel_name = strrchr(skeleton_name, '\\');
skel_name = strrchr (skeleton_name, '\\');
if (!skel_name)
skel_name = skeleton_name;
else
++skel_name;
/* File doesn't exist in current directory; try in INIT directory. */
const char *cp = getenv ("INIT");
if (cp)
{
res = XMALLOC (char, strlen (cp) + strlen (skel_name) + 2);
@@ -232,7 +250,7 @@ skeleton_find (const char *envvar, const char *skeleton_name)
strcpy (res + (cp - program_name), skel_name);
}
}
#endif /* defined (MSDOS) || defined (_WIN32) */
#endif /* (defined (MSDOS) && !defined (__DJGPP__)) || defined (_WIN32) */
if (!res)
res = skeleton_name;
@@ -263,27 +281,6 @@ tr (const char *in, char from, char to)
return (temp);
}
/* Gets the extension index in FILENAME. Returns 0 if fails to
find an extension. */
static int
get_extension_index (const char *filename)
{
int len;
len = strlen (filename);
if (filename[len-- - 1] == '.')
return (0);
while ((len > 0) && (filename[len - 1] != '.'))
if (filename[len - 1] == '/')
return (0);
else
len--;
return (len - 1);
}
/* Computes extensions from the grammar file extension. */
static void
compute_exts_from_gf (const char *ext)
@@ -306,14 +303,61 @@ compute_exts_from_src (const char *ext)
header_extension = tr (header_extension, 'C', 'H');
}
/* Decompose FILENAME in four parts: *BASE, *TAB, and *EXT, the fourth
part, (the directory) is ranging from FILENAME to the char before
*BASE, so we don't need an additional parameter.
*EXT points to the last period in the basename, or NULL if none.
If there is no *EXT, *TAB is NULL. Otherwise, *TAB points to
`.tab' or `_tab' if present right before *EXT, or is NULL. *TAB
cannot be equal to *BASE.
None are allocated, they are simply pointers to parts of FILENAME.
Examples:
'/tmp/foo.tab.c' -> *BASE = 'foo.tab.c', *TAB = '.tab.c', *EXT =
'.c'
'foo.c' -> *BASE = 'foo.c', *TAB = NULL, *EXT = '.c'
'tab.c' -> *BASE = 'tab.c', *TAB = NULL, *EXT = '.c'
'.tab.c' -> *BASE = '.tab.c', *TAB = NULL, *EXT = '.c'
'foo.tab' -> *BASE = 'foo.tab', *TAB = NULL, *EXT = '.tab'
'foo_tab' -> *BASE = 'foo_tab', *TAB = NULL, *EXT = NULL
'foo' -> *BASE = 'foo', *TAB = NULL, *EXT = NULL. */
static void
filename_split (const char *filename,
const char **base, const char **tab, const char **ext)
{
*base = base_name (filename);
/* Look for the extension, i.e., look for the last dot. */
*ext = strrchr (*base, '.');
*tab = NULL;
/* If there is an exentension, check if there is a `.tab' part right
before. */
if (*ext
&& (*ext - *base) > (int) strlen (".tab")
&& (!strncmp (*ext - strlen (".tab"), ".tab", strlen (".tab"))
|| !strncmp (*ext - strlen ("_tab"), "_tab", strlen ("_tab"))))
*tab = *ext - strlen (".tab");
}
/* FIXME: Should use xstrndup. */
static void
compute_base_names (void)
{
size_t base_length;
size_t short_base_length;
size_t ext_index;
const char *base, *tab, *ext;
/* If --output=foo.c was specified (SPEC_OUTFILE == foo.c),
BASE_NAME and SHORT_BASE_NAME are `foo'.
@@ -325,94 +369,64 @@ compute_base_names (void)
files, remove the ".c" or ".tab.c" suffix. */
if (spec_outfile)
{
#ifdef MSDOS
strlwr (spec_outfile);
#endif /* MSDOS */
/* BASE_LENGTH includes ".tab" but not ".c". */
base_length = strlen (spec_outfile);
filename_split (spec_outfile, &base, &tab, &ext);
ext_index = get_extension_index (spec_outfile);
/* If the initial segment of extension contains 'c' or a 'C', I assume
that it is a C or C++ source file. */
if (ext_index)
ext_index =
(strspn (spec_outfile + ext_index + 1, "cC")) ? ext_index : 0;
if (ext_index)
{
base_length -= strlen (spec_outfile + ext_index);
compute_exts_from_src (spec_outfile + ext_index);
}
/* The full base name goes up the EXT, excluding it. */
full_base_name =
xstrndup (spec_outfile,
(strlen (spec_outfile) - (ext ? strlen (ext) : 0)));
/* The short base name goes up to TAB, excluding it. */
short_base_name =
xstrndup (spec_outfile,
(strlen (spec_outfile)
- (tab ? strlen (tab) : (ext ? strlen (ext) : 0))));
base_name = strndup (spec_outfile, base_length);
/* SHORT_BASE_LENGTH includes neither ".tab" nor ".c". */
short_base_length = base_length;
if (strsuffix (base_name, ".tab") || strsuffix (base_name, "_tab"))
short_base_length -= 4;
short_base_name = strndup (spec_outfile, short_base_length);
return;
if (ext)
compute_exts_from_src (ext);
}
/* If --file-prefix=foo was specified, BASE_NAME and SHORT_BASE_NAME
are `foo'.
/* If --file-prefix=foo was specified, FULL_BASE_NAME = `foo.tab'
and SHORT_BASE_NAME = `foo'.
Construct names from it. */
if (spec_file_prefix)
else
{
#ifdef MSDOS
strlwr (spec_file_prefix);
#endif /* MSDOS */
short_base_name = xstrdup (spec_file_prefix);
base_name = XMALLOC (char,
strlen (short_base_name) + strlen (EXT_TAB) + 1);
stpcpy (stpcpy (base_name, short_base_name), EXT_TAB);
if (spec_file_prefix)
{
/* If --file-prefix=foo was specified, SHORT_BASE_NAME =
`foo'. */
short_base_name = xstrdup (spec_file_prefix);
}
else if (yacc_flag)
{
/* If --yacc, then the output is `y.tab.c'. */
short_base_name = xstrdup ("y");
}
else
{
/* Otherwise, the short base name is computed from the input
grammar: `foo.yy' => `foo'. */
filename_split (infile, &base, &tab, &ext);
short_base_name =
xstrndup (infile,
(strlen (infile) - (ext ? strlen (ext) : 0)));
}
/* Computes the extensions from the garmmar file name. */
ext_index = get_extension_index (infile);
/* If the initial segment of extension contains a 'y' or a 'Y', I assume
that it is a yacc or bison grammar file. */
if (ext_index)
ext_index = (strspn (infile + ext_index + 1, "yY")) ? ext_index : 0;
if (ext_index)
compute_exts_from_gf (infile + ext_index);
/* In these cases, always append `.tab'. */
full_base_name = XMALLOC (char,
strlen (short_base_name)
+ strlen (EXT_TAB) + 1);
stpcpy (stpcpy (full_base_name, short_base_name), EXT_TAB);
return;
/* Computes the extensions from the grammar file name. */
filename_split (infile, &base, &tab, &ext);
if (ext && !yacc_flag)
compute_exts_from_gf (ext);
}
/* If neither -o nor --file-prefix were specified, and the input
file is foo.y, BASE_NAME is `foo.tab', and SHORT_BASE_NAME is
`foo'.
If --yacc is used, do as if the input file was `y.y'. */
{
const char *name_base = yacc_flag ? "y.y" : infile;
/* BASE_LENGTH gets length of BASE_NAME, sans ".y" suffix if any. */
base_length = strlen (name_base);
ext_index = get_extension_index (name_base);
/* If the initial segment of extension contains a 'y' or a 'Y', I assume
that it is a yacc or bison grammar file. */
if (ext_index)
ext_index = (strspn (name_base + ext_index + 1, "yY")) ? ext_index : 0;
if (ext_index)
{
base_length -= strlen (name_base + ext_index);
compute_exts_from_gf (name_base + ext_index);
}
short_base_length = base_length;
short_base_name = strndup (name_base, short_base_length);
base_name = XMALLOC (char,
strlen (short_base_name) + strlen (EXT_TAB) + 1);
stpcpy (stpcpy (base_name, short_base_name), EXT_TAB);
return;
}
}
/*-------------------------------------------------------.
| Close the open files, compute the output files names. |
`-------------------------------------------------------*/
@@ -430,7 +444,21 @@ compute_output_file_names (void)
/* It the defines filename if not given, we create it. */
if (!spec_defines_file)
spec_defines_file = stringappend (base_name, header_extension);
spec_defines_file = stringappend (full_base_name, header_extension);
if (defines_flag)
{
/* This is really Q&D, but I don't want to spend time on issues
which will be different with 1.50. */
const char *parser_filename = NULL;
if (spec_outfile)
parser_filename = spec_outfile;
else
parser_filename = stringappend (full_base_name, src_extension);
if (!strcmp (spec_defines_file, parser_filename))
fatal ("header and parser would be both named %s",
quote (parser_filename));
}
/* It the graph filename if not given, we create it. */
if (!spec_graph_file)
@@ -439,9 +467,7 @@ compute_output_file_names (void)
spec_verbose_file = stringappend (short_base_name, EXT_OUTPUT);
attrsfile = stringappend (short_base_name, EXT_STYPE_H);
#ifndef MSDOS
attrsfile = stringappend (attrsfile, header_extension);
#endif /* MSDOS */
attrsfile = stringappend (attrsfile, EXT_TYPE (header_extension));
}
@@ -487,7 +513,8 @@ output_files (void)
if (spec_outfile)
obstack_save (&table_obstack, spec_outfile);
else
obstack_save (&table_obstack, stringappend (base_name, src_extension));
obstack_save (&table_obstack,
stringappend (full_base_name, src_extension));
obstack_free (&table_obstack, NULL);
/* Output the header file if wanted. */
@@ -509,9 +536,7 @@ output_files (void)
obstack_save (&attrs_obstack, attrsfile);
obstack_free (&attrs_obstack, NULL);
temp_name = stringappend (short_base_name, EXT_GUARD_C);
#ifndef MSDOS
temp_name = stringappend (temp_name, src_extension);
#endif /* MSDOS */
temp_name = stringappend (temp_name, EXT_TYPE (src_extension));
obstack_save (&guard_obstack, temp_name);
obstack_free (&guard_obstack, NULL);
}
+7 -3
View File
@@ -1,7 +1,5 @@
#ifndef FILES_H_
# define FILES_H_
/* File names and variables for bison,
Copyright 1984, 1989, 2000 Free Software Foundation, Inc.
Copyright 1984, 1989, 2000, 2002 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -20,6 +18,9 @@
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef FILES_H_
# define FILES_H_
/* These two should be pathnames for opening the sample parser files.
When bison is installed, they should be absolute pathnames.
XPFILE1 and XPFILE2 normally come from config.h. */
@@ -79,4 +80,7 @@ int xfclose PARAMS ((FILE *ptr));
const char *skeleton_find PARAMS ((const char *envvar,
const char *skeleton_name));
int strsuffix PARAMS ((const char *string, const char *suffix));
#endif /* !FILES_H_ */
+27 -11
View File
@@ -32,9 +32,9 @@ int no_lines_flag = 0;
int no_parser_flag = 0;
int token_table_flag = 0;
int verbose_flag = 0;
int statistics_flag = 0;
int yacc_flag = 0; /* for -y */
int graph_flag = 0;
int trace_flag = 0;
const char *skeleton = NULL;
@@ -63,11 +63,12 @@ static struct option longopts[] =
{"defines", optional_argument, 0, 'd'},
{"verbose", no_argument, 0, 'v'},
{"file-prefix", required_argument, 0, 'b'},
{"output", required_argument, 0, 'o'},
{"output-file", required_argument, 0, 'o'},
{"graph", optional_argument, 0, 'g'},
/* Hidden. */
{"statistics", no_argument, &statistics_flag, 1},
{"trace", no_argument, &trace_flag, 1},
{0, 0, 0, 0}
};
@@ -118,9 +119,9 @@ Output:\n\
-d, --defines also produce a header file\n\
-v, --verbose also produce an explanation of the automaton\n\
-b, --file-prefix=PREFIX specify a PREFIX for output files\n\
-o, --output-file=FILE leave output to FILE\n\
-g, --graph also produce a VCG graph description of the \
automaton\n"), stream);
-o, --output=FILE leave output to FILE\n\
-g, --graph also produce a VCG description of the automaton\n\
"), stream);
putc ('\n', stream);
fputs (_("\
@@ -143,7 +144,8 @@ bison (GNU Bison) %s"), VERSION);
putc ('\n', stream);
fputs (_("\
Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"),
Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n\
Free Software Foundation, Inc.\n"),
stream);
fputs (_("\
@@ -158,6 +160,20 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
| Process the options. |
`----------------------*/
/* Under plain DOS, there is no difference on the case. This can be
troublesome when looking for `.tab' etc. */
#ifdef MSDOS
# if defined (__DJGPP__)
/* Windows 9X and successors are case sensitive. */
# define STRLWR(String) ((String) ? (strlwr (String), (String)) : (String))
# define AS_FILE_NAME(File) ((pathconf ((File), _PC_NAME_MAX) > 12) ? (File) : STRLWR (File))
# else
# define AS_FILE_NAME(File) (strlwr (File), (File))
# endif
#else
# define AS_FILE_NAME(File) (File)
#endif
void
getargs (int argc, char *argv[])
{
@@ -185,7 +201,7 @@ getargs (int argc, char *argv[])
case 'g':
/* Here, the -g and --graph=FILE options are differentiated. */
graph_flag = 1;
spec_graph_file = optarg;
spec_graph_file = AS_FILE_NAME (optarg);
break;
case 'v':
@@ -193,13 +209,13 @@ getargs (int argc, char *argv[])
break;
case 'S':
skeleton = optarg;
skeleton = AS_FILE_NAME (optarg);
break;
case 'd':
/* Here, the -d and --defines options are differentiated. */
defines_flag = 1;
spec_defines_file = optarg;
spec_defines_file = AS_FILE_NAME (optarg);
break;
case 'l':
@@ -223,11 +239,11 @@ getargs (int argc, char *argv[])
break;
case 'o':
spec_outfile = optarg;
spec_outfile = AS_FILE_NAME (optarg);
break;
case 'b':
spec_file_prefix = optarg;
spec_file_prefix = AS_FILE_NAME (optarg);
break;
case 'p':
+1 -1
View File
@@ -31,11 +31,11 @@ extern int defines_flag; /* for -d */
extern int locations_flag;
extern int no_lines_flag; /* for -l */
extern int no_parser_flag; /* for -n */
extern int statistics_flag;
extern int token_table_flag; /* for -k */
extern int verbose_flag; /* for -v */
extern int graph_flag; /* for -g */
extern int yacc_flag; /* for -y */
extern int trace_flag;
void getargs PARAMS ((int argc, char *argv[]));
+59 -22
View File
@@ -1,27 +1,27 @@
/* Allocate input grammar variables for bison,
Copyright 1984, 1986, 1989 Free Software Foundation, Inc.
Copyright 1984, 1986, 1989, 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
This file is part of Bison, the GNU Compiler Compiler.
Bison is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
Bison is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
Bison is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Bison is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Bison; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU General Public License
along with Bison; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "system.h"
void dummy PARAMS((void));
#include "gram.h"
#include "reader.h"
/* comments for these variables are in gram.h */
@@ -32,15 +32,13 @@ int ntokens;
int nvars;
short *ritem = NULL;
short *rlhs = NULL;
short *rrhs = NULL;
rule_t *rule_table = NULL;
short *rprec = NULL;
short *rprecsym = NULL;
short *sprec = NULL;
short *rassoc = NULL;
short *sassoc = NULL;
short *token_translations = NULL;
short *rline = NULL;
int start_symbol;
@@ -52,10 +50,49 @@ int pure_parser;
int error_token_number;
/* This is to avoid linker problems which occur on VMS when using GCC,
when the file in question contains data definitions only. */
/*------------------------.
| Dump RITEM for traces. |
`------------------------*/
void
dummy (void)
ritem_print (FILE *out)
{
int i;
fputs ("RITEM\n", out);
for (i = 0; ritem[i]; ++i)
if (ritem[i] > 0)
fprintf (out, " %s", tags[ritem[i]]);
else
fprintf (out, " (rule %d)\n", -ritem[i]);
fputs ("\n\n", out);
}
/*------------------------------------------.
| Return the size of the longest rule RHS. |
`------------------------------------------*/
size_t
ritem_longest_rhs (void)
{
short *itemp;
int length;
int max;
length = 0;
max = 0;
for (itemp = ritem; *itemp; itemp++)
if (*itemp > 0)
{
length++;
}
else
{
if (length > max)
max = length;
length = 0;
}
return max;
}
+48 -19
View File
@@ -1,5 +1,5 @@
/* Data definitions for internal representation of bison's input,
Copyright 1984, 1986, 1989, 1992 Free Software Foundation, Inc.
Copyright 1984, 1986, 1989, 1992, 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -38,21 +38,38 @@
The rules receive rule numbers 1 to nrules in the order they are
written. Actions and guards are accessed via the rule number.
The rules themselves are described by three arrays: rrhs, rlhs and
ritem. rlhs[R] is the symbol number of the left hand side of rule
R. The right hand side is stored as symbol numbers in a portion of
ritem. rrhs[R] contains the index in ritem of the beginning of the
The rules themselves are described by several arrays: amongst which
RITEM, and RULE_TABLE.
RULE_TABLE is an array of struct rule_s, which members are:
RULE_TABLE[R].lhs -- the symbol number of the left hand side of
rule R. If -1, the rule has been thrown out by reduce.c and should
be ignored.
RULE_TABLE[R].rhs -- the index in RITEM of the beginning of the
portion for rule R.
If rlhs[R] is -1, the rule has been thrown out by reduce.c and
should be ignored.
RULE_TABLE[R].prec -- the precedence level of R.
RULE_TABLE[R].precsym -- the symbol-number of the symbol in %prec
for R (if any).
RULE_TABLE[R].assoc -- the associativity of R.
RULE_TABLE[R].line -- the line where R was defined.
RULE_TABLE[R].useful -- TRUE iff the rule is used.
The right hand side is stored as symbol numbers in a portion of
RITEM.
The length of the portion is one greater than the number of symbols
in the rule's right hand side. The last element in the portion
contains minus R, which identifies it as the end of a portion and
says which rule it is for.
The portions of ritem come in order of increasing rule number and
The portions of RITEM come in order of increasing rule number and
are followed by an element which is zero to mark the end. nitems
is the total length of ritem, not counting the final zero. Each
element of ritem is called an "item" and its index in ritem is an
@@ -61,10 +78,7 @@
Item numbers are used in the finite state machine to represent
places that parsing can get to.
Precedence levels are recorded in the vectors sprec and rprec.
sprec records the precedence level of each symbol, rprec the
precedence level of each rule. rprecsym is the symbol-number of
the symbol in %prec for this rule (if any).
SPREC records the precedence level of each symbol.
Precedence levels are assigned in increasing order starting with 1
so that numerically higher precedence values mean tighter binding
@@ -84,18 +98,12 @@ extern int ntokens;
extern int nvars;
extern short *ritem;
extern short *rlhs;
extern short *rrhs;
extern short *rprec;
extern short *rprecsym;
extern short *sprec;
extern short *rassoc;
extern short *sassoc;
extern short *rline; /* Source line number of each rule */
extern int start_symbol;
/* associativity values in elements of rassoc, sassoc. */
typedef enum
{
@@ -105,6 +113,19 @@ typedef enum
} associativity;
typedef struct rule_s
{
short lhs;
short rhs;
short prec;
short precsym;
short assoc;
short line;
bool useful;
} rule_t;
extern struct rule_s *rule_table;
/* token translation table: indexed by a token number as returned by
the user's yylex routine, it yields the internal token number used
by the parser and throughout bison. */
@@ -126,4 +147,12 @@ extern int pure_parser;
/* ERROR_TOKEN_NUMBER is the token number of the error token. */
extern int error_token_number;
/* Dump RITEM for traces. */
void ritem_print PARAMS ((FILE *out));
/* Return the size of the longest rule RHS. */
size_t ritem_longest_rhs PARAMS ((void));
#endif /* !GRAM_H_ */
+262 -364
View File
@@ -1,5 +1,5 @@
/* Compute look-ahead criteria for bison,
Copyright 1984, 1986, 1989, 2000 Free Software Foundation, Inc.
Copyright 1984, 1986, 1989, 2000, 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -31,88 +31,80 @@
#include "lalr.h"
#include "nullable.h"
#include "derives.h"
#include "getargs.h"
/* All the decorated states, indexed by the state number. Warning:
there is a state_TABLE in LR0.c, but it is different and static.
*/
state_t *state_table = NULL;
int tokensetsize;
short *lookaheads;
short *LAruleno;
unsigned *LA;
short *accessing_symbol;
char *consistent;
core **state_table;
shifts **shift_table;
reductions **reduction_table;
static int ngotos;
short *goto_map;
short *from_state;
short *to_state;
extern void berror PARAMS ((const char *));
/* And for the famous F variable, which name is so descriptive that a
comment is hardly needed. <grin>. */
static unsigned *F = NULL;
#define F(Rule) (F + (Rule) * tokensetsize)
static int infinity;
static int maxrhs;
static int ngotos;
static unsigned *F;
static short **includes;
static shorts **lookback;
/*---------------------------------------------------------------.
| digraph & traverse. |
| |
| The following variables are used as common storage between the |
| two. |
`---------------------------------------------------------------*/
static short **R;
static short *INDEX;
static short *VERTICES;
static int top;
static int infinity;
static void
traverse (int i)
{
unsigned *fp1;
unsigned *fp2;
unsigned *fp3;
int j;
short *rp;
size_t k;
int height;
unsigned *base;
size_t size = F (i + 1) - F(i);
VERTICES[++top] = i;
INDEX[i] = height = top;
base = F + i * tokensetsize;
fp3 = base + tokensetsize;
if (R[i])
for (j = 0; R[i][j] >= 0; ++j)
{
if (INDEX[R[i][j]] == 0)
traverse (R[i][j]);
rp = R[i];
if (rp)
{
while ((j = *rp++) >= 0)
{
if (INDEX[j] == 0)
traverse (j);
if (INDEX[i] > INDEX[R[i][j]])
INDEX[i] = INDEX[R[i][j]];
if (INDEX[i] > INDEX[j])
INDEX[i] = INDEX[j];
fp1 = base;
fp2 = F + j * tokensetsize;
while (fp1 < fp3)
*fp1++ |= *fp2++;
}
}
for (k = 0; k < size; ++k)
F (i)[k] |= F (R[i][j])[k];
}
if (INDEX[i] == height)
{
for (;;)
{
j = VERTICES[top--];
INDEX[j] = infinity;
for (;;)
{
j = VERTICES[top--];
INDEX[j] = infinity;
if (i == j)
break;
if (i == j)
break;
fp1 = base;
fp2 = F + j * tokensetsize;
while (fp1 < fp3)
*fp2++ = *fp1++;
}
}
for (k = 0; k < size; ++k)
F (j)[k] = F (i)[k];
}
}
@@ -132,87 +124,85 @@ digraph (short **relation)
INDEX[i] = 0;
for (i = 0; i < ngotos; i++)
{
if (INDEX[i] == 0 && R[i])
traverse (i);
}
if (INDEX[i] == 0 && R[i])
traverse (i);
XFREE (INDEX);
XFREE (VERTICES);
}
/*--------------------.
| Build STATE_TABLE. |
`--------------------*/
static void
set_state_table (void)
{
core *sp;
/* NSTATES + 1 because lookahead for the pseudo state number NSTATES
might be used (see conflicts.c). It is too opaque for me to
provide a probably less hacky implementation. --akim */
state_table = XCALLOC (state_t, nstates + 1);
state_table = XCALLOC (core *, nstates);
{
core *sp;
for (sp = first_state; sp; sp = sp->next)
{
state_table[sp->number].state = sp;
state_table[sp->number].accessing_symbol = sp->accessing_symbol;
}
}
for (sp = first_state; sp; sp = sp->next)
state_table[sp->number] = sp;
}
{
shifts *sp;
for (sp = first_shift; sp; sp = sp->next)
state_table[sp->number].shifts = sp;
}
{
reductions *rp;
for (rp = first_reduction; rp; rp = rp->next)
state_table[rp->number].reductions = rp;
}
static void
set_accessing_symbol (void)
{
core *sp;
/* Pessimization, but simplification of the code: make sense all the
states have a shifts, even if reduced to 0 shifts. */
{
int i;
for (i = 0; i < nstates; i++)
if (!state_table[i].shifts)
state_table[i].shifts = shifts_new (0);
}
accessing_symbol = XCALLOC (short, nstates);
/* Initializing the lookaheads members. Please note that it must be
performed after having set some of the other members which are
used below. Change with extreme caution. */
{
int i;
int count = 0;
for (i = 0; i < nstates; i++)
{
int k;
reductions *rp = state_table[i].reductions;
shifts *sp = state_table[i].shifts;
for (sp = first_state; sp; sp = sp->next)
accessing_symbol[sp->number] = sp->accessing_symbol;
}
state_table[i].lookaheads = count;
if (rp
&& (rp->nreds > 1 || (sp->nshifts && SHIFT_IS_SHIFT (sp, 0))))
count += rp->nreds;
else
state_table[i].consistent = 1;
static void
set_shift_table (void)
{
shifts *sp;
shift_table = XCALLOC (shifts *, nstates);
for (sp = first_shift; sp; sp = sp->next)
shift_table[sp->number] = sp;
}
static void
set_reduction_table (void)
{
reductions *rp;
reduction_table = XCALLOC (reductions *, nstates);
for (rp = first_reduction; rp; rp = rp->next)
reduction_table[rp->number] = rp;
}
static void
set_maxrhs (void)
{
short *itemp;
int length;
int max;
length = 0;
max = 0;
for (itemp = ritem; *itemp; itemp++)
{
if (*itemp > 0)
{
length++;
}
else
{
if (length > max)
max = length;
length = 0;
}
}
maxrhs = max;
for (k = 0; k < sp->nshifts; k++)
if (SHIFT_IS_ERROR (sp, k))
{
state_table[i].consistent = 0;
break;
}
}
state_table[nstates].lookaheads = count;
}
}
@@ -221,65 +211,23 @@ initialize_LA (void)
{
int i;
int j;
int count;
reductions *rp;
shifts *sp;
short *np;
reductions *rp;
consistent = XCALLOC (char, nstates);
lookaheads = XCALLOC (short, nstates + 1);
size_t nLA = state_table[nstates].lookaheads;
if (!nLA)
nLA = 1;
count = 0;
for (i = 0; i < nstates; i++)
{
int k;
lookaheads[i] = count;
rp = reduction_table[i];
sp = shift_table[i];
if (rp && (rp->nreds > 1
|| (sp && !ISVAR (accessing_symbol[sp->shifts[0]]))))
count += rp->nreds;
else
consistent[i] = 1;
if (sp)
for (k = 0; k < sp->nshifts; k++)
{
if (accessing_symbol[sp->shifts[k]] == error_token_number)
{
consistent[i] = 0;
break;
}
}
}
lookaheads[nstates] = count;
if (count == 0)
{
LA = XCALLOC (unsigned, 1 * tokensetsize);
LAruleno = XCALLOC (short, 1);
lookback = XCALLOC (shorts *, 1);
}
else
{
LA = XCALLOC (unsigned, count * tokensetsize);
LAruleno = XCALLOC (short, count);
lookback = XCALLOC (shorts *, count);
}
LA = XCALLOC (unsigned, nLA * tokensetsize);
LAruleno = XCALLOC (short, nLA);
lookback = XCALLOC (shorts *, nLA);
np = LAruleno;
for (i = 0; i < nstates; i++)
{
if (!consistent[i])
{
if ((rp = reduction_table[i]))
for (j = 0; j < rp->nreds; j++)
*np++ = rp->rules[j];
}
}
if (!state_table[i].consistent)
if ((rp = state_table[i].reductions))
for (j = 0; j < rp->nreds; j++)
*np++ = rp->rules[j];
}
@@ -299,13 +247,10 @@ set_goto_map (void)
ngotos = 0;
for (sp = first_shift; sp; sp = sp->next)
{
for (i = sp->nshifts - 1; i >= 0; i--)
if (sp->nshifts)
for (i = sp->nshifts - 1; i >= 0 && SHIFT_IS_GOTO (sp, i); --i)
{
symbol = accessing_symbol[sp->shifts[i]];
if (ISTOKEN (symbol))
break;
symbol = state_table[sp->shifts[i]].accessing_symbol;
if (ngotos == MAXSHORT)
fatal (_("too many gotos (max %d)"), MAXSHORT);
@@ -313,7 +258,6 @@ set_goto_map (void)
ngotos++;
goto_map[symbol]++;
}
}
k = 0;
for (i = ntokens; i < nsyms; i++)
@@ -334,18 +278,16 @@ set_goto_map (void)
for (sp = first_shift; sp; sp = sp->next)
{
state1 = sp->number;
for (i = sp->nshifts - 1; i >= 0; i--)
{
state2 = sp->shifts[i];
symbol = accessing_symbol[state2];
if (sp->nshifts)
for (i = sp->nshifts - 1; i >= 0 && SHIFT_IS_GOTO (sp, i); --i)
{
state2 = sp->shifts[i];
symbol = state_table[state2].accessing_symbol;
if (ISTOKEN (symbol))
break;
k = temp_map[symbol]++;
from_state[k] = state1;
to_state[k] = state2;
}
k = temp_map[symbol]++;
from_state[k] = state1;
to_state[k] = state2;
}
}
XFREE (temp_map + ntokens);
@@ -389,73 +331,46 @@ map_goto (int state, int symbol)
static void
initialize_F (void)
{
short **reads = XCALLOC (short *, ngotos);
short *edge = XCALLOC (short, ngotos + 1);
int nedges = 0;
int i;
int j;
int k;
shifts *sp;
short *edge;
unsigned *rowp;
short *rp;
short **reads;
int nedges;
int stateno;
int symbol;
int nwords;
nwords = ngotos * tokensetsize;
F = XCALLOC (unsigned, nwords);
F = XCALLOC (unsigned, ngotos * tokensetsize);
reads = XCALLOC (short *, ngotos);
edge = XCALLOC (short, ngotos + 1);
nedges = 0;
rowp = F;
for (i = 0; i < ngotos; i++)
{
stateno = to_state[i];
sp = shift_table[stateno];
int stateno = to_state[i];
shifts *sp = state_table[stateno].shifts;
if (sp)
int j;
for (j = 0; j < sp->nshifts && SHIFT_IS_SHIFT (sp, j); j++)
{
k = sp->nshifts;
for (j = 0; j < k; j++)
{
symbol = accessing_symbol[sp->shifts[j]];
if (ISVAR (symbol))
break;
SETBIT (rowp, symbol);
}
for (; j < k; j++)
{
symbol = accessing_symbol[sp->shifts[j]];
if (nullable[symbol])
edge[nedges++] = map_goto (stateno, symbol);
}
if (nedges)
{
reads[i] = rp = XCALLOC (short, nedges + 1);
for (j = 0; j < nedges; j++)
rp[j] = edge[j];
rp[nedges] = -1;
nedges = 0;
}
int symbol = state_table[sp->shifts[j]].accessing_symbol;
SETBIT (F (i), symbol);
}
rowp += tokensetsize;
for (; j < sp->nshifts; j++)
{
int symbol = state_table[sp->shifts[j]].accessing_symbol;
if (nullable[symbol])
edge[nedges++] = map_goto (stateno, symbol);
}
if (nedges)
{
reads[i] = XCALLOC (short, nedges + 1);
shortcpy (reads[i], edge, nedges);
reads[i][nedges] = -1;
nedges = 0;
}
}
digraph (reads);
for (i = 0; i < ngotos; i++)
{
if (reads[i])
XFREE (reads[i]);
}
XFREE (reads[i]);
XFREE (reads);
XFREE (edge);
@@ -470,8 +385,8 @@ add_lookback_edge (int stateno, int ruleno, int gotono)
int found;
shorts *sp;
i = lookaheads[stateno];
k = lookaheads[stateno + 1];
i = state_table[stateno].lookaheads;
k = state_table[stateno + 1].lookaheads;
found = 0;
while (!found && i < k)
{
@@ -490,56 +405,87 @@ add_lookback_edge (int stateno, int ruleno, int gotono)
}
static void
matrix_print (FILE *out, short **matrix, int n)
{
int i, j;
for (i = 0; i < n; ++i)
{
fprintf (out, "%3d: ", i);
if (matrix[i])
for (j = 0; matrix[i][j] != -1; ++j)
fprintf (out, "%3d ", matrix[i][j]);
fputc ('\n', out);
}
fputc ('\n', out);
}
/*-------------------------------------------------------------------.
| Return the transpose of R_ARG, of size N. Destroy R_ARG, as it is |
| replaced with the result. |
| |
| R_ARG[I] is NULL or a -1 terminated list of numbers. |
| |
| RESULT[NUM] is NULL or the -1 terminated list of the I such as NUM |
| is in R_ARG[I]. |
`-------------------------------------------------------------------*/
static short **
transpose (short **R_arg, int n)
{
short **new_R;
short **temp_R;
short *nedges;
short *sp;
int i;
int k;
/* The result. */
short **new_R = XCALLOC (short *, n);
/* END_R[I] -- next entry of NEW_R[I]. */
short **end_R = XCALLOC (short *, n);
/* NEDGES[I] -- total size of NEW_R[I]. */
short *nedges = XCALLOC (short, n);
int i, j;
nedges = XCALLOC (short, n);
for (i = 0; i < n; i++)
if (trace_flag)
{
sp = R_arg[i];
if (sp)
{
while (*sp >= 0)
nedges[*sp++]++;
}
fputs ("transpose: input\n", stderr);
matrix_print (stderr, R_arg, n);
}
new_R = XCALLOC (short *, n);
temp_R = XCALLOC (short *, n);
/* Count. */
for (i = 0; i < n; i++)
{
k = nedges[i];
if (k > 0)
{
sp = XCALLOC (short, k + 1);
new_R[i] = sp;
temp_R[i] = sp;
sp[k] = -1;
}
}
XFREE (nedges);
if (R_arg[i])
for (j = 0; R_arg[i][j] >= 0; ++j)
++nedges[R_arg[i][j]];
/* Allocate. */
for (i = 0; i < n; i++)
{
sp = R_arg[i];
if (sp)
{
while (*sp >= 0)
*temp_R[*sp++]++ = i;
}
}
if (nedges[i] > 0)
{
short *sp = XCALLOC (short, nedges[i] + 1);
sp[nedges[i]] = -1;
new_R[i] = sp;
end_R[i] = sp;
}
XFREE (temp_R);
/* Store. */
for (i = 0; i < n; i++)
if (R_arg[i])
for (j = 0; R_arg[i][j] >= 0; ++j)
{
*end_R[R_arg[i][j]] = i;
++end_R[R_arg[i][j]];
}
free (nedges);
free (end_R);
/* Free the input: it is replaced with the result. */
for (i = 0; i < n; i++)
XFREE (R_arg[i]);
free (R_arg);
if (trace_flag)
{
fputs ("transpose: output\n", stderr);
matrix_print (stderr, new_R, n);
}
return new_R;
}
@@ -548,57 +494,42 @@ transpose (short **R_arg, int n)
static void
build_relations (void)
{
short *edge = XCALLOC (short, ngotos + 1);
short *states = XCALLOC (short, ritem_longest_rhs () + 1);
int i;
int j;
int k;
short *rulep;
short *rp;
shifts *sp;
int length;
int nedges;
int done;
int state1;
int stateno;
int symbol1;
int symbol2;
short *shortp;
short *edge;
short *states;
short **new_includes;
includes = XCALLOC (short *, ngotos);
edge = XCALLOC (short, ngotos + 1);
states = XCALLOC (short, maxrhs + 1);
for (i = 0; i < ngotos; i++)
{
nedges = 0;
state1 = from_state[i];
symbol1 = accessing_symbol[to_state[i]];
int nedges = 0;
int state1 = from_state[i];
int symbol1 = state_table[to_state[i]].accessing_symbol;
short *rulep;
for (rulep = derives[symbol1]; *rulep > 0; rulep++)
{
length = 1;
int done;
int length = 1;
int stateno = state1;
short *rp;
states[0] = state1;
stateno = state1;
for (rp = ritem + rrhs[*rulep]; *rp > 0; rp++)
for (rp = ritem + rule_table[*rulep].rhs; *rp > 0; rp++)
{
symbol2 = *rp;
sp = shift_table[stateno];
k = sp->nshifts;
for (j = 0; j < k; j++)
shifts *sp = state_table[stateno].shifts;
int j;
for (j = 0; j < sp->nshifts; j++)
{
stateno = sp->shifts[j];
if (accessing_symbol[stateno] == symbol2)
if (state_table[stateno].accessing_symbol == *rp)
break;
}
states[length++] = stateno;
}
if (!consistent[stateno])
if (!state_table[stateno].consistent)
add_lookback_edge (stateno, *rulep, i);
length--;
@@ -620,25 +551,18 @@ build_relations (void)
if (nedges)
{
includes[i] = shortp = XCALLOC (short, nedges + 1);
int j;
includes[i] = XCALLOC (short, nedges + 1);
for (j = 0; j < nedges; j++)
shortp[j] = edge[j];
shortp[nedges] = -1;
includes[i][j] = edge[j];
includes[i][nedges] = -1;
}
}
new_includes = transpose (includes, ngotos);
for (i = 0; i < ngotos; i++)
if (includes[i])
XFREE (includes[i]);
XFREE (includes);
includes = new_includes;
XFREE (edge);
XFREE (states);
includes = transpose (includes, ngotos);
}
@@ -651,10 +575,7 @@ compute_FOLLOWS (void)
digraph (includes);
for (i = 0; i < ngotos; i++)
{
if (includes[i])
XFREE (includes[i]);
}
XFREE (includes[i]);
XFREE (includes);
}
@@ -664,39 +585,20 @@ static void
compute_lookaheads (void)
{
int i;
int n;
unsigned *fp1;
unsigned *fp2;
unsigned *fp3;
shorts *sp;
unsigned *rowp;
shorts *sptmp; /* JF */
rowp = LA;
n = lookaheads[nstates];
for (i = 0; i < n; i++)
{
fp3 = rowp + tokensetsize;
for (sp = lookback[i]; sp; sp = sp->next)
{
fp1 = rowp;
fp2 = F + tokensetsize * sp->value;
while (fp1 < fp3)
*fp1++ |= *fp2++;
}
for (i = 0; i < state_table[nstates].lookaheads; i++)
for (sp = lookback[i]; sp; sp = sp->next)
{
int size = LA (i + 1) - LA (i);
int j;
for (j = 0; j < size; ++j)
LA (i)[j] |= F (sp->value)[j];
}
rowp = fp3;
}
for (i = 0; i < n; i++)
{
/* JF removed ref to freed storage */
for (sp = lookback[i]; sp; sp = sptmp)
{
sptmp = sp->next;
XFREE (sp);
}
}
/* Free LOOKBACK. */
for (i = 0; i < state_table[nstates].lookaheads; i++)
LIST_FREE (shorts, lookback[i]);
XFREE (lookback);
XFREE (F);
@@ -709,10 +611,6 @@ lalr (void)
tokensetsize = WORDSIZE (ntokens);
set_state_table ();
set_accessing_symbol ();
set_shift_table ();
set_reduction_table ();
set_maxrhs ();
initialize_LA ();
set_goto_map ();
initialize_F ();
+28 -13
View File
@@ -49,12 +49,6 @@ extern short *goto_map;
extern short *from_state;
extern short *to_state;
/* CONSISTENT[S] is nonzero if no lookahead is needed to decide what
to do in state S. */
extern char *consistent;
/* LARULENO is a vector which records the rules that need lookahead in
various states. The elements of LARULENO that apply to state S are
those from LOOKAHEADS[S] through LOOKAHEADS[S+1]-1. Each element
@@ -72,15 +66,36 @@ extern short *LAruleno;
it is a conflict. */
extern unsigned *LA;
#define LA(Rule) (LA + (Rule) * tokensetsize)
/* A structure decorating a state, with additional information. */
typedef struct state_s
{
/* A state. */
core *state;
/* Its accessing symbol. */
short accessing_symbol;
shifts *shifts;
reductions *reductions;
errs *errs;
/* Nonzero if no lookahead is needed to decide what to do in state
S. */
char consistent;
short lookaheads;
} state_t;
/* All the decorated states, indexed by the state number. Warning:
there is a state_TABLE in LR0.c, but it is different and static.
*/
extern state_t *state_table;
extern int tokensetsize;
extern short *lookaheads;
extern short *accessing_symbol;
extern core **state_table;
extern shifts **shift_table;
extern reductions **reduction_table;
/* The number of lookaheads. */
extern size_t nlookaheads;
#endif /* !LALR_H_ */
+103 -48
View File
@@ -21,7 +21,6 @@
#include "system.h"
#include "getargs.h"
#include "files.h"
#include "getopt.h" /* for optarg */
#include "symtab.h"
#include "lex.h"
#include "complain.h"
@@ -32,14 +31,13 @@
struct obstack token_obstack;
const char *token_buffer = NULL;
bucket *symval;
bucket *symval = NULL;
int numval;
/* these two describe a token to be reread */
/* A token to be reread, see unlex and lex. */
static token_t unlexed = tok_undef;
/* by the next call to lex */
static bucket *unlexed_symval = NULL;
static const char *unlexed_token_buffer = NULL;
void
lex_init (void)
@@ -324,6 +322,7 @@ void
unlex (token_t token)
{
unlexed = token;
unlexed_token_buffer = token_buffer;
unlexed_symval = symval;
}
@@ -368,6 +367,7 @@ lex (void)
{
token_t res = unlexed;
symval = unlexed_symval;
token_buffer = unlexed_token_buffer;
unlexed = tok_undef;
return res;
}
@@ -426,7 +426,7 @@ lex (void)
/* parse the literal token and compute character code in code */
{
int code, discode;
int code;
obstack_1grow (&token_obstack, '\'');
literalchar (&token_obstack, &code, '\'');
@@ -434,6 +434,7 @@ lex (void)
c = getc (finput);
if (c != '\'')
{
int discode;
complain (_("use \"...\" for multi-character literal tokens"));
while (1)
if (!literalchar (0, &discode, '\''))
@@ -444,7 +445,7 @@ lex (void)
token_buffer = obstack_finish (&token_obstack);
symval = getsym (token_buffer);
symval->class = token_sym;
if (!symval->user_token_number)
if (symval->user_token_number == SUNDEF)
symval->user_token_number = code;
return tok_identifier;
}
@@ -552,28 +553,27 @@ struct percent_table_struct percent_table[] =
{ "nonassoc", NULL, tok_nonassoc },
{ "binary", NULL, tok_nonassoc },
{ "prec", NULL, tok_prec },
{ "locations", &locations_flag, tok_noop }, /* -l */
{ "no_lines", &no_lines_flag, tok_noop }, /* -l */
{ "locations", &locations_flag, tok_intopt }, /* -l */
{ "no-lines", &no_lines_flag, tok_intopt }, /* -l */
{ "raw", NULL, tok_obsolete }, /* -r */
{ "token_table", &token_table_flag, tok_noop }, /* -k */
{ "yacc", &yacc_flag, tok_noop }, /* -y */
{ "fixed_output_files",&yacc_flag, tok_noop }, /* -y */
{ "defines", &defines_flag, tok_noop }, /* -d */
{ "no_parser", &no_parser_flag, tok_noop }, /* -n */
{ "graph", &graph_flag, tok_noop }, /* -g */
#if 0
/* For the time being, this is not enabled yet, while it's possible
though, since we use obstacks. The only risk is with semantic
parsers which will output an `include' of an output file: be sure
that the name included is indeed the name of the output file. */
{ "output_file", &spec_outfile, tok_setopt }, /* -o */
{ "file_prefix", &spec_file_prefix, tok_setopt }, /* -b */
{ "name_prefix", &spec_name_prefix, tok_setopt }, /* -p */
#endif
{ "verbose", &verbose_flag, tok_noop }, /* -v */
{ "debug", &debug_flag, tok_noop }, /* -t */
{ "semantic_parser", &semantic_parser, tok_noop },
{ "pure_parser", &pure_parser, tok_noop },
{ "token-table", &token_table_flag, tok_intopt }, /* -k */
{ "yacc", &yacc_flag, tok_intopt }, /* -y */
{ "fixed-output-files",&yacc_flag, tok_intopt }, /* -y */
{ "defines", &defines_flag, tok_intopt }, /* -d */
{ "no-parser", &no_parser_flag, tok_intopt }, /* -n */
{ "graph", &graph_flag, tok_intopt }, /* -g */
/* FIXME: semantic parsers which will output an `include' of an
output file: be sure that the name included is indeed the name of
the output file. */
{ "output", &spec_outfile, tok_stropt }, /* -o */
{ "file-prefix", &spec_file_prefix, tok_stropt }, /* -b */
{ "name-prefix", &spec_name_prefix, tok_stropt }, /* -p */
{ "verbose", &verbose_flag, tok_intopt }, /* -v */
{ "debug", &debug_flag, tok_intopt }, /* -t */
{ "semantic-parser", &semantic_parser, tok_intopt },
{ "pure-parser", &pure_parser, tok_intopt },
{ NULL, NULL, tok_illegal}
};
@@ -584,76 +584,131 @@ struct percent_table_struct percent_table[] =
token_t
parse_percent_token (void)
{
struct percent_table_struct *tx;
struct percent_table_struct *tx = NULL;
const char *arg = NULL;
/* Where the ARG was found in token_buffer. */
size_t arg_offset = 0;
int c = getc (finput);
obstack_1grow (&token_obstack, '%');
obstack_1grow (&token_obstack, c);
switch (c)
{
case '%':
token_buffer = obstack_finish (&token_obstack);
return tok_two_percents;
case '{':
token_buffer = obstack_finish (&token_obstack);
return tok_percent_left_curly;
/* The following guys are here for backward compatibility with
very ancient Yacc versions. The paper of Johnson mentions
them (as ancient :). */
case '<':
token_buffer = obstack_finish (&token_obstack);
return tok_left;
case '>':
token_buffer = obstack_finish (&token_obstack);
return tok_right;
case '2':
token_buffer = obstack_finish (&token_obstack);
return tok_nonassoc;
case '0':
token_buffer = obstack_finish (&token_obstack);
return tok_token;
case '=':
token_buffer = obstack_finish (&token_obstack);
return tok_prec;
}
if (!isalpha (c))
return tok_illegal;
obstack_1grow (&token_obstack, '%');
while (isalpha (c) || c == '_' || c == '-')
{
if (c == '-')
c = '_';
obstack_1grow (&token_obstack, c);
c = getc (finput);
token_buffer = obstack_finish (&token_obstack);
return tok_illegal;
}
ungetc (c, finput);
while (c = getc (finput), isalpha (c) || c == '_' || c == '-')
{
if (c == '_')
c = '-';
obstack_1grow (&token_obstack, c);
}
/* %DIRECTIVE="ARG". Separate into
TOKEN_BUFFER = `%DIRECTIVE\0ARG\0'.
This is a bit hackish, but once we move to a Bison parser,
things will be cleaned up. */
if (c == '=')
{
/* End of the directive. We skip the `='. */
obstack_1grow (&token_obstack, '\0');
/* Fetch the ARG if present. */
c = getc (finput);
if (c == '"')
{
int code;
arg_offset = obstack_object_size (&token_obstack);
/* Read up to and including `"'. Do not append the closing
`"' in the output: it's not part of the ARG. */
while (literalchar (NULL, &code, '"'))
obstack_1grow (&token_obstack, code);
}
/* else: should be an error. */
}
else
ungetc (c, finput);
obstack_1grow (&token_obstack, '\0');
token_buffer = obstack_finish (&token_obstack);
if (arg_offset)
arg = token_buffer + arg_offset;
/* table lookup % directive */
for (tx = percent_table; tx->name; tx++)
if (strcmp (token_buffer + 1, tx->name) == 0)
break;
if (tx->set_flag)
{
*((int *) (tx->set_flag)) = 1;
return tok_noop;
}
if (arg && tx->retval != tok_stropt)
fatal (_("`%s' supports no argument: %s"), token_buffer, quote (arg));
switch (tx->retval)
{
case tok_setopt:
*((char **) (tx->set_flag)) = optarg;
case tok_stropt:
assert (tx->set_flag);
if (arg)
{
/* Keep only the first assignment: command line options have
already been processed, and we want them to have
precedence. Side effect: if this %-option is used
several times, only the first is honored. Bah. */
if (!*((char **) (tx->set_flag)))
*((char **) (tx->set_flag)) = xstrdup (arg);
}
else
fatal (_("`%s' requires an argument"), token_buffer);
return tok_noop;
break;
case tok_intopt:
assert (tx->set_flag);
*((int *) (tx->set_flag)) = 1;
return tok_noop;
break;
case tok_obsolete:
fatal (_("`%s' is no longer supported"), token_buffer);
return tok_noop;
break;
default:
/* Other cases do not apply here. */
return tx->retval;
break;
}
return tx->retval;
abort ();
}
+2 -1
View File
@@ -49,7 +49,8 @@ typedef enum token_e
tok_expect,
tok_thong,
tok_noop,
tok_setopt,
tok_intopt,
tok_stropt,
tok_illegal,
tok_obsolete
} token_t;
+17 -19
View File
@@ -1,5 +1,5 @@
/* Top level entry point of bison,
Copyright 1984, 1986, 1989, 1992, 1995, 2000
Copyright 1984, 1986, 1989, 1992, 1995, 2000, 2001
Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -40,7 +40,6 @@
/* The name this program was run with, for messages. */
char *program_name;
extern void berror PARAMS((const char *));
int
main (int argc, char *argv[])
@@ -62,15 +61,15 @@ main (int argc, char *argv[])
if (complain_message_count)
exit (1);
/* find useless nonterminals and productions and reduce the grammar. In
file reduce.c */
/* Find useless nonterminals and productions and reduce the grammar. */
reduce_grammar ();
/* record other info about the grammar. In files derives and nullable. */
/* Record other info about the grammar. In files derives and
nullable. */
set_derives ();
set_nullable ();
/* convert to nondeterministic finite state machine. In file LR0.
/* Convert to nondeterministic finite state machine. In file LR0.
See state.h for more info. */
generate_states ();
@@ -82,6 +81,7 @@ main (int argc, char *argv[])
conflicts. Also resolve s/r conflicts based on precedence
declarations. */
solve_conflicts ();
conflicts_print ();
/* Output file names. */
compute_output_file_names ();
@@ -91,7 +91,7 @@ main (int argc, char *argv[])
if (complain_message_count)
exit (1);
/* Print information about results, if requested. */
/* Output the detailed report on the grammar. */
print_results ();
/* Output the VCG graph. */
@@ -100,28 +100,26 @@ main (int argc, char *argv[])
/* Output the tables and the parser to ftable. In file output. */
output ();
/* Close the input files. */
close_files ();
/* Free the symbol table data structure. */
free_symtab ();
lex_free ();
/* Close the input files. */
close_files ();
reduce_free ();
free_conflicts ();
free_nullable ();
free_derives ();
output_files ();
exit (complain_message_count ? 1 : 0);
}
/* Abort for an internal error denoted by string S. */
/* If using alloca.c, flush the alloca'ed memory for the benefit of
people running Bison as a library in IDEs. */
#if C_ALLOCA
alloca (0);
#endif
void
berror (const char *s)
{
fprintf (stderr, _("%s: internal error: %s\n"), program_name, s);
abort ();
return complain_message_count ? EXIT_FAILURE : EXIT_SUCCESS;
}
+64 -66
View File
@@ -1,5 +1,5 @@
/* Part of the bison parser generator,
Copyright 1984, 1989, 2000 Free Software Foundation, Inc.
Copyright 1984, 1989, 2000, 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -24,107 +24,105 @@
do so. */
#include "system.h"
#include "getargs.h"
#include "reader.h"
#include "types.h"
#include "gram.h"
#include "reduce.h"
#include "nullable.h"
char *nullable = NULL;
static void
nullable_print (FILE *out)
{
int i;
fputs ("NULLABLE\n", out);
for (i = ntokens; i < nsyms; i++)
fprintf (out, "\t%s: %s\n", tags[i], nullable[i] ? "yes" : "no");
fputs ("\n\n", out);
}
void
set_nullable (void)
{
short *r;
int ruleno;
short *s1;
short *s2;
int ruleno;
int symbol;
shorts *p;
short *squeue;
short *rcount;
shorts **rsets;
shorts *relts;
char any_tokens;
short *r1;
short *squeue = XCALLOC (short, nvars);
short *rcount = XCALLOC (short, nrules + 1);
/* RITEM contains all the rules, including useless productions.
Hence we must allocate room for useless nonterminals too. */
shorts **rsets = XCALLOC (shorts *, nvars) - ntokens;
/* This is said to be more elements than we actually use.
Supposedly nitems - nrules is enough. But why take the risk? */
shorts *relts = XCALLOC (shorts, nitems + nvars + 1);
#ifdef TRACE
fprintf (stderr, _("Entering set_nullable"));
#endif
if (trace_flag)
fprintf (stderr, "Entering set_nullable\n");
nullable = XCALLOC (char, nvars) - ntokens;
squeue = XCALLOC (short, nvars);
s1 = s2 = squeue;
rcount = XCALLOC (short, nrules + 1);
rsets = XCALLOC (shorts *, nvars) - ntokens;
/* This is said to be more elements than we actually use.
Supposedly nitems - nrules is enough.
But why take the risk? */
relts = XCALLOC (shorts, nitems + nvars + 1);
p = relts;
r = ritem;
while (*r)
{
if (*r < 0)
{
symbol = rlhs[-(*r++)];
if (symbol >= 0 && !nullable[symbol])
{
nullable[symbol] = 1;
*s2++ = symbol;
}
}
else
{
r1 = r;
any_tokens = 0;
for (symbol = *r++; symbol > 0; symbol = *r++)
{
if (ISTOKEN (symbol))
for (ruleno = 1; ruleno < nrules + 1; ++ruleno)
if (rule_table[ruleno].useful)
{
if (ritem[rule_table[ruleno].rhs] > 0)
{
/* This rule has a non empty RHS. */
short *r;
int any_tokens = 0;
for (r = ritem + rule_table[ruleno].rhs; *r > 0; ++r)
if (ISTOKEN (*r))
any_tokens = 1;
}
if (!any_tokens)
{
ruleno = -symbol;
r = r1;
for (symbol = *r++; symbol > 0; symbol = *r++)
/* This rule has only nonterminals: schedule it for the second
pass. */
if (!any_tokens)
for (r = ritem + rule_table[ruleno].rhs; *r > 0; ++r)
{
rcount[ruleno]++;
p->next = rsets[symbol];
p->next = rsets[*r];
p->value = ruleno;
rsets[symbol] = p;
rsets[*r] = p;
p++;
}
}
}
}
}
else
{
/* This rule has an empty RHS. */
assert (ritem[rule_table[ruleno].rhs] == -ruleno);
if (rule_table[ruleno].useful && !nullable[rule_table[ruleno].lhs])
{
nullable[rule_table[ruleno].lhs] = 1;
*s2++ = rule_table[ruleno].lhs;
}
}
}
while (s1 < s2)
{
p = rsets[*s1++];
while (p)
{
ruleno = p->value;
p = p->next;
if (--rcount[ruleno] == 0)
for (p = rsets[*s1++]; p; p = p->next)
{
ruleno = p->value;
if (--rcount[ruleno] == 0)
if (rule_table[ruleno].useful && !nullable[rule_table[ruleno].lhs])
{
symbol = rlhs[ruleno];
if (symbol >= 0 && !nullable[symbol])
{
nullable[symbol] = 1;
*s2++ = symbol;
}
nullable[rule_table[ruleno].lhs] = 1;
*s2++ = rule_table[ruleno].lhs;
}
}
}
}
XFREE (squeue);
XFREE (rcount);
XFREE (rsets + ntokens);
XFREE (relts);
if (trace_flag)
nullable_print (stderr);
}
+85 -139
View File
@@ -1,5 +1,7 @@
/* Output the generated parsing program for bison,
Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -103,9 +105,6 @@
#include "reader.h"
#include "conflicts.h"
extern void berror PARAMS((const char *));
static int nvectors;
static int nentries;
@@ -132,7 +131,7 @@ output_short_or_char_table (struct obstack *oout,
const char *table_name,
short *short_table,
short first_value,
short begin, short end)
int begin, int end)
{
int i, j;
@@ -170,7 +169,7 @@ output_short_table (struct obstack *oout,
const char *table_name,
short *short_table,
short first_value,
short begin, short end)
int begin, int end)
{
output_short_or_char_table (oout, comment, "short", table_name, short_table,
first_value, begin, end);
@@ -317,10 +316,17 @@ output_gram (void)
yyprhs and yyrhs are needed only for yydebug. */
/* With the no_parser option, all tables are generated */
if (!semantic_parser && !no_parser_flag)
obstack_sgrow (&table_obstack, "\n#if YYDEBUG != 0\n");
obstack_sgrow (&table_obstack, "\n#if YYDEBUG\n");
output_short_table (&table_obstack, NULL, "yyprhs", rrhs,
0, 1, nrules + 1);
{
int i;
short *values = XCALLOC (short, nrules + 1);
for (i = 0; i < nrules + 1; ++i)
values[i] = rule_table[i].rhs;
output_short_table (&table_obstack, NULL, "yyprhs", values,
0, 1, nrules + 1);
XFREE (values);
}
{
size_t yyrhs_size = 1;
@@ -347,7 +353,13 @@ output_gram (void)
static void
output_stos (void)
{
output_short_table (&table_obstack, NULL, "yystos", accessing_symbol,
int i;
short *values = (short *) alloca (sizeof (short) * nstates);
for (i = 0; i < nstates; ++i)
values[i] = state_table[i].accessing_symbol;
output_short_table (&table_obstack,
"YYSTOS[STATE] -- Accessing symbol to the STATE",
"yystos", values,
0, 1, nstates);
}
@@ -360,12 +372,18 @@ output_rule_data (void)
short *short_tab = NULL;
obstack_sgrow (&table_obstack, "\n\
#if YYDEBUG != 0\n");
#if YYDEBUG\n");
output_short_table (&table_obstack,
"YYRLINE[YYN] -- source line where rule number YYN was defined",
"yyrline", rline,
0, 1, nrules + 1);
{
short *values = XCALLOC (short, nrules + 1);
for (i = 0; i < nrules + 1; ++i)
values[i] = rule_table[i].line;
output_short_table (&table_obstack,
"YYRLINE[YYN] -- source line where rule number YYN was defined",
"yyrline", values,
0, 1, nrules + 1);
XFREE (values);
}
obstack_sgrow (&table_obstack, "#endif\n\n");
@@ -382,7 +400,7 @@ output_rule_data (void)
/* Output the table of symbol names. */
if (!token_table_flag && !no_parser_flag)
obstack_sgrow (&table_obstack,
"\n#if YYDEBUG != 0 || defined YYERROR_VERBOSE\n\n");
"\n#if (YYDEBUG) || defined YYERROR_VERBOSE\n\n");
obstack_sgrow (&table_obstack, "\
/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */\n");
obstack_sgrow (&table_obstack,
@@ -434,7 +452,7 @@ output_rule_data (void)
j += strsize;
}
/* add a NULL entry to list of tokens */
obstack_sgrow (&table_obstack, "NULL\n};\n");
obstack_sgrow (&table_obstack, "0\n};\n");
if (!token_table_flag && !no_parser_flag)
obstack_sgrow (&table_obstack, "#endif\n\n");
@@ -449,19 +467,24 @@ output_rule_data (void)
}
/* Output YYR1. */
output_short_table (&table_obstack,
{
short *values = XCALLOC (short, nrules + 1);
for (i = 0; i < nrules + 1; ++i)
values[i] = rule_table[i].lhs;
output_short_table (&table_obstack,
"YYR1[YYN] -- Symbol number of symbol that rule YYN derives",
"yyr1", rlhs,
0, 1, nrules + 1);
XFREE (rlhs + 1);
"yyr1", values,
0, 1, nrules + 1);
XFREE (values);
}
obstack_1grow (&table_obstack, '\n');
/* Output YYR2. */
short_tab = XMALLOC (short, nrules + 1);
for (i = 1; i < nrules; i++)
short_tab[i] = rrhs[i + 1] - rrhs[i] - 1;
short_tab[nrules] = nitems - rrhs[nrules] - 1;
short_tab[i] = rule_table[i + 1].rhs - rule_table[i].rhs - 1;
short_tab[nrules] = nitems - rule_table[nrules].rhs - 1;
output_short_table (&table_obstack,
"YYR2[YYN] -- Number of symbols composing right hand side of rule YYN",
"yyr2", short_tab,
@@ -470,7 +493,7 @@ output_rule_data (void)
XFREE (short_tab);
XFREE (rrhs + 1);
XFREE (rule_table + 1);
}
@@ -505,15 +528,11 @@ action_row (int state)
int k;
int m = 0;
int n = 0;
int count;
int default_rule;
int nreds;
int max;
int rule;
int shift_state;
int symbol;
unsigned mask;
unsigned *wordp;
reductions *redp;
shifts *shiftp;
errs *errp;
@@ -524,7 +543,7 @@ action_row (int state)
default_rule = 0;
nreds = 0;
redp = reduction_table[state];
redp = state_table[state].reductions;
if (redp)
{
@@ -534,69 +553,46 @@ action_row (int state)
{
/* loop over all the rules available here which require
lookahead */
m = lookaheads[state];
n = lookaheads[state + 1];
m = state_table[state].lookaheads;
n = state_table[state + 1].lookaheads;
for (i = n - 1; i >= m; i--)
{
rule = -LAruleno[i];
wordp = LA + i * tokensetsize;
mask = 1;
/* and find each token which the rule finds acceptable
to come next */
for (j = 0; j < ntokens; j++)
{
/* and record this rule as the rule to use if that
token follows. */
if (mask & *wordp)
actrow[j] = rule;
mask <<= 1;
if (mask == 0)
{
mask = 1;
wordp++;
}
}
}
/* and find each token which the rule finds acceptable
to come next */
for (j = 0; j < ntokens; j++)
/* and record this rule as the rule to use if that
token follows. */
if (BITISSET (LA (i), j))
actrow[j] = -LAruleno[i];
}
}
shiftp = shift_table[state];
/* Now see which tokens are allowed for shifts in this state. For
them, record the shift as the thing to do. So shift is preferred
to reduce. */
if (shiftp)
shiftp = state_table[state].shifts;
for (i = 0; i < shiftp->nshifts; i++)
{
k = shiftp->nshifts;
shift_state = shiftp->shifts[i];
if (!shift_state)
continue;
for (i = 0; i < k; i++)
{
shift_state = shiftp->shifts[i];
if (!shift_state)
continue;
symbol = state_table[shift_state].accessing_symbol;
symbol = accessing_symbol[shift_state];
if (ISVAR (symbol))
break;
if (ISVAR (symbol))
break;
actrow[symbol] = shift_state;
actrow[symbol] = shift_state;
/* Do not use any default reduction if there is a shift for
error */
if (symbol == error_token_number)
nodefault = 1;
}
/* Do not use any default reduction if there is a shift for
error */
if (symbol == error_token_number)
nodefault = 1;
}
errp = err_table[state];
/* See which tokens are an explicit error in this state (due to
%nonassoc). For them, record MINSHORT as the action. */
errp = state_table[state].errs;
if (errp)
{
@@ -614,14 +610,14 @@ action_row (int state)
if (nreds >= 1 && !nodefault)
{
if (consistent[state])
if (state_table[state].consistent)
default_rule = redp->rules[0];
else
{
max = 0;
int max = 0;
for (i = m; i < n; i++)
{
count = 0;
int count = 0;
rule = -LAruleno[i];
for (j = 0; j < ntokens; j++)
@@ -736,37 +732,6 @@ token_actions (void)
}
static void
free_shifts (void)
{
shifts *sp, *sptmp; /* JF derefrenced freed ptr */
XFREE (shift_table);
for (sp = first_shift; sp; sp = sptmp)
{
sptmp = sp->next;
XFREE (sp);
}
}
static void
free_reductions (void)
{
reductions *rp, *rptmp; /* JF fixed freed ptr */
XFREE (reduction_table);
for (rp = first_reduction; rp; rp = rptmp)
{
rptmp = rp->next;
XFREE (rp);
}
}
static void
save_column (int symbol, int default_state)
{
@@ -1013,9 +978,9 @@ pack_vector (int vector)
return j;
}
}
berror ("pack_vector");
return 0; /* JF keep lint happy */
#define pack_vector_succeeded 0
assert (pack_vector_succeeded);
return 0;
}
@@ -1116,12 +1081,10 @@ output_actions (void)
width = XCALLOC (short, nvectors);
token_actions ();
free_shifts ();
free_reductions ();
XFREE (lookaheads);
LIST_FREE (shifts, first_shift);
LIST_FREE (reductions, first_reduction);
XFREE (LA);
XFREE (LAruleno);
XFREE (accessing_symbol);
goto_actions ();
XFREE (goto_map + ntokens);
@@ -1288,21 +1251,6 @@ output_program (void)
}
static void
free_itemsets (void)
{
core *cp, *cptmp;
XFREE (state_table);
for (cp = first_state; cp; cp = cptmp)
{
cptmp = cp->next;
XFREE (cp);
}
}
/*----------------------------------------------------------.
| Output the parsing tables and the parser code to ftable. |
`----------------------------------------------------------*/
@@ -1320,21 +1268,17 @@ output (void)
obstack_grow (&table_obstack, obstack_finish (&attrs_obstack), size);
}
reader_output_yylsp (&table_obstack);
if (debug_flag)
obstack_sgrow (&table_obstack, "\
obstack_fgrow1 (&table_obstack, "\
#ifndef YYDEBUG\n\
# define YYDEBUG 1\n\
# define YYDEBUG %d\n\
#endif\n\
\n");
\n", debug_flag);
if (semantic_parser)
obstack_fgrow1 (&table_obstack, "#include %s\n",
quotearg_style (c_quoting_style, attrsfile));
if (!no_parser_flag)
obstack_sgrow (&table_obstack, "#include <stdio.h>\n\n");
free_itemsets ();
LIST_FREE (core, first_state);
output_defines ();
output_token_translations ();
/* if (semantic_parser) */
@@ -1345,6 +1289,8 @@ output (void)
output_stos ();
output_rule_data ();
output_actions ();
XFREE (state_table);
if (!no_parser_flag)
output_parser ();
output_program ();
+112 -114
View File
@@ -1,5 +1,5 @@
/* Print information on generated parser, for bison,
Copyright 1984, 1986, 1989, 2000 Free Software Foundation, Inc.
Copyright 1984, 1986, 1989, 2000, 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -29,6 +29,8 @@
#include "state.h"
#include "reader.h"
#include "print.h"
#include "reduce.h"
#include "closure.h"
#if 0
static void
@@ -47,65 +49,60 @@ static void
print_core (FILE *out, int state)
{
int i;
int k;
int rule;
core *statep;
short *sp;
short *sp1;
short *sitems = state_table[state].state->items;
int snitems = state_table[state].state->nitems;
statep = state_table[state];
k = statep->nitems;
if (k == 0)
return;
for (i = 0; i < k; i++)
/* New experimental feature: if TRACE_FLAGS output all the items of
a state, not only its kernel. */
if (trace_flag)
{
sp1 = sp = ritem + statep->items[i];
while (*sp > 0)
sp++;
rule = -(*sp);
fprintf (out, " %s -> ", tags[rlhs[rule]]);
for (sp = ritem + rrhs[rule]; sp < sp1; sp++)
{
fprintf (out, "%s ", tags[*sp]);
}
fputc ('.', out);
while (*sp > 0)
{
fprintf (out, " %s", tags[*sp]);
sp++;
}
fprintf (out, _(" (rule %d)"), rule);
fputc ('\n', out);
closure (sitems, snitems);
sitems = itemset;
snitems = nitemset;
}
fputc ('\n', out);
if (snitems)
{
for (i = 0; i < snitems; i++)
{
short *sp;
short *sp1;
int rule;
sp1 = sp = ritem + sitems[i];
while (*sp > 0)
sp++;
rule = -(*sp);
fprintf (out, " %s -> ", tags[rule_table[rule].lhs]);
for (sp = ritem + rule_table[rule].rhs; sp < sp1; sp++)
fprintf (out, "%s ", tags[*sp]);
fputc ('.', out);
for (/* Nothing */; *sp > 0; ++sp)
fprintf (out, " %s", tags[*sp]);
fprintf (out, _(" (rule %d)"), rule);
fputc ('\n', out);
}
fputc ('\n', out);
}
}
static void
print_actions (FILE *out, int state)
{
int i;
int k;
int state1;
int symbol;
shifts *shiftp;
errs *errp;
reductions *redp;
int rule;
shiftp = shift_table[state];
redp = reduction_table[state];
errp = err_table[state];
shifts *shiftp = state_table[state].shifts;
reductions *redp = state_table[state].reductions;
errs *errp = state_table[state].errs;
if (!shiftp && !redp)
if (!shiftp->nshifts && !redp)
{
if (final_state == state)
fprintf (out, _(" $default\taccept\n"));
@@ -114,48 +111,34 @@ print_actions (FILE *out, int state)
return;
}
if (shiftp)
{
k = shiftp->nshifts;
for (i = 0; i < shiftp->nshifts; i++)
if (!SHIFT_IS_DISABLED (shiftp, i))
{
int state1 = shiftp->shifts[i];
int symbol = state_table[state1].accessing_symbol;
/* The following line used to be turned off. */
if (ISVAR (symbol))
break;
if (symbol == 0) /* I.e. strcmp(tags[symbol],"$")==0 */
fprintf (out,
_(" $ \tgo to state %d\n"), state1);
else
fprintf (out,
_(" %-4s\tshift, and go to state %d\n"),
tags[symbol], state1);
}
for (i = 0; i < k; i++)
{
if (!shiftp->shifts[i])
continue;
state1 = shiftp->shifts[i];
symbol = accessing_symbol[state1];
/* The following line used to be turned off. */
if (ISVAR (symbol))
break;
if (symbol == 0) /* I.e. strcmp(tags[symbol],"$")==0 */
fprintf (out,
_(" $ \tgo to state %d\n"), state1);
else
fprintf (out,
_(" %-4s\tshift, and go to state %d\n"),
tags[symbol], state1);
}
if (i > 0)
fputc ('\n', out);
}
else
{
i = 0;
k = 0;
}
if (i > 0)
fputc ('\n', out);
if (errp)
{
int j, nerrs;
nerrs = errp->nerrs;
for (j = 0; j < nerrs; j++)
int j;
for (j = 0; j < errp->nerrs; j++)
{
if (!errp->errs[j])
int symbol = errp->errs[j];
if (!symbol)
continue;
symbol = errp->errs[j];
fprintf (out, _(" %-4s\terror (nonassociative)\n"),
tags[symbol]);
}
@@ -164,29 +147,28 @@ print_actions (FILE *out, int state)
fputc ('\n', out);
}
if (consistent[state] && redp)
if (state_table[state].consistent && redp)
{
rule = redp->rules[0];
symbol = rlhs[rule];
int rule = redp->rules[0];
int symbol = rule_table[rule].lhs;
fprintf (out, _(" $default\treduce using rule %d (%s)\n\n"),
rule, tags[symbol]);
}
else if (redp)
{
print_reductions (state);
print_reductions (out, state);
}
if (i < k)
if (i < shiftp->nshifts)
{
for (; i < k; i++)
{
if (!shiftp->shifts[i])
continue;
state1 = shiftp->shifts[i];
symbol = accessing_symbol[state1];
fprintf (out, _(" %-4s\tgo to state %d\n"),
tags[symbol], state1);
}
for (; i < shiftp->nshifts; i++)
if (!SHIFT_IS_DISABLED (shiftp, i))
{
int state1 = shiftp->shifts[i];
int symbol = state_table[state1].accessing_symbol;
fprintf (out, _(" %-4s\tgo to state %d\n"),
tags[symbol], state1);
}
fputc ('\n', out);
}
@@ -195,11 +177,11 @@ print_actions (FILE *out, int state)
static void
print_state (FILE *out, int state)
{
fputs ("\n\n", out);
fprintf (out, _("state %d"), state);
fputs ("\n\n", out);
print_core (out, state);
print_actions (out, state);
fputs ("\n\n", out);
}
/*-----------------------------------------.
@@ -226,22 +208,27 @@ print_grammar (FILE *out)
int column = 0;
/* rule # : LHS -> RHS */
fprintf (out, "\n%s\n", _("Grammar"));
fprintf (out, "%s\n\n", _("Grammar"));
fprintf (out, " %s\n", _("Number, Line, Rule"));
for (i = 1; i <= nrules; i++)
/* Don't print rules disabled in reduce_grammar_tables. */
if (rlhs[i] >= 0)
if (rule_table[i].useful)
{
fprintf (out, _("rule %-4d %s ->"), i, tags[rlhs[i]]);
rule = &ritem[rrhs[i]];
fprintf (out, _(" %3d %3d %s ->"),
i, rule_table[i].line, tags[rule_table[i].lhs]);
rule = &ritem[rule_table[i].rhs];
if (*rule > 0)
while (*rule > 0)
fprintf (out, " %s", tags[*rule++]);
else
fprintf (out, " /* %s */\n", _("empty"));
fprintf (out, " /* %s */", _("empty"));
fputc ('\n', out);
}
fputs ("\n\n", out);
/* TERMINAL (type #) : rule #s terminal is on RHS */
fprintf (out, "\n%s\n\n", _("Terminals, with rules where they appear"));
fprintf (out, "%s\n\n", _("Terminals, with rules where they appear"));
fprintf (out, "%s (-1)\n", tags[0]);
for (i = 0; i <= max_user_token_number; i++)
@@ -254,7 +241,7 @@ print_grammar (FILE *out)
sprintf (buffer, " (%d)", i);
for (j = 1; j <= nrules; j++)
for (rule = &ritem[rrhs[j]]; *rule > 0; rule++)
for (rule = &ritem[rule_table[j].rhs]; *rule > 0; rule++)
if (*rule == token_translations[i])
{
END_TEST (65);
@@ -263,18 +250,19 @@ print_grammar (FILE *out)
}
fprintf (out, "%s\n", buffer);
}
fputs ("\n\n", out);
fprintf (out, "\n%s\n\n",
_("Nonterminals, with rules where they appear"));
fprintf (out, "%s\n\n", _("Nonterminals, with rules where they appear"));
for (i = ntokens; i <= nsyms - 1; i++)
{
int left_count = 0, right_count = 0;
for (j = 1; j <= nrules; j++)
{
if (rlhs[j] == i)
if (rule_table[j].lhs == i)
left_count++;
for (rule = &ritem[rrhs[j]]; *rule > 0; rule++)
for (rule = &ritem[rule_table[j].rhs]; *rule > 0; rule++)
if (*rule == i)
{
right_count++;
@@ -296,7 +284,7 @@ print_grammar (FILE *out)
for (j = 1; j <= nrules; j++)
{
END_TEST (65);
if (rlhs[j] == i)
if (rule_table[j].lhs == i)
sprintf (buffer + strlen (buffer), " %d", j);
}
}
@@ -309,7 +297,7 @@ print_grammar (FILE *out)
sprintf (buffer + strlen (buffer), _(" on right:"));
for (j = 1; j <= nrules; j++)
{
for (rule = &ritem[rrhs[j]]; *rule > 0; rule++)
for (rule = &ritem[rule_table[j].rhs]; *rule > 0; rule++)
if (*rule == i)
{
END_TEST (65);
@@ -320,6 +308,7 @@ print_grammar (FILE *out)
}
fprintf (out, "%s\n", buffer);
}
fputs ("\n\n", out);
}
void
@@ -335,14 +324,23 @@ print_results (void)
size_t size = obstack_object_size (&output_obstack);
fwrite (obstack_finish (&output_obstack), 1, size, out);
if (size)
fputs ("\n\n", out);
if (any_conflicts)
print_conflicts (out);
reduce_output (out);
conflicts_output (out);
print_grammar (out);
/* New experimental feature: output all the items of a state,
not only its kernel. Requires to run closure, which need
memory allocation/deallocation. */
if (trace_flag)
new_closure (nitems);
for (i = 0; i < nstates; i++)
print_state (out, i);
if (trace_flag)
free_closure ();
xfclose (out);
}
+84 -121
View File
@@ -31,42 +31,25 @@
#include "obstack.h"
#include "print_graph.h"
#include "vcg.h"
#include "quotearg.h"
static graph_t graph;
static FILE *fgraph = NULL;
static size_t node_output_size = 0;
/* Return an unambiguous printable representated, allocated in slot 0,
for NAME, suitable for C strings. */
static char const *
quote (char const *name)
{
return quotearg_n_style (0, escape_quoting_style, name);
}
/* This part will construct the label of nodes. */
static void
print_core (int state, struct obstack *node_obstack)
{
int i;
int k;
int rule;
core *statep;
short *sp;
short *sp1;
core *statep = state_table[state].state;
statep = state_table[state];
k = statep->nitems;
if (k == 0)
if (!statep->nitems)
return;
for (i = 0; i < k; i++)
for (i = 0; i < statep->nitems; i++)
{
if (i)
obstack_sgrow (node_obstack, "\\n");
short *sp;
short *sp1;
int rule;
sp1 = sp = ritem + statep->items[i];
@@ -75,87 +58,75 @@ print_core (int state, struct obstack *node_obstack)
rule = -(*sp);
if (i)
obstack_1grow (node_obstack, '\n');
obstack_fgrow1 (node_obstack, "%d: ", rule);
obstack_fgrow1 (node_obstack, " %s -> ", quote (tags[rlhs[rule]]));
obstack_fgrow1 (node_obstack, " %s -> ",
tags[rule_table[rule].lhs]);
for (sp = ritem + rrhs[rule]; sp < sp1; sp++)
obstack_fgrow1 (node_obstack, "%s ", quote (tags[*sp]));
for (sp = ritem + rule_table[rule].rhs; sp < sp1; sp++)
obstack_fgrow1 (node_obstack, "%s ", tags[*sp]);
obstack_1grow (node_obstack, '.');
while (*sp > 0)
obstack_fgrow1 (node_obstack, " %s", quote (tags[*sp++]));
for (/* Nothing */; *sp > 0; ++sp)
obstack_fgrow1 (node_obstack, " %s", tags[*sp]);
}
}
/* Output in graph_obstack edges specifications in incidence with current
node. */
/*---------------------------------------------------------------.
| Output in graph_obstack edges specifications in incidence with |
| current node. |
`---------------------------------------------------------------*/
static void
print_actions (int state, const char *node_name, struct obstack *node_obstack)
print_actions (int state, const char *node_name)
{
int i;
int k;
int state1;
int symbol;
shifts *shiftp;
errs *errp;
reductions *redp;
int rule;
shifts *shiftp = state_table[state].shifts;
reductions *redp = state_table[state].reductions;
#if 0
errs *errp = err_table[state];
#endif
static char buff[10];
edge_t edge;
shiftp = shift_table[state];
redp = reduction_table[state];
errp = err_table[state];
if (!shiftp && !redp)
if (!shiftp->nshifts && !redp)
{
#if 0
if (final_state == state)
obstack_sgrow (node_obstack, "$default: accept");
else
obstack_sgrow (node_obstack, "NO ACTIONS");
#endif
return;
}
if (shiftp)
{
k = shiftp->nshifts;
for (i = 0; i < shiftp->nshifts; i++)
if (!SHIFT_IS_DISABLED (shiftp, i))
{
int state1 = shiftp->shifts[i];
int symbol = state_table[state1].accessing_symbol;
for (i = 0; i < k; i++)
{
if (!shiftp->shifts[i])
continue;
state1 = shiftp->shifts[i];
symbol = accessing_symbol[state1];
new_edge (&edge);
if (ISVAR (symbol))
break;
{
new_edge (&edge);
if (state > state1)
edge.type = back_edge;
open_edge (&edge, fgraph);
/* The edge source is the current node. */
edge.sourcename = node_name;
sprintf (buff, "%d", state1);
edge.targetname = buff;
edge.color = (symbol == 0) ? red : blue;
/* FIXME: Be aware that quote uses static memory. The string
must be output immediately (which is the case here). */
edge.label = tags[symbol] ? quote (tags[symbol]) : NULL;
output_edge (&edge, fgraph);
close_edge (fgraph);
}
}
}
else
{
i = 0;
k = 0;
}
if (state > state1)
edge.type = back_edge;
open_edge (&edge, fgraph);
/* The edge source is the current node. */
edge.sourcename = node_name;
sprintf (buff, "%d", state1);
edge.targetname = buff;
edge.color = (symbol == 0) ? red : blue;
edge.label = tags[symbol];
output_edge (&edge, fgraph);
close_edge (fgraph);
}
#if 0
if (errp)
{
int j, nerrs;
@@ -168,34 +139,36 @@ print_actions (int state, const char *node_name, struct obstack *node_obstack)
continue;
symbol = errp->errs[j];
/* If something has been added in the NODE_OBSTACK after
the declaration of the label, then we need a `\n'. */
the declaration of the label, then we need a `\n'.
if (obstack_object_size (node_obstack) > node_output_size)
obstack_sgrow (node_obstack, "\\n");
obstack_sgrow (node_obstack, "\n");
*/
obstack_fgrow1 (node_obstack, _("%-4s\terror (nonassociative)"),
tags[symbol]);
}
if (j > 0)
obstack_sgrow (node_obstack, "\\n");
obstack_1grow (node_obstack, '\n');
}
if (consistent[state] && redp)
if (state_table[state].consistent && redp)
{
rule = redp->rules[0];
symbol = rlhs[rule];
symbol = rule_table[rule].lhs;
/*
if (obstack_object_size (node_obstack) > node_output_size)
obstack_sgrow (node_obstack, "\\n");
obstack_sgrow (node_obstack, "\n");
*/
obstack_fgrow2 (node_obstack, _("$default\treduce using rule %d (%s)"),
rule, tags[symbol]);
}
#endif
if (i < k)
{
for (; i < k; i++)
if (i < shiftp->nshifts)
for (; i < shiftp->nshifts; i++)
if (!SHIFT_IS_DISABLED (shiftp, i))
{
if (!shiftp->shifts[i])
continue;
state1 = shiftp->shifts[i];
symbol = accessing_symbol[state1];
int state1 = shiftp->shifts[i];
int symbol = state_table[state1].accessing_symbol;
new_edge (&edge);
open_edge (&edge, fgraph);
@@ -203,15 +176,18 @@ print_actions (int state, const char *node_name, struct obstack *node_obstack)
sprintf (buff, "%d", state1);
edge.targetname = buff;
edge.color = red;
edge.label = tags[symbol] ? quote (tags[symbol]) : NULL;
edge.label = tags[symbol];
output_edge (&edge, fgraph);
close_edge (fgraph);
}
}
}
/* Output in GRAPH_OBSTACK the current node specifications and edges
which go out from that node. */
/*-------------------------------------------------------------.
| Output in FGRAPH the current node specifications and exiting |
| edges. |
`-------------------------------------------------------------*/
static void
print_state (int state)
{
@@ -219,35 +195,22 @@ print_state (int state)
struct obstack node_obstack;
node_t node;
/* The labels of the nodes are their the items. */
obstack_init (&node_obstack);
new_node (&node); /* Set node attributs default value. */
new_node (&node);
sprintf (name, "%d", state);
node.title = name; /* Give a name to the node. */
{
/* Here we begin to compute the node label. */
obstack_sgrow (&node_obstack, "\t\tlabel:\t\""); /* Open Label */
/* Keep the size of NODE_OBSTACK before computing the label. It is
useful to format the label. */
node_output_size = obstack_object_size (&node_obstack);
/* Compute the labels of nodes on the fly. */
print_core (state, &node_obstack);
/* Compute edges and additionnal parts of node label. */
print_actions (state, node.title, &node_obstack);
obstack_sgrow (&node_obstack, "\"\n"); /* Close Label. */
}
node.title = name;
print_core (state, &node_obstack);
obstack_1grow (&node_obstack, '\0');
node.label = obstack_finish (&node_obstack);
open_node (fgraph);
/* Output a VCG formatted attributs list. */
output_node (&node, fgraph);
/* Save the node label. */
fwrite (obstack_base (&node_obstack),
obstack_object_size (&node_obstack), 1, fgraph);
close_node (fgraph);
/* Output the edges. */
print_actions (state, name);
obstack_free (&node_obstack, 0);
}
@@ -256,7 +219,7 @@ void
print_graph (void)
{
int i;
if (!graph_flag)
return;
@@ -267,7 +230,7 @@ print_graph (void)
#if 0
graph.smanhattan_edges = yes;
graph.manhattan_edges = yes;
graph.manhattan_edges = yes;
#endif
graph.display_edge_labels = yes;
@@ -285,8 +248,8 @@ print_graph (void)
open_graph (fgraph);
output_graph (&graph, fgraph);
/* Output nodes and edges. */
for (i = 0; i < nstates; i++)
/* Output nodes & edges. */
print_state (i);
/* Close graph. */
+198 -138
View File
@@ -1,5 +1,5 @@
/* Input parser for bison
Copyright 1984, 1986, 1989, 1992, 1998, 2000
Copyright 1984, 1986, 1989, 1992, 1998, 2000, 2001
Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -34,13 +34,11 @@
#include "reader.h"
#include "conflicts.h"
/* Number of slots allocated (but not necessarily used yet) in `rline' */
static int rline_allocated;
typedef struct symbol_list
{
struct symbol_list *next;
bucket *sym;
int line;
bucket *ruleprec;
}
symbol_list;
@@ -64,6 +62,19 @@ static int lastprec;
static bucket *errtoken;
static bucket *undeftoken;
static symbol_list *
symbol_list_new (bucket *sym)
{
symbol_list *res = XMALLOC (symbol_list, 1);
res->next = NULL;
res->sym = sym;
res->line = lineno;
res->ruleprec = NULL;
return res;
}
/*===================\
@@ -121,7 +132,7 @@ read_signed_integer (FILE *stream)
`--------------------------------------------------------------*/
static char *
get_type_name (int n, symbol_list * rule)
get_type_name (int n, symbol_list *rule)
{
int i;
symbol_list *rp;
@@ -293,13 +304,15 @@ copy_comment (FILE *fin, struct obstack *oout)
/*-----------------------------------------------------------------.
| FIN is pointing to a location (i.e., a `@'). Output to OOUT a |
| reference to this location. STACK_OFFSET is the number of values |
| in the current rule so far, which says where to find `$0' with |
| in the current rule so far, which says where to find `@0' with |
| respect to the top of the stack. |
`-----------------------------------------------------------------*/
static inline void
copy_at (FILE *fin, struct obstack *oout, int stack_offset)
copy_at (FILE *fin, struct obstack *oout,
struct symbol_list *rule, int stack_offset)
{
symbol_list *rp;
int c;
c = getc (fin);
@@ -310,11 +323,25 @@ copy_at (FILE *fin, struct obstack *oout, int stack_offset)
}
else if (isdigit (c) || c == '-')
{
int n;
int n, i;
ungetc (c, fin);
n = read_signed_integer (fin);
rp = rule;
i = 0;
while (i < n)
{
rp = rp->next;
if (rp == NULL)
{
complain (_("invalid @ value"));
return;
}
i++;
}
obstack_fgrow1 (oout, "yylsp[%d]", n - stack_offset);
locations_flag = 1;
}
@@ -539,7 +566,8 @@ parse_token_decl (symbol_class what_is, symbol_class what_is_not)
else
{
complain (_("`%s' is invalid in %s"),
token_buffer, (what_is == token_sym) ? "%token" : "%nterm");
token_buffer,
(what_is == token_sym) ? "%token" : "%nterm");
skip_to_char ('%');
}
}
@@ -695,7 +723,6 @@ token_buffer);
}
prev = t;
}
}
@@ -712,6 +739,13 @@ parse_union_decl (void)
{
int c;
int count = 0;
const char *prologue = "\
#ifndef YYSTYPE\n\
typedef union";
const char *epilogue = "\
yystype;\n\
# define YYSTYPE yystype\n\
#endif\n";
if (typed)
complain (_("multiple %s declarations"), "%union");
@@ -724,9 +758,9 @@ parse_union_decl (void)
else
obstack_1grow (&attrs_obstack, '\n');
obstack_sgrow (&attrs_obstack, "typedef union");
obstack_sgrow (&attrs_obstack, prologue);
if (defines_flag)
obstack_sgrow (&defines_obstack, "typedef union");
obstack_sgrow (&defines_obstack, prologue);
c = getc (finput);
@@ -761,9 +795,9 @@ parse_union_decl (void)
count--;
if (count <= 0)
{
obstack_sgrow (&attrs_obstack, " YYSTYPE;\n");
obstack_sgrow (&attrs_obstack, epilogue);
if (defines_flag)
obstack_sgrow (&defines_obstack, " YYSTYPE;\n");
obstack_sgrow (&defines_obstack, epilogue);
/* JF don't choke on trailing semi */
c = skip_white_space ();
if (c != ';')
@@ -821,7 +855,7 @@ parse_thong_decl (void)
token_t token;
struct bucket *symbol;
char *typename = 0;
int usrtoknum;
int usrtoknum = SUNDEF;
token = lex (); /* fetch typename or first token */
if (token == tok_typename)
@@ -852,8 +886,6 @@ parse_thong_decl (void)
usrtoknum = numval;
token = lex (); /* okay, did number, now get literal */
}
else
usrtoknum = 0;
/* process literal string token */
@@ -875,10 +907,11 @@ parse_thong_decl (void)
}
/*-----------------------------------------------------------------------------.
| Parse a double quoted parameter. It was used for %{source,header}_extension. |
| For the moment, It is not used since extension features have been removed. |
`-----------------------------------------------------------------------------*/
/*------------------------------------------------------------------.
| Parse a double quoted parameter. It was used for |
| %{source,header}_extension. For the moment, It is not used since |
| extension features have been removed. |
`------------------------------------------------------------------*/
#if 0
@@ -938,16 +971,13 @@ parse_dquoted_param (const char *from)
static void
read_declarations (void)
{
int c;
int tok;
for (;;)
{
c = skip_white_space ();
int c = skip_white_space ();
if (c == '%')
{
tok = parse_percent_token ();
token_t tok = parse_percent_token ();
switch (tok)
{
@@ -1001,6 +1031,13 @@ read_declarations (void)
case tok_noop:
break;
case tok_stropt:
case tok_intopt:
case tok_obsolete:
abort ();
break;
case tok_illegal:
default:
complain (_("unrecognized: %s"), token_buffer);
skip_to_char ('%');
@@ -1082,7 +1119,7 @@ copy_action (symbol_list *rule, int stack_offset)
case '@':
copy_at (finput, &action_obstack,
stack_offset);
rule, stack_offset);
break;
case EOF:
@@ -1104,7 +1141,13 @@ copy_action (symbol_list *rule, int stack_offset)
}
}
obstack_sgrow (&action_obstack, ";\n break;}");
/* As a Bison extension, add the ending semicolon. Since some Yacc
don't do that, help people using bison as a Yacc finding their
missing semicolons. */
if (yacc_flag)
obstack_sgrow (&action_obstack, "}\n break;");
else
obstack_sgrow (&action_obstack, ";\n break;}");
}
/*-------------------------------------------------------------------.
@@ -1176,7 +1219,7 @@ copy_guard (symbol_list *rule, int stack_offset)
break;
case '@':
copy_at (finput, &guard_obstack, stack_offset);
copy_at (finput, &guard_obstack, rule, stack_offset);
break;
case EOF:
@@ -1206,20 +1249,6 @@ copy_guard (symbol_list *rule, int stack_offset)
}
static void
record_rule_line (void)
{
/* Record each rule's source line number in rline table. */
if (nrules >= rline_allocated)
{
rline_allocated = nrules * 2;
rline = XREALLOC (rline, short, rline_allocated);
}
rline[nrules] = lineno;
}
/*-------------------------------------------------------------------.
| Generate a dummy symbol, a nonterminal, whose name cannot conflict |
| with the user's names. |
@@ -1362,10 +1391,7 @@ readgram (void)
nrules++;
nitems++;
record_rule_line ();
p = XCALLOC (symbol_list, 1);
p->sym = lhs;
p = symbol_list_new (lhs);
crule1 = p1;
if (p1)
@@ -1414,7 +1440,10 @@ readgram (void)
unlex (t1);
symval = ssave;
if (t1 == tok_colon)
break;
{
warn (_("previous rule lacks an ending `;'"));
break;
}
if (!first_rhs) /* JF */
first_rhs = symval;
@@ -1427,36 +1456,35 @@ readgram (void)
non-terminal. */
if (action_flag)
{
bucket *sdummy;
/* Since the action was written out with this rule's
number, we must give the new rule this number by
inserting the new rule before it. */
/* Make a dummy nonterminal, a gensym. */
sdummy = gensym ();
bucket *sdummy = gensym ();
/* Make a new rule, whose body is empty,
before the current one, so that the action
just read can belong to it. */
/* Make a new rule, whose body is empty, before the
current one, so that the action just read can
belong to it. */
nrules++;
nitems++;
record_rule_line ();
p = XCALLOC (symbol_list, 1);
p = symbol_list_new (sdummy);
/* Attach its lineno to that of the host rule. */
p->line = crule->line;
if (crule1)
crule1->next = p;
else
grammar = p;
p->sym = sdummy;
crule1 = XCALLOC (symbol_list, 1);
p->next = crule1;
/* End of the rule. */
crule1 = symbol_list_new (NULL);
crule1->next = crule;
p->next = crule1;
/* Insert the dummy generated by that rule into this
rule. */
nitems++;
p = XCALLOC (symbol_list, 1);
p->sym = sdummy;
p = symbol_list_new (sdummy);
p1->next = p;
p1 = p;
@@ -1466,8 +1494,7 @@ readgram (void)
if (t == tok_identifier)
{
nitems++;
p = XCALLOC (symbol_list, 1);
p->sym = symval;
p = symbol_list_new (symval);
p1->next = p;
p1 = p;
}
@@ -1481,7 +1508,7 @@ readgram (void)
} /* end of read rhs of rule */
/* Put an empty link in the list to mark the end of this rule */
p = XCALLOC (symbol_list, 1);
p = symbol_list_new (NULL);
p1->next = p;
p1 = p;
@@ -1525,6 +1552,8 @@ readgram (void)
/* Warn if there is no default for $$ but we need one. */
else if (!xactions && !first_rhs && lhs->type_name != 0)
complain (_("empty rule for typed nonterminal, and no action"));
if (t == tok_two_percents || t == tok_eof)
warn (_("previous rule lacks an ending `;'"));
if (t == tok_semicolon)
t = lex ();
}
@@ -1663,6 +1692,89 @@ output_token_defines (struct obstack *oout)
}
/*--------------------.
| Output the header. |
`--------------------*/
static void
symbols_output (void)
{
if (defines_flag)
{
output_token_defines (&defines_obstack);
if (!pure_parser)
{
if (spec_name_prefix)
obstack_fgrow1 (&defines_obstack, "\nextern YYSTYPE %slval;\n",
spec_name_prefix);
else
obstack_sgrow (&defines_obstack,
"\nextern YYSTYPE yylval;\n");
}
if (semantic_parser)
{
int i;
for (i = ntokens; i < nsyms; i++)
{
/* don't make these for dummy nonterminals made by gensym. */
if (*tags[i] != '@')
obstack_fgrow2 (&defines_obstack,
"# define\tNT%s\t%d\n", tags[i], i);
}
#if 0
/* `fdefines' is now a temporary file, so we need to copy its
contents in `done', so we can't close it here. */
fclose (fdefines);
fdefines = NULL;
#endif
}
}
}
/*------------------------------------------------------------------.
| Set TOKEN_TRANSLATIONS. Check that no two symbols share the same |
| number. |
`------------------------------------------------------------------*/
static void
token_translations_init (void)
{
bucket *bp = NULL;
int i;
token_translations = XCALLOC (short, max_user_token_number + 1);
/* Initialize all entries for literal tokens to 2, the internal
token number for $undefined., which represents all invalid
inputs. */
for (i = 0; i <= max_user_token_number; i++)
token_translations[i] = 2;
for (bp = firstsymbol; bp; bp = bp->next)
{
/* Non-terminal? */
if (bp->value >= ntokens)
continue;
/* A token string alias? */
if (bp->user_token_number == SALIAS)
continue;
assert (bp->user_token_number != SUNDEF);
/* A token which translation has already been set? */
if (token_translations[bp->user_token_number] != 2)
complain (_("tokens %s and %s both assigned number %d"),
tags[token_translations[bp->user_token_number]],
bp->tag, bp->user_token_number);
token_translations[bp->user_token_number] = bp->value;
}
}
/*------------------------------------------------------------------.
| Assign symbol numbers, and write definition of token names into |
| FDEFINES. Set up vectors TAGS and SPREC of names and precedences |
@@ -1674,20 +1786,19 @@ packsymbols (void)
{
bucket *bp = NULL;
int tokno = 1;
int i, j;
int last_user_token_number;
static char DOLLAR[] = "$";
/* int lossage = 0; JF set but not used */
tags = XCALLOC (char *, nsyms + 1);
tags[0] = DOLLAR;
user_toknums = XCALLOC (short, nsyms + 1);
user_toknums[0] = 0;
sprec = XCALLOC (short, nsyms);
sassoc = XCALLOC (short, nsyms);
/* The EOF token. */
tags[0] = DOLLAR;
user_toknums[0] = 0;
max_user_token_number = 256;
last_user_token_number = 256;
@@ -1740,7 +1851,7 @@ packsymbols (void)
if (bp->class == token_sym)
{
if (!bp->user_token_number)
if (bp->user_token_number == SUNDEF)
bp->user_token_number = ++last_user_token_number;
if (bp->user_token_number > max_user_token_number)
max_user_token_number = bp->user_token_number;
@@ -1752,26 +1863,7 @@ packsymbols (void)
sassoc[bp->value] = bp->assoc;
}
token_translations = XCALLOC (short, max_user_token_number + 1);
/* initialize all entries for literal tokens to 2, the internal
token number for $undefined., which represents all invalid
inputs. */
for (j = 0; j <= max_user_token_number; j++)
token_translations[j] = 2;
for (bp = firstsymbol; bp; bp = bp->next)
{
if (bp->value >= ntokens)
continue; /* non-terminal */
if (bp->user_token_number == SALIAS)
continue;
if (token_translations[bp->user_token_number] != 2)
complain (_("tokens %s and %s both assigned number %d"),
tags[token_translations[bp->user_token_number]],
bp->tag, bp->user_token_number);
token_translations[bp->user_token_number] = bp->value;
}
token_translations_init ();
error_token_number = errtoken->value;
@@ -1784,36 +1876,6 @@ packsymbols (void)
fatal (_("the start symbol %s is a token"), startval->tag);
start_symbol = startval->value;
if (defines_flag)
{
output_token_defines (&defines_obstack);
if (!pure_parser)
{
if (spec_name_prefix)
obstack_fgrow1 (&defines_obstack, "\nextern YYSTYPE %slval;\n",
spec_name_prefix);
else
obstack_sgrow (&defines_obstack,
"\nextern YYSTYPE yylval;\n");
}
if (semantic_parser)
for (i = ntokens; i < nsyms; i++)
{
/* don't make these for dummy nonterminals made by gensym. */
if (*tags[i] != '@')
obstack_fgrow2 (&defines_obstack,
"# define\tNT%s\t%d\n", tags[i], i);
}
#if 0
/* `fdefines' is now a temporary file, so we need to copy its
contents in `done', so we can't close it here. */
fclose (fdefines);
fdefines = NULL;
#endif
}
}
@@ -1829,14 +1891,8 @@ packgram (void)
int ruleno;
symbol_list *p;
bucket *ruleprec;
ritem = XCALLOC (short, nitems + 1);
rlhs = XCALLOC (short, nrules) - 1;
rrhs = XCALLOC (short, nrules) - 1;
rprec = XCALLOC (short, nrules) - 1;
rprecsym = XCALLOC (short, nrules) - 1;
rassoc = XCALLOC (short, nrules) - 1;
rule_table = XCALLOC (rule_t, nrules) - 1;
itemno = 0;
ruleno = 1;
@@ -1844,9 +1900,11 @@ packgram (void)
p = grammar;
while (p)
{
rlhs[ruleno] = p->sym->value;
rrhs[ruleno] = itemno;
ruleprec = p->ruleprec;
bucket *ruleprec = p->ruleprec;
rule_table[ruleno].lhs = p->sym->value;
rule_table[ruleno].rhs = itemno;
rule_table[ruleno].line = p->line;
rule_table[ruleno].useful = TRUE;
p = p->next;
while (p && p->sym)
@@ -1856,8 +1914,8 @@ packgram (void)
of the last token in it. */
if (p->sym->class == token_sym)
{
rprec[ruleno] = p->sym->prec;
rassoc[ruleno] = p->sym->assoc;
rule_table[ruleno].prec = p->sym->prec;
rule_table[ruleno].assoc = p->sym->assoc;
}
if (p)
p = p->next;
@@ -1867,9 +1925,9 @@ packgram (void)
the specified symbol's precedence replaces the default. */
if (ruleprec)
{
rprec[ruleno] = ruleprec->prec;
rassoc[ruleno] = ruleprec->assoc;
rprecsym[ruleno] = ruleprec->value;
rule_table[ruleno].prec = ruleprec->prec;
rule_table[ruleno].assoc = ruleprec->assoc;
rule_table[ruleno].precsym = ruleprec->value;
}
ritem[itemno++] = -ruleno;
@@ -1880,6 +1938,9 @@ packgram (void)
}
ritem[itemno] = 0;
if (trace_flag)
ritem_print (stderr);
}
/*-------------------------------------------------------------------.
@@ -1900,8 +1961,6 @@ reader (void)
nvars = 0;
nrules = 0;
nitems = 0;
rline_allocated = 10;
rline = XCALLOC (short, rline_allocated);
typed = 0;
lastprec = 0;
@@ -1929,7 +1988,6 @@ reader (void)
/* Read the declaration section. Copy %{ ... %} groups to
TABLE_OBSTACK and FDEFINES file. Also notice any %token, %left,
etc. found there. */
obstack_1grow (&table_obstack, '\n');
obstack_fgrow3 (&table_obstack, "\
/* %s, made from %s\n\
by GNU bison %s. */\n\
@@ -1958,6 +2016,8 @@ reader (void)
packsymbols ();
/* Convert the grammar into the format described in gram.h. */
packgram ();
/* Output the headers. */
symbols_output ();
}
+245 -233
View File
@@ -1,5 +1,5 @@
/* Grammar reduction for Bison.
Copyright 1988, 1989, 2000 Free Software Foundation, Inc.
Copyright 1988, 1989, 2000, 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -38,16 +38,23 @@ typedef unsigned *BSet;
typedef short *rule;
/* N is set of all nonterminals which are not useless. P is set of
all rules which have no useless nonterminals in their RHS. V is
the set of all accessible symbols. */
/* Set of all nonterminals which are not useless. */
static BSet N;
static BSet N, P, V, V1;
/* Set of all rules which have no useless nonterminals in their RHS. */
static BSet P;
/* Set of all accessible symbols. */
static BSet V;
/* Set of symbols used to define rule precedence (so they are
`useless', but no warning should be issued). */
static BSet V1;
static int nuseful_productions;
static int nuseless_productions;
static int nuseful_nonterminals;
static int nuseless_nonterminals;
int nuseless_nonterminals;
static bool
bits_equal (BSet L, BSet R, int n)
@@ -100,7 +107,7 @@ useful_production (int i, BSet N0)
/* A production is useful if all of the nonterminals in its appear
in the set of useful nonterminals. */
for (r = &ritem[rrhs[i]]; *r > 0; r++)
for (r = &ritem[rule_table[i].rhs]; *r > 0; r++)
if (ISVAR (n = *r))
if (!BITISSET (N0, n - ntokens))
return FALSE;
@@ -149,7 +156,7 @@ useless_nonterminals (void)
{
if (useful_production (i, N))
{
SETBIT (Np, rlhs[i] - ntokens);
SETBIT (Np, rule_table[i].lhs - ntokens);
SETBIT (P, i);
}
}
@@ -200,38 +207,33 @@ inaccessable_symbols (void)
Pp = XCALLOC (unsigned, WORDSIZE (nrules + 1));
/* If the start symbol isn't useful, then nothing will be useful. */
if (!BITISSET (N, start_symbol - ntokens))
goto end_iteration;
SETBIT (V, start_symbol);
while (1)
if (BITISSET (N, start_symbol - ntokens))
{
for (i = WORDSIZE (nsyms) - 1; i >= 0; i--)
Vp[i] = V[i];
for (i = 1; i <= nrules; i++)
SETBIT (V, start_symbol);
while (1)
{
if (!BITISSET (Pp, i) && BITISSET (P, i) && BITISSET (V, rlhs[i]))
for (i = WORDSIZE (nsyms) - 1; i >= 0; i--)
Vp[i] = V[i];
for (i = 1; i <= nrules; i++)
{
for (r = &ritem[rrhs[i]]; *r >= 0; r++)
if (!BITISSET (Pp, i)
&& BITISSET (P, i)
&& BITISSET (V, rule_table[i].lhs))
{
if (ISTOKEN (t = *r) || BITISSET (N, t - ntokens))
{
for (r = &ritem[rule_table[i].rhs]; *r >= 0; r++)
if (ISTOKEN (t = *r) || BITISSET (N, t - ntokens))
SETBIT (Vp, t);
}
SETBIT (Pp, i);
}
SETBIT (Pp, i);
}
if (bits_equal (V, Vp, WORDSIZE (nsyms)))
break;
Vs = Vp;
Vp = V;
V = Vs;
}
if (bits_equal (V, Vp, WORDSIZE (nsyms)))
{
break;
}
Vs = Vp;
Vp = V;
V = Vs;
}
end_iteration:
XFREE (V);
V = Vp;
@@ -255,39 +257,46 @@ end_iteration:
/* A token that was used in %prec should not be warned about. */
for (i = 1; i < nrules; i++)
if (rprecsym[i] != 0)
SETBIT (V1, rprecsym[i]);
if (rule_table[i].precsym != 0)
SETBIT (V1, rule_table[i].precsym);
}
static void
reduce_grammar_tables (void)
{
/* This is turned off because we would need to change the numbers
in the case statements in the actions file. */
#if 0
/* remove useless productions */
if (nuseless_productions > 0)
{
short np, pn, ni, pi;
/* This is turned off because we would need to change the numbers in
the case statements in the actions file.
np = 0;
ni = 0;
for (pn = 1; pn <= nrules; pn++)
{
We don't disable it via CPP so that it is still checked with the
rest of the code, to avoid its becoming completely obsolete.
FIXME: I think the comment above demonstrates this code must be
turned off for *semantic* parser, not in the general case. Try
to understand this better --akim. */
if (0)
/* remove useless productions */
if (nuseless_productions > 0)
{
short np, pn, ni, pi;
np = 0;
ni = 0;
for (pn = 1; pn <= nrules; pn++)
if (BITISSET (P, pn))
{
np++;
if (pn != np)
{
rlhs[np] = rlhs[pn];
rline[np] = rline[pn];
rprec[np] = rprec[pn];
rassoc[np] = rassoc[pn];
rrhs[np] = rrhs[pn];
if (rrhs[np] != ni)
rule_table[np].lhs = rule_table[pn].lhs;
rule_table[np].line = rule_table[pn].line;
rule_table[np].prec = rule_table[pn].prec;
rule_table[np].assoc = rule_table[pn].assoc;
rule_table[np].rhs = rule_table[pn].rhs;
if (rule_table[np].rhs != ni)
{
pi = rrhs[np];
rrhs[np] = ni;
pi = rule_table[np].rhs;
rule_table[np].rhs = ni;
while (ritem[pi] >= 0)
ritem[ni++] = ritem[pi++];
ritem[ni++] = -np;
@@ -298,214 +307,220 @@ reduce_grammar_tables (void)
while (ritem[ni++] >= 0);
}
}
}
ritem[ni] = 0;
nrules -= nuseless_productions;
nitems = ni;
/* Is it worth it to reduce the amount of memory for the
grammar? Probably not. */
ritem[ni] = 0;
nrules -= nuseless_productions;
nitems = ni;
}
#endif /* 0 */
/* Disable useless productions,
since they may contain useless nonterms
that would get mapped below to -1 and confuse everyone. */
/* Is it worth it to reduce the amount of memory for the
grammar? Probably not. */
}
/* Disable useless productions. */
if (nuseless_productions > 0)
{
int pn;
for (pn = 1; pn <= nrules; pn++)
{
if (!BITISSET (P, pn))
{
rlhs[pn] = -1;
}
}
}
/* remove useless symbols */
if (nuseless_nonterminals > 0)
{
int i, n;
/* short j; JF unused */
short *nontermmap;
rule r;
/* Create a map of nonterminal number to new nonterminal
number. -1 in the map means it was useless and is being
eliminated. */
nontermmap = XCALLOC (short, nvars) - ntokens;
for (i = ntokens; i < nsyms; i++)
nontermmap[i] = -1;
n = ntokens;
for (i = ntokens; i < nsyms; i++)
if (BITISSET (V, i))
nontermmap[i] = n++;
/* Shuffle elements of tables indexed by symbol number. */
for (i = ntokens; i < nsyms; i++)
{
n = nontermmap[i];
if (n >= 0)
{
sassoc[n] = sassoc[i];
sprec[n] = sprec[i];
tags[n] = tags[i];
}
else
{
free (tags[i]);
}
}
/* Replace all symbol numbers in valid data structures. */
for (i = 1; i <= nrules; i++)
{
/* Ignore the rules disabled above. */
if (rlhs[i] >= 0)
rlhs[i] = nontermmap[rlhs[i]];
if (ISVAR (rprecsym[i]))
/* Can this happen? */
rprecsym[i] = nontermmap[rprecsym[i]];
}
for (r = ritem; *r; r++)
if (ISVAR (*r))
*r = nontermmap[*r];
start_symbol = nontermmap[start_symbol];
nsyms -= nuseless_nonterminals;
nvars -= nuseless_nonterminals;
free (&nontermmap[ntokens]);
rule_table[pn].useful = BITISSET (P, pn);
}
}
static void
print_results (void)
{
int i;
/* short j; JF unused */
rule r;
bool b;
/*------------------------------.
| Remove useless nonterminals. |
`------------------------------*/
static void
nonterminals_reduce (void)
{
int i, n;
rule r;
/* Map the nonterminals to their new index: useful first, useless
afterwards. Kept for later report. */
short *nontermmap = XCALLOC (short, nvars) - ntokens;
n = ntokens;
for (i = ntokens; i < nsyms; i++)
if (BITISSET (V, i))
nontermmap[i] = n++;
for (i = ntokens; i < nsyms; i++)
if (!BITISSET (V, i))
nontermmap[i] = n++;
/* Shuffle elements of tables indexed by symbol number. */
{
short *sassoc_sorted = XMALLOC (short, nvars) - ntokens;
short *sprec_sorted = XMALLOC (short, nvars) - ntokens;
char **tags_sorted = XMALLOC (char *, nvars) - ntokens;
for (i = ntokens; i < nsyms; i++)
{
n = nontermmap[i];
sassoc_sorted[n] = sassoc[i];
sprec_sorted[n] = sprec[i];
tags_sorted[n] = tags[i];
}
for (i = ntokens; i < nsyms; i++)
{
sassoc[i] = sassoc_sorted[i];
sprec[i] = sprec_sorted[i];
tags[i] = tags_sorted[i];
}
free (sassoc_sorted + ntokens);
free (sprec_sorted + ntokens);
free (tags_sorted + ntokens);
}
/* Replace all symbol numbers in valid data structures. */
for (i = 1; i <= nrules; i++)
{
rule_table[i].lhs = nontermmap[rule_table[i].lhs];
if (ISVAR (rule_table[i].precsym))
/* Can this happen? */
rule_table[i].precsym = nontermmap[rule_table[i].precsym];
}
for (r = ritem; *r; r++)
if (ISVAR (*r))
*r = nontermmap[*r];
start_symbol = nontermmap[start_symbol];
nsyms -= nuseless_nonterminals;
nvars -= nuseless_nonterminals;
free (nontermmap + ntokens);
}
/*------------------------------------------------------------------.
| Output the detailed results of the reductions. For FILE.output. |
`------------------------------------------------------------------*/
void
reduce_output (FILE *out)
{
if (nuseless_nonterminals > 0)
{
obstack_sgrow (&output_obstack, _("Useless nonterminals:"));
obstack_sgrow (&output_obstack, "\n\n");
for (i = ntokens; i < nsyms; i++)
if (!BITISSET (V, i))
obstack_fgrow1 (&output_obstack, " %s\n", tags[i]);
int i;
fprintf (out, "%s\n\n", _("Useless nonterminals:"));
for (i = 0; i < nuseless_nonterminals; ++i)
fprintf (out, " %s\n", tags[nsyms + i]);
fputs ("\n\n", out);
}
b = FALSE;
for (i = 0; i < ntokens; i++)
{
{
bool b = FALSE;
int i;
for (i = 0; i < ntokens; i++)
if (!BITISSET (V, i) && !BITISSET (V1, i))
{
if (!b)
{
obstack_sgrow (&output_obstack, "\n\n");
obstack_sgrow (&output_obstack,
_("Terminals which are not used:"));
obstack_sgrow (&output_obstack, "\n\n");
b = TRUE;
}
obstack_fgrow1 (&output_obstack, " %s\n", tags[i]);
fprintf (out, "%s\n\n", _("Terminals which are not used:"));
b = TRUE;
fprintf (out, " %s\n", tags[i]);
}
}
if (b)
fputs ("\n\n", out);
}
if (nuseless_productions > 0)
{
obstack_sgrow (&output_obstack, "\n\n");
obstack_sgrow (&output_obstack, _("Useless rules:"));
obstack_sgrow (&output_obstack, "\n\n");
int i;
fprintf (out, "%s\n\n", _("Useless rules:"));
for (i = 1; i <= nrules; i++)
{
if (!BITISSET (P, i))
{
obstack_fgrow1 (&output_obstack, "#%-4d ", i);
obstack_fgrow1 (&output_obstack, "%s :\t", tags[rlhs[i]]);
for (r = &ritem[rrhs[i]]; *r >= 0; r++)
obstack_fgrow1 (&output_obstack, " %s", tags[*r]);
obstack_sgrow (&output_obstack, ";\n");
}
}
if (!rule_table[i].useful)
{
rule r;
fprintf (out, "#%-4d ", i);
fprintf (out, "%s:", tags[rule_table[i].lhs]);
for (r = &ritem[rule_table[i].rhs]; *r >= 0; r++)
fprintf (out, " %s", tags[*r]);
fputs (";\n", out);
}
fputs ("\n\n", out);
}
if (nuseless_nonterminals > 0 || nuseless_productions > 0 || b)
obstack_sgrow (&output_obstack, "\n\n");
}
#if 0 /* XXX currently unused. */
static void
dump_grammar (void)
dump_grammar (FILE *out)
{
int i;
rule r;
obstack_fgrow5 (&output_obstack,
"ntokens = %d, nvars = %d, nsyms = %d, nrules = %d, nitems = %d\n\n",
ntokens, nvars, nsyms, nrules, nitems);
obstack_sgrow (&output_obstack,
_("Variables\n---------\n\n"));
obstack_sgrow (&output_obstack,
_("Value Sprec Sassoc Tag\n"));
fprintf (out, "REDUCED GRAMMAR\n\n");
fprintf (out,
"ntokens = %d, nvars = %d, nsyms = %d, nrules = %d, nitems = %d\n\n",
ntokens, nvars, nsyms, nrules, nitems);
fprintf (out, "Variables\n---------\n\n");
fprintf (out, "Value Sprec Sassoc Tag\n");
for (i = ntokens; i < nsyms; i++)
obstack_fgrow4 (&output_obstack,
"%5d %5d %5d %s\n", i, sprec[i], sassoc[i], tags[i]);
obstack_sgrow (&output_obstack, "\n\n");
obstack_sgrow (&output_obstack, _("Rules\n-----\n\n"));
fprintf (out, "%5d %5d %5d %s\n", i, sprec[i], sassoc[i], tags[i]);
fprintf (out, "\n\n");
fprintf (out, "Rules\n-----\n\n");
fprintf (out, "Num (Prec, Assoc, Useful, Ritem Range) Lhs -> Rhs (Ritem range) [Num]\n");
for (i = 1; i <= nrules; i++)
{
obstack_fgrow5 (&output_obstack, "%-5d(%5d%5d)%5d : (@%-5d)",
i, rprec[i], rassoc[i], rlhs[i], rrhs[i]);
for (r = &ritem[rrhs[i]]; *r > 0; r++)
obstack_fgrow1 (&output_obstack, "%5d", *r);
obstack_fgrow1 (&output_obstack, " [%d]\n", -(*r));
int rhs_count = 0;
/* Find the last RHS index in ritems. */
for (r = &ritem[rule_table[i].rhs]; *r > 0; ++r)
++rhs_count;
fprintf (out, "%3d (%2d, %2d, %2d, %2d-%2d) %2d ->",
i,
rule_table[i].prec, rule_table[i].assoc, rule_table[i].useful,
rule_table[i].rhs, rule_table[i].rhs + rhs_count - 1,
rule_table[i].lhs);
/* Dumped the RHS. */
for (r = &ritem[rule_table[i].rhs]; *r > 0; r++)
fprintf (out, "%3d", *r);
fprintf (out, " [%d]\n", -(*r));
}
obstack_sgrow (&output_obstack, "\n\n");
obstack_sgrow (&output_obstack,
_("Rules interpreted\n-----------------\n\n"));
fprintf (out, "\n\n");
fprintf (out, "Rules interpreted\n-----------------\n\n");
for (i = 1; i <= nrules; i++)
{
obstack_fgrow2 (&output_obstack, "%-5d %s :", i, tags[rlhs[i]]);
for (r = &ritem[rrhs[i]]; *r > 0; r++)
obstack_fgrow1 (&output_obstack, " %s", tags[*r]);
obstack_grow1 (&output_obstack, '\n');
fprintf (out, "%-5d %s :", i, tags[rule_table[i].lhs]);
for (r = &ritem[rule_table[i].rhs]; *r > 0; r++)
fprintf (out, " %s", tags[*r]);
fputc ('\n', out);
}
obstack_sgrow (&output_obstack, "\n\n");
fprintf (out, "\n\n");
}
#endif
/*-------------------------------.
| Report the results to STDERR. |
`-------------------------------*/
static void
print_notices (void)
reduce_print (void)
{
if (yacc_flag && nuseless_productions)
fprintf (stderr, _("%d rules never reduced\n"), nuseless_productions);
fprintf (stderr, ngettext ("%d rule never reduced\n",
"%d rules never reduced\n",
nuseless_productions),
nuseless_productions);
fprintf (stderr, _("%s contains "), infile);
if (nuseless_nonterminals > 0)
{
fprintf (stderr, _("%d useless nonterminal%s"),
nuseless_nonterminals,
(nuseless_nonterminals == 1 ? "" : "s"));
}
fprintf (stderr, ngettext ("%d useless nonterminal",
"%d useless nonterminals",
nuseless_nonterminals),
nuseless_nonterminals);
if (nuseless_nonterminals > 0 && nuseless_productions > 0)
fprintf (stderr, _(" and "));
if (nuseless_productions > 0)
{
fprintf (stderr, _("%d useless rule%s"),
nuseless_productions, (nuseless_productions == 1 ? "" : "s"));
}
fprintf (stderr, ngettext ("%d useless rule",
"%d useless rules",
nuseless_productions),
nuseless_productions);
fprintf (stderr, "\n");
fflush (stderr);
}
@@ -527,42 +542,39 @@ reduce_grammar (void)
reduced = (bool) (nuseless_nonterminals + nuseless_productions > 0);
if (verbose_flag)
print_results ();
if (!reduced)
return;
if (reduced == FALSE)
goto done_reducing;
print_notices ();
reduce_print ();
if (!BITISSET (N, start_symbol - ntokens))
fatal (_("Start symbol %s does not derive any sentence"),
tags[start_symbol]);
reduce_grammar_tables ();
#if 0
if (verbose_flag)
if (nuseless_nonterminals > 0)
nonterminals_reduce ();
if (trace_flag)
{
obstack_fgrow1 (&output_obstack, "REDUCED GRAMMAR\n\n");
dump_grammar ();
dump_grammar (stderr);
fprintf (stderr, "reduced %s defines %d terminals, %d nonterminals\
, and %d productions.\n",
infile, ntokens, nvars, nrules);
}
#endif
}
if (statistics_flag)
fprintf (stderr, _("reduced %s defines %d terminal%s, %d nonterminal%s\
, and %d production%s.\n"),
infile,
ntokens,
(ntokens == 1 ? "" : "s"),
nvars,
(nvars == 1 ? "" : "s"),
nrules,
(nrules == 1 ? "" : "s"));
done_reducing:
/* Free the global sets used to compute the reduced grammar */
/*-----------------------------------------------------------.
| Free the global sets used to compute the reduced grammar. |
`-----------------------------------------------------------*/
void
reduce_free (void)
{
XFREE (N);
XFREE (V);
XFREE (V1);
XFREE (P);
}
+4 -1
View File
@@ -1,5 +1,5 @@
/* Grammar reduction for Bison.
Copyright 2000 Free Software Foundation, Inc.
Copyright 2000, 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -22,5 +22,8 @@
# define REDUCE_H_
void reduce_grammar PARAMS ((void));
void reduce_output PARAMS ((FILE *out));
void reduce_free PARAMS ((void));
extern int nuseless_nonterminals;
#endif /* !REDUCE_H_ */
+35
View File
@@ -0,0 +1,35 @@
/* Type definitions for nondeterministic finite state machine for bison,
Copyright 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
Bison is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
Bison is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Bison; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "system.h"
#include "state.h"
/*---------------------------------.
| Create a new array of N shitfs. |
`---------------------------------*/
shifts *
shifts_new (int n)
{
shifts *res = SHIFTS_ALLOC (n);
res->nshifts = n;
return res;
}
+69 -9
View File
@@ -1,5 +1,5 @@
/* Type definitions for nondeterministic finite state machine for bison,
Copyright 1984, 1989, 2000 Free Software Foundation, Inc.
Copyright 1984, 1989, 2000, 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -88,6 +88,11 @@
#ifndef STATE_H_
# define STATE_H_
/*-------.
| Core. |
`-------*/
typedef struct core
{
struct core *next;
@@ -96,10 +101,15 @@ typedef struct core
short accessing_symbol;
short nitems;
short items[1];
}
core;
} core;
#define CORE_ALLOC(Nitems) \
(core *) xcalloc ((unsigned) (sizeof (core) \
+ (Nitems - 1) * sizeof (short)), 1)
/*---------.
| Shifts. |
`---------*/
typedef struct shifts
{
@@ -107,19 +117,66 @@ typedef struct shifts
short number;
short nshifts;
short shifts[1];
}
shifts;
} shifts;
#define SHIFTS_ALLOC(Nshifts) \
(shifts *) xcalloc ((unsigned) (sizeof (shifts) \
+ (Nshifts - 1) * sizeof (short)), 1)
shifts * shifts_new PARAMS ((int n));
/* What is the symbol which is shifted by SHIFTS->shifts[Shift]? Can
be a token (amongst which the error token), or non terminals in
case of gotos. */
#define SHIFT_SYMBOL(Shifts, Shift) \
(state_table[Shifts->shifts[Shift]].accessing_symbol)
/* Is the SHIFTS->shifts[Shift] a real shift? (as opposed to gotos.) */
#define SHIFT_IS_SHIFT(Shifts, Shift) \
(ISTOKEN (SHIFT_SYMBOL (Shifts, Shift)))
/* Is the SHIFTS->shifts[Shift] a goto?. */
#define SHIFT_IS_GOTO(Shifts, Shift) \
(!SHIFT_IS_SHIFT (Shifts, Shift))
/* Is the SHIFTS->shifts[Shift] then handling of the error token?. */
#define SHIFT_IS_ERROR(Shifts, Shift) \
(SHIFT_SYMBOL (Shifts, Shift) == error_token_number)
/* When resolving a SR conflicts, if the reduction wins, the shift is
disabled. */
#define SHIFT_DISABLE(Shifts, Shift) \
(Shifts->shifts[Shift] = 0)
#define SHIFT_IS_DISABLED(Shifts, Shift) \
(Shifts->shifts[Shift] == 0)
/*-------.
| Errs. |
`-------*/
typedef struct errs
{
short nerrs;
short errs[1];
}
errs;
} errs;
#define ERRS_ALLOC(Nerrs) \
(errs *) xcalloc ((unsigned) (sizeof (errs) \
+ (Nerrs - 1) * sizeof (short)), 1)
/*-------------.
| Reductions. |
`-------------*/
typedef struct reductions
{
@@ -127,7 +184,10 @@ typedef struct reductions
short number;
short nreds;
short rules[1];
}
reductions;
} reductions;
#define REDUCTIONS_ALLOC(Nreductions) \
(reductions *) xcalloc ((unsigned) (sizeof (reductions) \
+ (Nreductions - 1) * sizeof (short)), 1)
#endif /* !STATE_H_ */
+2 -2
View File
@@ -1,5 +1,5 @@
/* Symbol table manager for Bison,
Copyright 1984, 1989, 2000 Free Software Foundation, Inc.
Copyright 1984, 1989, 2000, 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -58,7 +58,7 @@ bucket_new (const char *tag, int hashval)
res->value = 0;
res->prec = 0;
res->assoc = right_assoc;
res->user_token_number = 0;
res->user_token_number = SUNDEF;
res->alias = NULL;
res->class = unknown_sym;
+2 -1
View File
@@ -1,5 +1,5 @@
/* Definitions for symtab.c and callers, part of bison,
Copyright 1984, 1989, 1992, 2000 Free Software Foundation, Inc.
Copyright 1984, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -33,6 +33,7 @@ typedef enum
nterm_sym /* non-terminal */
} symbol_class;
#define SUNDEF -1 /* For undefined user number. */
#define SALIAS -9991 /* for symbol generated with an alias */
typedef struct bucket
+79 -20
View File
@@ -40,6 +40,18 @@
# include <stdlib.h>
#endif
/* The following test is to work around the gross typo in
systems like Sony NEWS-OS Release 4.0C, whereby EXIT_FAILURE
is defined to 0, not 1. */
#if !EXIT_FAILURE
# undef EXIT_FAILURE
# define EXIT_FAILURE 1
#endif
#ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
@@ -67,6 +79,21 @@
extern int errno;
#endif
/* AIX requires this to be the first thing in the file. */
#ifndef __GNUC__
# if HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif
# endif
#endif
#if PROTOTYPES
# define PARAMS(p) p
#else
@@ -83,14 +110,26 @@ extern int errno;
char *stpcpy PARAMS ((char *dest, const char *src));
#endif
#if !HAVE_DECL_STRNDUP
char *strndup PARAMS ((const char *s, size_t size));
#if !HAVE_DECL_STRCHR
char *strchr(const char *s, int c);
#endif
#if !HAVE_DECL_STRSPN
size_t strspn(const char *s, const char *accept);
#endif
#if !HAVE_DECL_STRNLEN
size_t strnlen PARAMS ((const char *s, size_t maxlen));
#endif
#if !HAVE_DECL_MEMCHR
void *memchr PARAMS ((const void *s, int c, size_t n));
#endif
#if !HAVE_DECL_MEMRCHR
void *memrchr PARAMS ((const void *s, int c, size_t n));
#endif
/*-----------------.
@@ -99,7 +138,8 @@ size_t strnlen PARAMS ((const char *s, size_t maxlen));
#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
# if !defined (__GNUC__) || __GNUC__ < 2 || \
(__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
# define __attribute__(Spec) /* empty */
# endif
/* The __-protected variants of `format' and `printf' attributes
@@ -122,17 +162,9 @@ size_t strnlen PARAMS ((const char *s, size_t maxlen));
# define setlocale(Category, Locale)
#endif
#ifdef ENABLE_NLS
# include <libintl.h>
# define _(Text) gettext (Text)
#else
# undef bindtextdomain
# define bindtextdomain(Domain, Directory)
# undef textdomain
# define textdomain(Domain)
# define _(Text) Text
#endif
#define N_(Text) Text
#include "libgettext.h"
#define _(Msgid) gettext (Msgid)
#define N_(Msgid) (Msgid)
/*-------------------------------.
@@ -207,7 +239,7 @@ do { \
# define MINSHORT -32768
#endif
#if defined (MSDOS) && !defined (__GO32__)
#if defined (MSDOS) && !defined (__GO32__) && !defined (__DJGPP__)
# define BITS_PER_WORD 16
# define MAXTABLE 16383
#else
@@ -229,19 +261,31 @@ do { \
# define EXT_OUTPUT ".output"
# define EXT_STYPE_H "_stype"
# define EXT_GUARD_C "_guard"
# define EXT_TYPE(ext) (ext)
#else /* ! VMS */
# ifdef MSDOS
/* MS DOS. */
# define EXT_TAB "_tab"
# define EXT_OUTPUT ".out"
# define EXT_STYPE_H ".sth"
# define EXT_GUARD_C ".guc"
# if defined (__DJGPP__)
/* DJGPP */
# define EXT_TAB ((pathconf (NULL, _PC_NAME_MAX) > 12) ? ".tab" : "_tab")
# define EXT_OUTPUT ((pathconf (NULL, _PC_NAME_MAX) > 12) ? ".output" : ".out")
# define EXT_STYPE_H ((pathconf (NULL, _PC_NAME_MAX) > 12) ? ".stype" : ".sth")
# define EXT_GUARD_C ((pathconf (NULL, _PC_NAME_MAX) > 12) ? ".guard" : ".guc")
# define EXT_TYPE(ext) ((pathconf (NULL, _PC_NAME_MAX) > 12) ? (ext) : "")
# else /* ! __DJGPP__ */
/* MS DOS. */
# define EXT_TAB "_tab"
# define EXT_OUTPUT ".out"
# define EXT_STYPE_H ".sth"
# define EXT_GUARD_C ".guc"
# define EXT_TYPE(ext) ""
# endif
# else /* ! MSDOS */
/* Standard. */
# define EXT_TAB ".tab"
# define EXT_OUTPUT ".output"
# define EXT_STYPE_H ".stype"
# define EXT_GUARD_C ".guard"
# define EXT_TYPE(ext) (ext)
# endif /* ! MSDOS */
#endif /* ! VMS */
@@ -264,6 +308,21 @@ do { \
#endif
/* As memcpy, but for shorts. */
#define shortcpy(Dest, Src, Num) \
memcpy (Dest, Src, Num * sizeof (short))
/* Free a linked list. */
#define LIST_FREE(Type, List) \
do { \
Type *_node, *_next; \
for (_node = List; _node; _node = _next) \
{ \
_next = _node->next; \
XFREE (_node); \
} \
} while (0)
/*---------------------------------.
| Debugging the memory allocator. |
`---------------------------------*/

Some files were not shown because too many files have changed in this diff Show More