Compare commits

..
Author SHA1 Message Date
Akim Demaille 8e86444744 Revert the previous patch. 2002-02-05 10:04:24 +00:00
Akim Demaille beda758b1f * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
* configure.in: Check for the declarations of free and malloc.
* src/muscle_tab.c: Adjust.
2002-02-05 10:00:47 +00:00
Akim Demaille 5ece6d436f * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
which have no values.
2002-02-05 09:58:57 +00:00
Akim Demaille 5bb18f9a19 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
* data/: here.
2002-02-05 09:57:52 +00:00
Paul Eggert 894dd62eb2 * src/bison.simple (YYSIZE_T): Do not define merely because
YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
On some platforms, <alloca.h> does not declare YYSTD (size_t).
2002-01-29 13:58:06 +00:00
Paul Eggert 2992e1e967 (YYSIZE_T): Do not define merely because YYSTACK_USE_ALLOCA is nonzero
or alloca or _ALLOCA_H are defined.  On some platforms, <alloca.h>
does not declare YYSTD (size_t).
2002-01-29 13:55:32 +00:00
Akim Demaille 82841af7d0 Fix `%nonassoc and eof'.
* src/state.c (errs_dup): Aaaah!  The failure was due to bytes
which were not properly copied!  Replace
memcpy (res->errs, src->errs, src->nerrs);
with
memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
!!!
* tests/regression.at (%nonassoc and eof): Adjust to newest
Autotest: `.' is not in the PATH.
2002-01-27 13:57:17 +00:00
Akim Demaille 318b76e913 * tests/sets.at (AT_EXTRACT_SETS): New.
(Nullable): Use it.
(Firsts): New.
2002-01-27 13:57:03 +00:00
Akim Demaille 30d2f3d50f * tests/actions.at, tests/calc.at, tests/headers.at,
* tests/torture.at: Adjust to the newest Autotest which no longer
forces `.' in the PATH.
2002-01-27 10:59:15 +00:00
Akim Demaille 30f8c3953f * tests/regression.at (%nonassoc and eof): New.
Suggested by Robert Anisko.
2002-01-25 16:24:40 +00:00
Akim Demaille 29ae55f112 Bison dumps core when trying to complain about broken input files.
Reported by Cris van Pelt.
* src/lex.c (parse_percent_token): Be sure to set token_buffer.
* tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
into...
(Invalid inputs): Strengthen: exercise parse_percent_token.
2002-01-24 17:09:34 +00:00
Robert Anisko 2b548aa648 * src/Makefile.am: Add bison.c++.
* src/bison.c++: New skeleton.
2002-01-24 16:50:07 +00:00
Akim Demaille bb0146c2a9 * po/it.po: New. 2002-01-21 19:29:04 +00:00
Akim Demaille 4518a4baae Adjust. 2002-01-21 19:27:55 +00:00
Akim Demaille bec30531f7 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition. 2002-01-21 15:50:39 +00:00
Marc Autret fc6edc45c0 * src/files.c (compute_output_file_names): Fix 2002-01-20 15:59:34 +00:00
Marc Autret 5e5d541531 * tests/output.at: New test.
* src/files.c (compute_base_names): Don't map extensions when
the YACC flag is set, use defaults.
Reported by Evgeny Stambulchik.
2002-01-20 15:46:19 +00:00
Marc Autret 52d1aeee3d Update. 2002-01-20 14:37:39 +00:00
Marc Autret 44ea3fbdf5 * src/system.h: Need to define __attribute__ away for non-GCC
compilers as well (i.e.	the vendor C compiler).
Suggested by Albert Chin-A-Young.
2002-01-20 11:34:02 +00:00
Tim Van Holder 338963d177 * src/system.h, lib/hash.h, lib/hash.c: PARAMS fixes. 2002-01-11 15:32:06 +00:00
Tim Van Holder e1dd105c0a * src/system.h: Use canonical definition for PARAMS (avoids clash with macro from hash.h). 2002-01-11 15:27:54 +00:00
Tim Van Holder a10778dc32 * lib/hash.h, lib/hash.c (__P): Renamed to PARAMS; canonical definition used. 2002-01-11 15:26:56 +00:00
Akim Demaille d9e9746c06 More thanks. 2002-01-11 13:37:39 +00:00
Akim Demaille c57b2479ff * configure.in: Use AC_FUNC_STRNLEN. 2002-01-11 13:33:05 +00:00
Akim Demaille b85810aec0 * src/files.c, src/files.h (output_infix): New.
(tab_extension): Remove.
(compute_base_names): Compute the former, drop the latter.
* src/output.c (prepare): Insert the muscles `output-infix', and
`output-suffix'.
* src/parse-skel.y (string, string.1): New.
(section.header): Use it.
(section.yacc): Remove.
(prefix): Remove too.
* src/scan-skel.l: Adjust.
* src/bison.simple, src/bison.hairy: Adjust.
2002-01-09 13:03:45 +00:00
Akim Demaille cae601224e * configure.in (WERROR_CFLAGS): Compute it.
* src/Makefile.am (CFLAGS): Pass it.
* tests/atlocal.in (CFLAGS): Idem.
* src/files.c: Fix a few warnings.
(get_extension_index): Remove, unused.
2002-01-09 13:03:20 +00:00
Akim Demaille ae40480115 * 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 ()'.
(filename_split): New.
(compute_base_names): N-th rewrite, using filename_split.
2002-01-08 17:28:18 +00:00
Akim Demaille 22312b71e0 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
New, stolen from the Fileutils 4.1.
* lib/Makefile.am (libbison_a_SOURCES): Adjust.
* configure.in: Check for the presence of memrchr, and of its
prototype.
2002-01-08 17:27:46 +00:00
Tim Van Holder a67cef01b1 * lib/hash.h (__P): Added definition for this macro.
* src/Makefile.am: Add parse-skel.c and scan-skel.c to BUILT_SOURCES, to ensure they are generated first.
* src/parse-skel.y: Use YYERROR_VERBOSE instead of %error-verbose to allow bootstrapping with bison 1.30x.
2002-01-07 23:00:39 +00:00
Akim Demaille e9f87b5b7d Regen. 2002-01-07 08:44:08 +00:00
Akim Demaille 2b25d624f6 * 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:50:08 +00:00
Akim Demaille 3460813bdb 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:49:53 +00:00
Akim Demaille 73784c645d 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:49:40 +00:00
Akim Demaille 25d810906c * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
skeleton.h.
2002-01-06 20:49:27 +00:00
Paul Eggert a9b8959efa * doc/bison.texinfo (Debugging):
Remove YYSTDERR; it's no longer defined or used.
Also, s/cstdio.h/cstdio/.
2002-01-05 01:26:32 +00:00
Paul Eggert e2742e46ba (Debugging): Remove YYSTDERR; it's no longer defined or used.
Also, s/cstdio.h/cstdio/.
2002-01-05 01:25:38 +00:00
Akim Demaille 1109455ce9 * src/parse-skel.y (process_skeleton): Don't bind the parser's
tracing code to --trace, wait for a better --trace option, with
args.
2002-01-03 09:56:04 +00:00
Akim Demaille 7ea5e9779b * 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:55:49 +00:00
Akim Demaille fab5b110fb * lib/quotearg.c: Use #include "..."' instead of #include <...>'
for non system headers.
2002-01-03 09:55:33 +00:00
Akim Demaille aed7fd9b97 Equip the skeleton chain with location tracking, runtime trace,
pure parser and scanner.
* src/parse-skel.y: Request a pure parser, locations, and prefix
renaming.
(%union): Having several members with the same type does not help
type mismatches, simplify.
(YYPRINT, yyprint): New.
(yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
(skel_error): this.
Handle locations.
* src/scan-skel.l: Adjust to these changes.
* src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
(LOCATION_PRINT, skel_control_t): New.
2002-01-02 14:56:12 +00:00
Akim Demaille 24fad99e2b * src/parse-skel.y: Get rid of the shift/reduce conflict:
replace `gb' with BLANKS.
* src/scan-skel.l: Adjust.
2001-12-30 21:06:36 +00:00
Akim Demaille a4b36db458 * src/system.h: We don't need nor want bcopy.
Throw away MS-DOS crap: we don't need getpid.
* configure.in: We don't need strndup.  It was even causing
problems: because Flex includes the headers *before* us,
_GNU_SOURCE is not defined by config.h, and therefore strndup was
not visible.
* lib/xstrndup.c: New.
* src/scan-skel.l: Use it.
Be sure to initialize yylval.muscle member when scanning a MUSCLE.
* src/parse-skel.y: Use %directives instead of #defines.
2001-12-30 21:06:22 +00:00
Akim Demaille 1239777d4f * src/skeleton.h: New.
* src/output.c (output_parser, output_master_parser): Remove, dead
code.
* src/output.h (get_lines_number, actions_output, guards_output)
(token_definitions_output): Prototype them.
* src/parse-skel.y: Add the license notice.
Include output.h and skeleton.h.
(process_skeleton): Returns void, and takes a single parameter.
* src/scan-skel.l: Add the license notice.
Include skeleton.h.
Don't use %option yylineno: it seems that then Flex imagines
REJECT has been used, and therefore it won't reallocate its
buffers (which makes no other sense to me than a bug).  It results
in warnings for `unused: yy_flex_realloc'.
to guess if the generated parsers should have '.tab' in their
* src/Makefile.am (bison_SOURCES): Add scan-skel.l and
2001-12-30 21:05:12 +00:00
Robert Anisko 9b3add5beb * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
(MUSCLE_INSERT_PREFIX): ...to there.
* src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
(MUSCLE_INSERT_PREFIX): Move from here...
* src/bison.hairy: Add a section directive.  Put braces around muscle
names.  This parser skeleton is still broken, but Bison should not
choke on a bad muscle 'syntax'.
* src/bison.simple: Add a section directive.  Put braces around muscle
names.
* src/files.h (strsuffix, stringappend): Add declarations.
(tab_extension): Add declaration.
(short_base_name): Add declaration.
* src/files.c (strsuffix, stringappend): No longer static.  These
functions are used in the skeleton parser.
(tab_extension): New.
(compute_base_names): Use the computations done in this function
to guess if the generated parsers should have '.tab' in their
names.
(short_base_name): No longer static.
* src/output.c (output_skeleton): New.
(output): Disable call to output_master_parser, and give a try to
a new skeleton handling system.
(guards_output, actions_output): No longer static.
(token_definitions_output, get_lines_number): No longer static.
* configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
* src/Makefile.am (bison_SOURCES): Add scan-skel.l and
parse-skel.y.
* src/parse-skel.y: New file.
* src/scan-skel.l: New file.
2001-12-30 15:01:06 +00:00
Akim Demaille 3cd5bcdd19 Regen. 2001-12-29 14:46:03 +00:00
Akim Demaille b5b61c616b %name-prefix is broken.
* src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
Adjust all dependencies.
* tests/headers.at (export YYLTYPE): Strengthen this test: use
%name-prefix.
Renaming yylval but not yylloc is not consistent.  Now we do.
* src/bison.simple: Prefix yylloc if used.
* doc/bison.texinfo (Decl Summary): Document that.
2001-12-29 14:27:45 +00:00
Akim Demaille 8c9a50bee1 * doc/bison.texinfo: Promote `%long-directive' over
`%long_directive'.
Remove all references to fixed-output-files, yacc is enough.
2001-12-29 14:27:20 +00:00
Akim Demaille d99361e657 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
user prologue.  These are defaults.
* tests/actions.at (Mid-rule actions): Make sure the user can
define YYDEBUG and YYERROR_VERBOSE.
2001-12-29 14:27:01 +00:00
Akim Demaille b9cecb91a0 * src/output.c (header_output): Don't forget to export YYLTYPE and
yylloc.
* tests/headers.at (export YYLTYPE): New, make sure it does.
* tests/regression.at (%union and --defines, Invalid CPP headers):
Move to...
* tests/headers.at: here.
2001-12-29 14:26:49 +00:00
Akim Demaille aea13e9790 * src/gram.h (rule_s): Member assoc' is of type associativity'. 2001-12-29 14:26:21 +00:00
Akim Demaille 931394cbc1 * tests/actions.at (Mid-rule actions): Output on a single line
instead of several.
2001-12-29 14:25:58 +00:00
Akim Demaille 704a47c475 * doc/bison.texinfo: Formatting changes. 2001-12-29 14:25:45 +00:00
Akim Demaille 091e20bbee Don't store the token defs in a muscle, just be ready to output it
on command.  Now possible via `symbols'.  Fixes a memory leak.
* src/output.c (token_definitions_output): New.
(output_parser, header_output): Use it.
* src/reader.c (symbols_save): Remove.
2001-12-29 14:25:27 +00:00
Akim Demaille cce7171088 * src/bison.simple: Do not provide a default for YYSTYPE and
YYLTYPE before the user's prologue.  Otherwise it's hardly... a
default.
2001-12-29 14:25:08 +00:00
Akim Demaille 82c035a823 Mid-rule actions are simply... ignored!
* src/reader.c (readgram): Be sure to attach mid-rule actions to
the empty-rule associated to the dummy symbol, not to the host
rule.
* tests/actions.at (Mid-rule actions): New.
2001-12-29 14:24:51 +00:00
Akim Demaille 8419d367e1 Memory leak.
* src/reader.c (reader): Free grammar.
2001-12-29 14:24:35 +00:00
Akim Demaille 375d580671 Memory leak.
* src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
since it allocates it for each state, although only one is needed.
(allocate_storage): Do it here.
2001-12-29 14:21:23 +00:00
Akim Demaille f51cb8ff8c * src/options.h, src/options.c (create_long_option_table): Rename
as...
(long_option_table_new): this, with a clearer prototype.
(percent_table): Remove, unused,
* src/getargs.c (getargs): Adjust.
2001-12-29 14:21:06 +00:00
Akim Demaille 29e8831621 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
* src/print.c, src/print_graph.c, src/state.h: Rename state_table
as states.
2001-12-29 14:20:47 +00:00
Akim Demaille b9f71f19cc * src/lalr.c (build_relations): Rename states' as states1'.
Sorry, I don't understand exactly what it is, no better name...
2001-12-29 14:20:27 +00:00
Akim Demaille 1a2b5d37e1 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
* src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
* src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
as rules.
2001-12-29 14:20:13 +00:00
Akim Demaille 1cca533e2e * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
ago.
2001-12-29 14:19:46 +00:00
Akim Demaille c03ae96659 * src/reader.c, src/reader.h (user_toknums): Remove.
Adjust all users to use symbols[i]->user_token_number.
2001-12-29 14:19:31 +00:00
Akim Demaille 5a670b1ed9 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
Adjust all users to use symbols[i]->prec or ->assoc.
2001-12-29 14:19:13 +00:00
Akim Demaille ad949da96b * src/reader.c, src/reader.h (tags): Remove.
Adjust all users to use symbols[i]->tag.
2001-12-29 14:18:52 +00:00
Akim Demaille 0e78e603f6 * src/gram.h, src/gram.c (symbols): New, similar to state_table
and rule_table.
* src/reader.c (packsymbols): Fill this table.
Drop sprec.
* src/conflicts.c (resolve_sr_conflict): Adjust.
* src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
single table.
Use symbols[i]->tag instead of tags[i].
2001-12-29 14:18:32 +00:00
Akim Demaille 213e640e1e * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
In addition, put a comment in there, to replace...
* tests/regression.at (%union and C comments): Remove.
2001-12-29 14:18:08 +00:00
Akim Demaille e7b8bef1b1 * tests/regression.at (Web2c Actions): Blindly move the actual
output as expected output.  The contents *seem* right to me, but I
can't pretend reading perfectly parser tables...  Nonetheless, all
the other tests pass correctly, the table look OK, even though the
presence of `$axiom' is to be noted: AFAICS it is useless (but
harmless).
2001-12-29 14:17:56 +00:00
Akim Demaille b68e774421 * src/reader.c (readgram): Don't add the rule 0 if there were no
rules read.  In other words, add it _after_ having performed
grammar sanity checks.
Fixes the `tests/regression.at (Invalid input: 1)' Failure.
2001-12-29 14:17:43 +00:00
Akim Demaille 78d5bae94e * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
visible, and some states have now a different number.
2001-12-29 14:17:29 +00:00
Akim Demaille ff44279401 * src/reader.c (readgram): Bind the initial rule's lineno to that
of the first rule.
* tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
(Solved SR Conflicts): Adjust rule 0's line number.
2001-12-29 14:17:18 +00:00
Akim Demaille 610ab194c8 Fix the `GAWK Grammar' failure.
* src/LR0.c (final_state): Initialize to -1 so that we do compute
the reductions of the first state which was mistakenly confused
with the final state because precisely final_state was initialized
to 0.
* tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
now noticed by Bison.
* tests/regression.at (Rule Line Numbers): Adjust: state 0 does
have a reduction on $default.
2001-12-29 14:16:59 +00:00
Akim Demaille 29d29c8fff * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
rule line numbers.
* src/closure.c (print_closure): Likewise.
* src/derives.c (print_derives): Likewise.
* tests/sets.at (Nullable): Adjust: the rule numbers are correct
now.
2001-12-29 14:16:46 +00:00
Akim Demaille 7c6b64d023 * src/lalr.c (lookaheads_print): New.
(lalr): Call it when --trace-flag.
* tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
are dumped.
2001-12-29 14:16:16 +00:00
Akim Demaille 3d4daee374 * src/derives.c (print_derives): Be sure to use >= 0', not > 0',
when walking through ritem, even via rule->rhs.
* src/reduce.c (dump_grammar, useful_production, reduce_output)
(useful_production, useless_nonterminals): Likewise.
(reduce_grammar_tables): Likewise, plus update nritems.
* src/nullable.c (set_nullable): Likewise.
* src/lalr.c (build_relations): Likewise.
* tests/sets.at (Nullable): Adjust.
Fortunately, now, the $axiom is no longer nullable.
2001-12-29 14:15:33 +00:00
Akim Demaille 9e7f6bbd59 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
the 0-sentinel.
* src/gram.c (ritem_longest_rhs): Likewise.
* src/reduce.c (nonterminals_reduce): Likewise.
* src/print_graph.c (print_graph): Likewise.
* src/output.c (output_rule_data): Likewise.
* src/nullable.c (set_nullable):  Likewise.
2001-12-29 14:15:12 +00:00
Akim Demaille 255ef6389e * src/output.c: Comment changes. 2001-12-29 14:14:32 +00:00
Akim Demaille 0d8a73638f * 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.
Also, catch up with 1.31's YYSTD.
2001-12-27 18:36:53 +00:00
Akim Demaille 5499894828 ChangeLog fixes, and PO regen. 2001-12-27 18:26:20 +00:00
Akim Demaille 3db472b9eb * src/output.c (output_gram): Rely on nritems, not the
0-sentinel.  See below.
Use -1 as separator, not 0.
* src/bison.simple (yyparse): Subtract 1 to the rule numbers.
Rely on -1 as separator in yyrhs, instead of 0.
* tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
twice `Now at end of input', therefore there are two lines less to
expect.
2001-12-27 18:17:39 +00:00
Akim Demaille b365aa0589 * tests/regression.at (Unresolved SR Conflicts):
(Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
below.
* src/LR0.c (new_state): Recognize the final state by the fact it
is reached by eoftoken.
(insert_start_shifting_state, insert_eof_shifting_state)
(insert_accepting_state, augment_automaton): Remove, since now
these states are automatically computed from the initial state.
(generate_states): Adjust.
* src/print.c: When reporting a rule number to the user, substract
1, so that the axiom rule is rule 0, and the first user rule is 1.
* src/reduce.c: Likewise.
* src/print_graph.c (print_core): For the time being, just as for
the report, depend upon --trace-flags to dump the full set of
items.
* src/reader.c (readgram): Once the grammar read, insert the rule
0: `$axiom: START-SYMBOL $'.
* tests/set.at: Adjust: rule 0 is now displayed, and since the
number of the states has changed (the final state is no longer
necessarily the last), catch up.
* tests/regression.at: Partly catch up.
2001-12-27 18:13:59 +00:00
Akim Demaille 30171f79ab * src/LR0.c (new_state): Recognize the final state by the fact it
is reached by eoftoken.
(insert_start_shifting_state, insert_eof_shifting_state)
(insert_accepting_state, augment_automaton): Remove, since now
these states are automatically computed from the initial state.
(generate_states): Adjust.
* src/print.c: When reporting a rule number to the user, substract
1, so that the axiom rule is rule 0, and the first user rule is 1.
* src/reduce.c: Likewise.
* src/print_graph.c (print_core): For the time being, just as for
the report, depend upon --trace-flags to dump the full set of
items.
* src/reader.c (readgram): Once the grammar read, insert the rule
0: `$axiom: START-SYMBOL $'.
* tests/set.at: Adjust: rule 0 is now displayed, and since the
number of the states has changed (the final state is no longer
necessarily the last), catch up.
2001-12-27 18:13:47 +00:00
Akim Demaille 75142d452b Try to make the use of the eoftoken valid. Given that its value
is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
is used instead of > 0 where appropriate, (ii), depend upon nritems
instead of the 0-sentinel.
* src/gram.h, src/gram.c (nritems): New.
Expected to be duplication of nitems, but for the time being...
* src/reader.c (packgram): Assert nritems and nitems are equal.
* src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
* src/closure.c (print_closure, print_fderives): Likewise.
* src/gram.c (ritem_print): Likewise.
* src/print.c (print_core, print_grammar): Likewise.
* src/print_graph.c: Likewise.
2001-12-27 18:13:31 +00:00
Akim Demaille b7c49edf13 * src/main.c (main): If there are complains after grammar
reductions, then output the report anyway if requested, then die.
* src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
* src/reader.c (eoftoken): New.
(parse_token_decl): If the token being defined has value `0', it
is the eoftoken.
(packsymbols): No longer hack `tags' to insert `$' by hand.
Be sure to preserve the value of the eoftoken.
(reader): Make sure eoftoken is defined.
Initialize nsyms to 0: now eoftoken is created just like the others.
* src/print.c (print_grammar): Don't special case the eof token.
* src/regression.at: Adjust: `$' has value 0, not -1, which was a
lie anyway, albeit pleasant.
* tests/calc.at: Exercise error messages with eoftoken.
Change the grammar so that empty input is invalid.
Adjust expectations.
When yyungeting, be sure to use a valid yylloc: use last_yylloc.
2001-12-27 18:13:09 +00:00
Akim Demaille ec2da99ffe * configure.in: Check the protos of strchr ans strspn.
Replace strchr if needed.
* src/system.h: Provide the protos of strchr, strspn and memchr if
missing.
* lib/strchr.c: New.
* src/reader.c (symbols_save): Use strchr.
2001-12-27 18:12:48 +00:00
Akim Demaille 8adfa272f7 * src/print.c, src/print_graph.c (escape): New.
Use it to quote the TAGS outputs.
* src/print_graph.c (print_state): Now errors are in red, and
reductions in green.
Prefer high to wide: output the state number on a line of its own.
2001-12-27 18:11:20 +00:00
Akim Demaille 80dac38c5e * src/state.h, src/state.c (reductions_new): New.
* src/LR0.c (set_state_table): Let all the states have a
`reductions', even if reduced to 0.
(save_reductions): Adjust.
* src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
* src/print.c (print_reductions, print_actions): Adjust.
* src/output.c (action_row): Adjust.
2001-12-27 18:11:06 +00:00
Akim Demaille 2cec70b9f1 * src/state.h, src/state.c (errs_new, errs_dup): New.
* src/LR0.c (set_state_table): Let all the states have an errs,
even if reduced to 0.
* src/print.c (print_errs, print_reductions): Adjust.
* src/output.c (output_actions, action_row): Adjust.
* src/conflicts.c (resolve_sr_conflict): Adjust.
2001-12-27 18:10:48 +00:00
Akim Demaille 13ca549a75 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL. 2001-12-27 18:10:30 +00:00
Akim Demaille 5092aba5a7 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
* src/print.c: here.
(lookaheadset, shiftset): New, used as additional storage by
print_reductions.
(print_results): Adjust.
(print_shifts, print_gotos, print_errs): New, extracted from...
(print_actions): here.
* src/print_graph.c (print_actions): Remove dead code.
2001-12-27 18:10:16 +00:00
Akim Demaille 11e2becaac * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
`$n' and `@n'.
2001-12-27 18:07:31 +00:00
Akim Demaille dac3c91005 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
(build_relations): Adjust.
2001-12-27 18:07:17 +00:00
Akim Demaille d0b0fefa03 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
duplication.
2001-12-27 18:07:05 +00:00
Akim Demaille adc8c84856 * src/reader.c (packgram): Catch nitems overflows. 2001-12-27 18:06:41 +00:00
Akim Demaille 14d293acb2 * src/files.c, src/files.h (guard_obstack): Remove.
* src/output.c (output): Adjust.
* src/reader.c (parse_braces): New, factoring...
(copy_action, copy_guard): these two which are renamed as...
(parse_action, parse_guard): these.
As a voluntary consequence, using braces around guards is now
mandatory.
2001-12-27 18:06:24 +00:00
Akim Demaille f499b06243 * src/gram.h (rule_t): guard' and guard_line' are new members.
* src/reader.c (symbol_list): `guard' and `guard_line' are new
members.
(symbol_list_new): Adjust.
(copy_action): action_line is the first line, not the last.
(copy_guard): Just as for actions, store the `action' only, not
the switch/case/break flesh.
Don't parse the user action that might follow the guard, let...
(readgram): do it, i.e., now, there can be an action after a
guard.
In other words the guard is just explicitly optional.
(packgram): Adjust.
* src/output.c (guards_output): New.
(output_parser): Call it when needed.
(output): Also free the guard and attrs obstacks.
* src/files.c, src/files.h (obstack_save): Remove.
(output_files): Remove.
As a result, if one needs the former `.act' file, using an
appropriate skeleton which requires actions and guards is now
required.
* src/main.c (main): Adjust.
* tests/semantic.at: New.
* tests/regression.at: Use `input.y' as input file name.
Avoid 8+3 problems by requiring input.c when the test needs the
parser.
2001-12-27 18:06:06 +00:00
Akim Demaille d945f5cd8e * src/reader.c (symbol_list_new): Be sure to initialize all the
fields.
2001-12-27 18:05:42 +00:00
Akim Demaille d200e455d0 All the hacks using a final pseudo state are now useless.
* src/LR0.c (set_state_table): state_table holds exactly nstates.
* src/lalr.c (nLA): New.
(initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
instead of lookaheadsp from the pseudo state (nstate + 1).
2001-12-27 18:05:30 +00:00
Akim Demaille f9507c28ae * src/output.c (action_row, token_actions): Use a state_t instead
of a integer, and nlookaheads instead of the following state's
lookaheadsp.
2001-12-27 18:05:18 +00:00
Akim Demaille 065fbd27af * src/conflicts.c (log_resolution, flush_shift)
(resolve_sr_conflict, set_conflicts, solve_conflicts)
(count_sr_conflicts, count_rr_conflicts, conflicts_output)
(conflicts_print, print_reductions): Use a state_t instead of an
integer when referring to a state.
As much as possible, depend upon nlookaheads, instead of the
`lookaheadsp' member of the following state (since lookaheads of
successive states are successive, the difference between state n + 1
and n served as the number of lookaheads for state n).
* src/lalr.c (add_lookback_edge): Likewise.
* src/print.c (print_core, print_actions, print_state)
(print_results): Likewise.
* src/print_graph.c (print_core, print_actions, print_state)
(print_graph): Likewise.
* src/conflicts.h: Adjust.
2001-12-27 18:05:05 +00:00
Akim Demaille 1b177bd731 * src/bison.hairy: Formatting/comment changes.
ANSIfy.
Remove `register' indications.
Add plenty of `static'.
2001-12-27 18:04:43 +00:00
Akim Demaille 7742ddebf1 * src/output.c (prepare): Drop the muscle `ntbase' which
duplicates ntokens.
* src/bison.simple: Formatting/comment changes.
Use YYNTOKENS only, which is documented, but not YYNTBASE, which
is an undocumented synonym.
2001-12-27 18:04:28 +00:00
Akim Demaille 1fa140687e * src/output.c (output_table_data): Change the prototype to use
`int' for array ranges: some invocations do pass an int, not a
short.
Reported by Wayne Green.
2001-12-22 15:16:41 +00:00
Akim Demaille b9752825a0 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:58:53 +00:00
Akim Demaille 776209d6c7 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:42:36 +00:00
Akim Demaille dee049eb91 Typo. 2001-12-18 09:59:24 +00:00
Akim Demaille 275fc3ad0f 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:44 +00:00
Marc Autret 897668ee8d * src/bison.simple: Don't hard code the skeleton line and filename.
* src/output.c (output_parser): Rename 'line' as 'output_line'.
New line counter 'skeleton_line' (skeleton-line muscle).
2001-12-17 20:28:51 +00:00
Paul Eggert ab3399e0c6 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
YYDEBUG must be defined to a nonzero value.

* src/bison.simple (yytname): Do not assume that the user defines
YYDEBUG to a properly parenthesized expression.
2001-12-17 19:43:46 +00:00
Paul Eggert 4947ebdb4c Document that YYDEBUG must be defined to a nonzero value. 2001-12-17 19:43:23 +00:00
Paul Eggert c527b2d483 (yytname): Do not assume that the user defines YYDEBUG to a properly
parenthesized expression.
2001-12-17 19:41:46 +00:00
Akim Demaille 23a1adea4a Regen. 2001-12-17 17:33:59 +00:00
Akim Demaille 3877f72ba2 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
nlookaheads is a new member.
Adjust all users.
* src/lalr.h (nlookaheads): Remove this orphan declaration.
* src/lalr.c (initialize_lookaheads): Set nlookaheads for each
state.
2001-12-17 17:32:59 +00:00
Akim Demaille 331dbc1bb7 * src/files.h, src/files.c (open_files, close_files): Remove.
* src/main.c (main): Don't open/close files, nor invoke lex_free,
let...
* src/reader.c (reader): Do it.
2001-12-17 17:32:39 +00:00
Akim Demaille be750e4c49 * src/conflicts.c (print_reductions): Formatting changes. 2001-12-17 17:32:20 +00:00
Akim Demaille 709ae8c6ee * src/conflicts.c (flush_shift): Also adjust lookaheadset.
(flush_reduce): New.
(resolve_sr_conflict): Adjust.
2001-12-17 17:32:08 +00:00
Akim Demaille f87685c324 * src/output.c (output_obstack): Be static and rename as...
(format_obstack): this, to avoid any confusion with files.c's
output_obstack.
* src/reader.h (muscle_obstack): Move to...
* src/output.h: here, since it's defined in output.c.
2001-12-17 17:31:56 +00:00
Akim Demaille 837491d810 * src/output.c (action_row, save_column, default_goto)
(sort_actions, matching_state, pack_vector): Better variable
locality.
2001-12-17 17:31:37 +00:00
Akim Demaille 796d61fbdd * src/output.c: Various formatting changes. 2001-12-17 17:31:24 +00:00
Akim Demaille 64d15509b6 * src/files.c (output_files): Free the output_obstack.
* src/main.c (main): Call print and print_graph conditionally.
* src/print.c (print): Work unconditionally.
* src/print_graph.c (print_graph): Work unconditionally.
* src/conflicts.c (log_resolution): Output only if verbose_flag.
2001-12-17 17:31:10 +00:00
Akim Demaille 367c7a47d4 Regen. 2001-12-17 17:30:47 +00:00
Marc Autret fbc8ecb7ef * src/output.c (actions_output): Fix. When we use %no-lines,
there is one less line per action.
2001-12-16 01:45:19 +00:00
Marc Autret f0440388e9 * src/bison.simple: Remove a useless #line directive.
s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
* src/output.c (get_lines_number): New.
(output_parser): Adjust, now takes care about the lines of a
output muscles.
Fix line numbering.
(actions_output): Computes the number of lines taken by actions.
(output_master_parser): Insert new skeleton which is the name of
the output parser file name.
2001-12-16 01:26:25 +00:00
Marc Autret a79986b830 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility. 2001-12-15 18:38:57 +00:00
Marc Autret bcb05e75f5 Update. 2001-12-15 17:58:58 +00:00
Marc Autret 4ec8e00f60 * src/output.c (output_gram): Keep track of the hairy one. 2001-12-15 17:34:37 +00:00
Akim Demaille 5ee2aaf2fa Regen. 2001-12-15 17:11:49 +00:00
Akim Demaille a64d6fe0c3 Fix INCLUDES. 2001-12-15 16:35:48 +00:00
Akim Demaille 1a4648ff0d Make `make distcheck' work.
* lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
system.h which uses libgettext.h.
2001-12-15 16:31:04 +00:00
Akim Demaille 8165afc445 regen. 2001-12-15 16:29:52 +00:00
Akim Demaille 9c2c67e6fe * 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:21:44 +00:00
Akim Demaille 93ede233f5 The header can also be produced directly, without any obstack!
Yahoo!
* src/files.c, src/files.h (defines_obstack): Remove.
(compute_header_macro): Global.
(defines_obstack_save): Remove.
* src/reader.c (parse_union_decl): No longer output to
defines_obstack: its content can be found in the `stype' muscle
anyway.
(output_token_translations): Merge into...
(symbols_output): this.
Rename as...
(symbols_save): this.
(reader): Adjust.
* src/output.c (header_output): New.
(output): Call it.
2001-12-15 16:06:50 +00:00
Akim Demaille 2666f92821 * src/reader.c (parse_union_decl): Instead of handling two obstack
simultaneously, use one to define the `stype' muscle, and use the
value of the latter to fill defines_obstack.
(copy_comment): Remove.
(copy_comment2): Work for a single obstack.
Rename as...
(copy_comment): this.
2001-12-15 15:25:15 +00:00
Akim Demaille 428046f8d4 * src/lex.c, src/lex.h (xgetc): No longer static.
* src/reader.c (parse_union_decl): Revamp.
2001-12-15 15:13:36 +00:00
Akim Demaille ea52d7066d Still making progress in separating Bison into (i) input, (ii)
process, (iii) output: now we can directly output the parser file
without using table_obstack at all.
* src/files.c, src/files.h (table_obstack): Bye bye.
(parser_file_name): New.
* src/files.c (compute_output_file_names): Compute it.
* src/output.c (actions_output, output_parser)
(output_master_parser): To a file instead of an obstack.
2001-12-15 14:35:57 +00:00
Akim Demaille 3f96f4dc41 Attach actions to rules, instead of pre-outputting them to
actions_obstack.
* src/gram.h (rule_t): action and action_line are new members.
* src/reader.c (symbol_list): Likewise.
(copy_action): Save the actions within the rule.
(packgram): Save them in rule_table.
* src/output.c (actions_output): New.
(output_parser): Use it on `%%actions'.
(output_rule_data): Don't free rule_table.
(output): Do it.
(prepare): Don't save the `action' muscle.
* src/bison.simple: s/%%action/%%actions/.
2001-12-15 14:14:30 +00:00
Akim Demaille 51576fb3c6 * 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:09:05 +00:00
Akim Demaille 50d780b566 Regen. 2001-12-15 11:08:37 +00:00
Akim Demaille 2648a72df7 * src/lex.c (literalchar): Simply return the char you decoded, non
longer mess around with obstacks and int pointers.
Adjust all callers.
2001-12-14 16:03:28 +00:00
Akim Demaille 92790e5bf0 * src/lex.c (literalchar): Don't escape the special characters,
just decode them, and keep them as char (before, eol was output as
the 2 char string `n' etc.).
* src/output.c (output_rule_data): Use quotearg to output the
token strings.
2001-12-14 15:39:05 +00:00
Paul Eggert 927c155774 * 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.

* doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
2001-12-14 01:54:30 +00:00
Paul Eggert b7575ffe6f (const): Do not define; that is now config.h's job.
(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-14 01:52:50 +00:00
Paul Eggert 02a81e05f9 Document YYFPRINTF, YYSTDERR. 2001-12-14 01:51:33 +00:00
Akim Demaille ed8e1f68e9 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 11:02:21 +00:00
Akim Demaille cb581495e6 * src/closure.c (closure): Use nrules instead of playing tricks
with BITS_PER_WORD.
2001-12-13 11:02:04 +00:00
Akim Demaille 2e729273d6 * src/print.c (print_actions): Output the handling of `$' as the
traces do: shifting the token EOF.  Before EOF was treated as a
nonterminal.
* tests/regression.at: Adjust some tests.
* src/print_graph.c (print_core): Complete the set of items via
closure.  The next-to-final and final states are still unsatisfying,
but that's to be addressed elsewhere.
No longer output the rule numbers, but do output the state number.
A single loop for the shifts + gotos is enough, but picked a
distinct color for each.
(print_graph): Initialize and finalize closure.
2001-12-13 11:01:51 +00:00
Akim Demaille 107f7dfbd0 * src/reader.c (readgram): Remove dead code, an strip useless
braces.
(get_type): Remove, unused.
2001-12-13 11:01:36 +00:00
Akim Demaille 9b53a24f31 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
on that of lib/error.c.
2001-12-12 15:22:46 +00:00
Akim Demaille dbfb6dcd33 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:58:19 +00:00
Akim Demaille c79cea6dff Regen. 2001-12-12 11:56:52 +00:00
Marc Autret c3a8cbaaad Update. 2001-12-11 23:03:44 +00:00
Marc Autret c3995d9998 Update. 2001-12-11 20:21:09 +00:00
Marc Autret c25fb64881 * src/output.c (output_parser): Remove useless muscle. 2001-12-11 20:19:44 +00:00
Marc Autret 710ddc4f18 * src/bison.simple: Remove #line just before %%epilogue. It
is now handled in ...
* src/reader.c (read_additionnal_code): Add the output of a
#line for the epilogue.
2001-12-11 20:10:22 +00:00
Marc Autret e83d80b8ed * src/reader.c (copy_definition): Re-use CPP-outed code which
replace precedent remove.
* src/bison.simple: Remove #line before %%prologue because
%%input-line is wrong at this time.
2001-12-10 23:19:09 +00:00
Marc Autret fbbf9b3bb9 Update. 2001-12-10 22:56:40 +00:00
Marc Autret 971d51580b * src/reader.c (symbols_output): Clean up.
* src/output.c (output_gram, output): Clean up.
2001-12-10 22:55:06 +00:00
Akim Demaille f64b50a08c Typo. 2001-12-10 09:11:42 +00:00
Akim Demaille 5edafffd36 * src/lalr.c (initialize_lookaheads): New. Extracted from...
* src/LR0.c (set_state_table): here.
* src/lalr.c (lalr): Call it.
2001-12-10 09:10:28 +00:00
Akim Demaille 0279f8e90c * src/state.h (shifts): Remove the `number' member: shifts are
attached to state, hence no longer need to be labelled with a
state number.
2001-12-10 09:10:10 +00:00
Akim Demaille 190c4f5f0a Now that states have a complete set of members, the linked list of
shifts is useless: just fill directly the state's shifts member.
* src/state.h (shifts): Remove the `next' member.
* src/LR0.c (first_state, last_state): Remove.
Adjust the callers.
(augment_automaton): Don't look for the shifts that must be added
a shift on EOF: it is those of the state we looked for!  But now,
since shifts are attached, it is no longer needed to looking
merely by its id: its number.
2001-12-10 09:09:49 +00:00
Akim Demaille 2a73b93df4 * src/LR0.c (augment_automaton): Better variable locality.
Remove an impossible branch: if there is a state corresponding to
the start symbol being shifted, then there is shift for the start
symbol from the initial state.
2001-12-10 09:09:28 +00:00
Akim Demaille 74392f6a54 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
only when appropriate: when insert_start_shifting_state' is not
invoked.
* tests/regression.at (Rule Line Numbers): Adjust.
2001-12-10 09:09:14 +00:00
Akim Demaille 37c82725c8 * src/LR0.c (augment_automaton): Now that all states have shifts,
merge the two cases addition shifts to the initial state.
2001-12-10 09:09:00 +00:00
Akim Demaille 6a164e0c96 * src/lalr.c (set_state_table): Move to...
* src/LR0.c: here.
* src/lalr.c (lalr): Don't call it...
* src/LR0.c (generate_states): do it.
* src/LR0.h (first_state): Remove, only the table is used.
2001-12-10 09:08:46 +00:00
Akim Demaille 7215de245c * src/LR0.h (first_shift, first_reduction): Remove.
* src/lalr.c: Don't use first_shift: find shifts through the
states.
2001-12-10 09:08:28 +00:00
Akim Demaille 80e25d4d46 * src/LR0.c: Attach shifts to states as soon as they are
computed.
* src/lalr.c (set_state_table): Instead of assigning shifts to
state, just assert that the mapping was properly done.
2001-12-10 09:08:09 +00:00
Akim Demaille 0ab3728b12 * src/LR0.c (insert_start_shift): Rename as...
(insert_start_shifting_state): this.
(insert_eof_shifting_state, insert_accepting_state): New.
(augment_automaton): Adjust.
Better locality of the variables.
When looking if the start_symbol is shifted from the initial
state, using `while (... symbol != start_symbol ...)' sounds
better than `while (... symbol < start_symbol ...)': If fail
to see how the order between symbols could be relevant!
2001-12-10 09:07:55 +00:00
Akim Demaille 78af9bbcd3 * src/getargs.h: Don't declare `spec_name_prefix' and
`spec_file_prefix', declared by src/files.h.
* src/files.c, src/files.h: Default for spec_name_prefix is "yy".
* src/muscle_tab.c (muscle_init): Default prefix to NULL.
* src/output.c (prepare): Adjust.
* src/reader.c (symbols_output): Likewise.
* src/vmsgetargs.c: Vaguely adjust, but who cares?
2001-12-10 09:07:41 +00:00
Akim Demaille bdef2a413a * src/muscle_tab.c (muscle_init): NULL is a better default than
`"0"'.
2001-12-10 09:07:17 +00:00
Akim Demaille 3735969c7d * src/reader.c (reader): Calling symbols_output once is enough. 2001-12-10 09:07:03 +00:00
Akim Demaille 49701457c2 Now that states have a complete set of members, the linked list of
reductions is useless: just fill directly the state's reductions
member.
* src/state.h (struct reductions): Remove member `number' and
`next'.
* src/LR0.c (first_reduction, last_reduction): Remove.
(save_reductions): Don't link the new reductions, store them in
this_state.
* src/lalr.c (set_state_table): No need to attach reductions to
states, it's already done.
* src/output.c (output_actions): No longer free the shifts, then
the reductions, then the states: free all the states and their
members.
2001-12-10 09:06:48 +00:00
Akim Demaille 0edad74997 * src/options.c (OPTN, DRTV, BOTH): New.
(option_table): Use them.
* src/muscle_tab.c: Don't include xalloc.h and string.h: that's
the job of system.h.
* src/options.c: Don't include stdio.h and xalloc.h for the same
reasons.
2001-12-10 09:06:27 +00:00
Akim Demaille 5449dd0f25 * src/output.c (output, prepare): Make sure the values of the
muscles `action' and `prologue' are 0-terminated.
2001-12-10 09:06:13 +00:00
Akim Demaille a870c5670e Clean up GCC warnings.
* src/reader.c (copy_action): `buf' is not used.
(parse_skel_decl): Be static.
* src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
* src/options.h (create_long_option_table): Have a real prototype.
* lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
(hash_delete_at): Return const void *.
Adjust casts to preserve the const.
2001-12-10 09:05:47 +00:00
Akim Demaille 75addd5e5f Remove tests/Makefile.in and po/Makefile.in. 2001-12-10 09:02:16 +00:00
Akim Demaille 80df876864 * configure.in: Require 2.52g.
M4 is not needed, but AUTOM4TE is.
* m4/m4.m4: Remove.
* tests/Makefile.am: Adjust.
2001-12-10 09:00:36 +00:00
Akim Demaille f693ad146e One structure for states is enough, even though theoretically
there are LR(0) states and LALR(1) states.
* src/lalr.h (state_t): Remove.
(state_table): Be state_t **, not state_t *.
* src/state.h (core, CORE_ALLOC): Rename as...
(state_t, STATE_ALLOC): this.
Add the LALR(1) members: shifts, reductions, errs.
* src/LR0.c (state_table): Rename as...
(state_hash): this, to avoid name clashes with the global
`state_table'.
* src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
* src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2001-12-10 08:45:22 +00:00
Akim Demaille 74ffbcb6bf 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:44:49 +00:00
Akim Demaille 07708e1946 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
its argument.
Reported by Peter Hámorský.
2001-12-05 10:59:35 +00:00
Akim Demaille 448b17aa3c Regen. 2001-12-05 09:47:22 +00:00
Akim Demaille 92b16366dd * 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:44:26 +00:00
Akim Demaille 076ab0334d * 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:43:53 +00:00
Akim Demaille 3843c413d0 * src/output.c (pack_vector): Use assert, not berror.
* src/main.c (berror): Remove, unused.
2001-12-05 09:43:21 +00:00
Akim Demaille 4316896018 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:41:15 +00:00
Akim Demaille b2872512f1 * 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:41:01 +00:00
Akim Demaille 23cbcc6c19 * src/closure.c (print_closure): Improve.
(closure): Use it for printing input and output.
2001-12-05 09:40:47 +00:00
Akim Demaille 03ec521cc5 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
indexed by nonterminals.
2001-12-05 09:40:31 +00:00
Akim Demaille 3a7456dd96 * 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:40:16 +00:00
Akim Demaille 1cbcf2e795 * src/closure.c (set_fderives): De-obfuscate. 2001-12-05 09:40:00 +00:00
Akim Demaille 841822701a * src/closure.c (print_firsts, print_fderives): De-obfuscate. 2001-12-05 09:39:43 +00:00
Akim Demaille 3f6f053ce5 * src/closure.c (set_firsts): De-obfuscate. 2001-12-05 09:39:27 +00:00
Akim Demaille 7a5350baa0 * src/output.c (action_row): De-obfuscate
using the good o' techniques: arrays not pointers, variable
locality, BITISSET, RESETBIT etc.
2001-12-05 09:39:02 +00:00
Akim Demaille 5e893e1c88 Add src/state.c to the repo. 2001-12-05 09:38:44 +00:00
Akim Demaille 35687a9d8c Formatting changes. 2001-12-05 09:35:55 +00:00
Akim Demaille d954473dee 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:34:55 +00:00
Akim Demaille 9839bbe557 * 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:32:23 +00:00
Akim Demaille 9f136c0720 * 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:32:00 +00:00
Akim Demaille b608206eca * src/state.h (SHIFT_SYMBOL): New.
* src/conflicts.c: Use it to deobfuscate.
2001-12-05 09:31:46 +00:00
Akim Demaille 52afa962d1 * 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:31:23 +00:00
Akim Demaille e74dc3213f * src/conflicts.c (print_reductions): Arrays, not pointers.
Use BITISSET.
2001-12-05 09:31:09 +00:00
Akim Demaille 768fca8336 * src/conflicts.c (print_reductions): Pessimize, but clarify. 2001-12-05 09:30:56 +00:00
Akim Demaille a17e599f81 * src/conflicts.c (print_reductions): Improve variable locality. 2001-12-05 09:30:42 +00:00
Akim Demaille a04bc34180 * src/conflicts.c (print_reductions): Pessimize, but clarify. 2001-12-05 09:30:28 +00:00
Akim Demaille c8ea038e69 * src/conflicts.c (print_reductions): Improve variable locality. 2001-12-05 09:30:13 +00:00
Akim Demaille aa2aab3c16 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
* src/lalr.c: Use them.
2001-12-05 09:30:00 +00:00
Akim Demaille b178c8ccc4 * src/LR0.c (augment_automaton): Formatting changes.
Better variable locality.
2001-12-05 09:29:33 +00:00
Akim Demaille f67d13aa6c * src/lalr.c (matrix_print): New.
(transpose): Use it.
Use arrays instead of pointers.
2001-12-05 09:29:17 +00:00
Akim Demaille c2713865e3 * 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:29:02 +00:00
Akim Demaille 9887c18aca * 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:28:27 +00:00
Akim Demaille 4d4f699ca4 * src/lalr.c (initialize_F): Improve variable locality.
Avoid variables used as mere abbreviations.
2001-12-05 09:28:13 +00:00
Akim Demaille 80a6975034 * 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:28:00 +00:00
Akim Demaille fe96109760 * src/lalr.c (traverse): Use arrays instead of pointers. 2001-12-05 09:27:47 +00:00
Akim Demaille e3e4e81446 * 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:27:35 +00:00
Akim Demaille 630e182b7b 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:27:23 +00:00
Akim Demaille 81b51460c9 * src/nullable.c (set_nullable): Deobfuscate the handling of
ritem.
`symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
2001-12-05 09:27:08 +00:00
Akim Demaille 3067fbef53 * 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:26:05 +00:00
Paul Eggert 7d27c823de * 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:10:51 +00:00
Paul Eggert 2729e106a7 (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:10:07 +00:00
Paul Eggert c2bea5f96f * 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:29:59 +00:00
Paul Eggert f11966ffc5 (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:29:27 +00:00
Akim Demaille 2c8a9dfa1d * 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:25:16 +00:00
Akim Demaille f4e421e6e4 * 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:24 +00:00
Akim Demaille 7093d0f541 Name space cleanup in generated parser.
* doc/bison.texinfo (Bison Parser): Discuss system headers
and their effect on the user name space.
* src/bison.simple:
(YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
(YYSIZE_T): New macro.  Use it instead of size_t, to avoid infringing
on user names when possible.
(YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
Simplify test for whather <alloca.h> exists.
(<stdlib.h>): Include if we will use malloc, and if standard C or C++.
(<stdio.h>): Include if YYDEBUG.
(yymemcpy): Renamed from __yy_memcpy.  Do not define unless
! defined (yyoverflow) && ! defined (yymemcpy).
(yymemcpy, yyparse): Rename local variables as needed so that
they all begin with 'yy'.
(yystrlen, yystpcpy): New functions.
(YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
All uses changed.
(yyparse): size_t -> YYSIZE_T.  Use yystrlen and yystpcpy
instead of relying on string.h functions.  Use YYSTACK_ALLOC
and YYSTACK_FREE instead of malloc and free.
2001-11-30 14:00:14 +00:00
Akim Demaille fd51e5ffa2 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
before their first uses.
(YYBISON, YYPURE): Move to the top of the output.
2001-11-30 11:23:29 +00:00
Akim Demaille 7d13ff5f2f * tests/reduce.at (Useless Nonterminals): Fix. 2001-11-30 11:15:02 +00:00
Akim Demaille 892a39950d * 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:34 +00:00
Akim Demaille 68f1e3edc3 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:49:24 +00:00
Akim Demaille d2d1b42b07 * 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:49:01 +00:00
Akim Demaille 760b53a84b * 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:48:14 +00:00
Akim Demaille 002389585a * 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:47:56 +00:00
Paul Eggert 396452de26 * 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:56:45 +00:00
Paul Eggert 600f9b0ccc (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:54:54 +00:00
Marc Autret 04a76783ab Update. 2001-11-29 20:52:44 +00:00
Marc Autret 147e184ccc * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
of defining YYERROR_VERBOSE.
[AT_DATA]: $4 is now out of C declarations in the prologue.
2001-11-29 20:48:45 +00:00
Marc Autret 84b113cd22 Update. 2001-11-28 22:31:51 +00:00
Marc Autret 426cf563bd * src/reader.c (parse_dquoted_param): New.
(parse_skel_decl): Use it.
* src/lex.h: Add its prototype.
* src/lex.c (literalchar): Become not static.
2001-11-28 22:28:01 +00:00
Marc Autret ec93a21372 Update. 2001-11-28 21:31:49 +00:00
Marc Autret c7925b99cb * src/output.h: And put its extern declaration here.
* src/output.c (error_verbose): Define here.
(prepare): Echo name modification.
* src/getargs.h: Clean its extern declaration.
* src/getargs.c (error_verbose_flag): Remove.
(getargs): Remove case 'e'.
* src/options.c (option_table): 'error-verbose' is now seen as simple
percent option.
Include output.h.
* src/reader.c (read_declarations): Remove case tok_include.
(parse_include_decl): Remove.
* src/lex.h (token_t): Remove tok_include.
* src/options.c (option_table): 'include' is now a simple command line
option.
2001-11-28 21:31:13 +00:00
Marc Autret 5b5d192929 * src/bison.simple: Adjust muscle names.
* src/muscle_tab.c (muscle_init): Also rename the muscles.
* src/output.c (prepare): s/_/-/ for the muscles names.
(output_parser): When scanning for a muscle, allow '-' instead of '_'.
2001-11-28 20:32:53 +00:00
Marc Autret 8850be4b1c * src/bison.simple: Fix debug.
[YYERROR_VERBOSE]: Re-integrate as an internal macro.
2001-11-28 19:54:36 +00:00
Akim Demaille 9113b58f6f Regen. 2001-11-28 14:59:53 +00:00
Akim Demaille 4a38e61393 * src/LR0.c (shifts_new): New.
(save_shifts, insert_start_shift, augment_automaton): Use it.
2001-11-28 14:53:29 +00:00
Akim Demaille 4b35e1c1dd * src/closure.c (closure): b' and ruleno' denote the same value:
keep ruleno only.
2001-11-28 14:53:16 +00:00
Akim Demaille d2b04478d4 * src/closure.c (closure): Instead of looping over word in array
then bits in words, loop over bits in array.
2001-11-28 14:53:03 +00:00
Akim Demaille 2c4c30aa95 * 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:52:50 +00:00
Akim Demaille 576890b7ee * src/closure.c (closure): r' and c' are new variables, used to
de-obfuscate accesses to RULESET and CORE.
2001-11-28 14:52:38 +00:00
Akim Demaille cb487d7d0d * src/reduce.c (reduce_print): Use ngettext.
(dump_grammar): Improve the trace accuracy.
2001-11-28 13:38:53 +00:00
Akim Demaille 6013d43f59 * src/reduce.c (dump_grammar): Don't translate trace messages. 2001-11-28 11:58:28 +00:00
Akim Demaille cb4956ee99 * 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:43:24 +00:00
Paul Eggert 648185ab4a * 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:19:14 +00:00
Marc Autret b3324f97a8 Update. 2001-11-27 20:56:41 +00:00
Marc Autret 68254a0303 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle initialization.
* src/output.c (prepare): Remove its update.
2001-11-27 20:55:16 +00:00
Marc Autret d2079671fb Adjust typo. 2001-11-27 20:47:25 +00:00
Marc Autret 04d843a2a8 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
Use %error-verbose.
2001-11-27 20:46:12 +00:00
Marc Autret eeeb962b2f * src/bison.simple: Remove YYERROR_VERBOSE using.
Use %%error_verbose.
(yyparse): Likewise.
* src/output.c (prepare): Give its final value.
* src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
* src/getargs.h: Add its extern declaration.
* src/getargs.c (error_verbose_flag): New int.
(getargs): Update to catch new case.
* src/options.c (option_table): 'error-verbose' is a new option.
(shortopts): Update.
2001-11-27 20:30:13 +00:00
Akim Demaille e0327bc8b4 * src/system.h: Use intl/libgettext.h.
* src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
2001-11-27 19:22:10 +00:00
Akim Demaille 000f1a3cb2 * tests/torture.at (Exploding the Stack Size with Malloc):
s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
2001-11-27 18:57:51 +00:00
Akim Demaille 26cfe0be87 * src/files.c: Include error.h.
Reported by Hans Aberg.
2001-11-27 18:43:20 +00:00
Marc Autret a12f5cabb2 Update TODO. 2001-11-26 23:23:40 +00:00
Marc Autret f6bd542788 * src/reader.c (parse_include_decl): New, Not yet implemented.
(read_declarations): Add case tok_include.
* src/getargs.h (include): Add its extern definition.
* src/getargs.c (include): New const char *.
(getargs): Add case '-I'.
* src/options.c (option_table): Add include as command line and
percent option.
* src/lex.h (token_t): Add tok_include.
2001-11-26 21:06:22 +00:00
Marc Autret a220f55509 Revert doc patch. 2001-11-26 19:13:40 +00:00
Akim Demaille 2ca209c11d * 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:27:58 +00:00
Akim Demaille 0e41b407b9 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
size_ts.
2001-11-26 13:01:17 +00:00
Akim Demaille e0c40012bd * 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:50:29 +00:00
Akim Demaille 5e147124b5 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
* lib/Makefile.am (libbison_a_SOURCES): Adjust.
2001-11-26 09:35:38 +00:00
Akim Demaille a034c8b849 * 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:32:32 +00:00
Marc Autret b83f0407c6 * doc/bison.texinfo (Mystery Conflicts): Hint '-v' use.
From Golubev I. N.
2001-11-25 13:02:55 +00:00
Akim Demaille c64a20f3dc * lib/alloca.c: Update, from fileutils. 2001-11-23 14:56:30 +00:00
Akim Demaille 5b0d29bb52 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@. 2001-11-23 14:19:09 +00:00
Akim Demaille 722c4bfec2 * src/system.h: Include alloca.h.
* src/main.c (main) [C_ALLOCA]: Call alloca (0).
2001-11-23 14:16:34 +00:00
Akim Demaille 6255b43511 * 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:13:20 +00:00
Akim Demaille b29b2ed560 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:13:02 +00:00
Marc Autret b497173564 Update. 2001-11-22 22:00:43 +00:00
Marc Autret a81b1d4ad4 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0. 2001-11-22 22:00:21 +00:00
Marc Autret c1ecb3c1f5 * src/muscle_tab.c (muscle_init): Remove initialization of
skeleton muscle.
* src/output.c (output_master_parser): Do it here.
2001-11-22 21:45:14 +00:00
Akim Demaille cc72668cfb Englishoes reported by Jim. 2001-11-21 11:50:48 +00:00
Akim Demaille fbe01355c8 * 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:16:10 +00:00
Akim Demaille 81e895c01e * src/conflicts.c (conflicts_print): Add a missing n. 2001-11-19 11:08:22 +00:00
Akim Demaille d38d6e7c76 Formatting changes. 2001-11-19 10:43:20 +00:00
Akim Demaille 6bb1878b51 * src/nullable.c (nullable_print): New.
(set_nullable): Call it when tracing.
Better locality of variables.
2001-11-19 10:39:49 +00:00
Akim Demaille d9ec2d0749 * src/print.c (print_actions): Better locality of variables. 2001-11-19 10:39:35 +00:00
Akim Demaille 720e5c1bc3 * src/derives.c (print_derives): Fix and enrich.
* src/closure.c (print_fderives): Likewise.
2001-11-19 10:39:21 +00:00
Akim Demaille fb9087861f * src/closure.c (itemsetend): Remove, replaced with...
(itemsetsize): new.
2001-11-19 10:39:07 +00:00
Akim Demaille 125ecb5684 * src/LR0.c (kernel_end): Remove, replaced with...
(kernel_size): new.
2001-11-19 10:38:53 +00:00
Akim Demaille d8cf039f97 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
to clarify.
2001-11-19 10:38:39 +00:00
Akim Demaille 7bec0760a8 * src/closure.c (closure): Use arrays instead of pointers to clarify. 2001-11-19 10:38:25 +00:00
Akim Demaille c87d4863f6 * 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 10:38:12 +00:00
Akim Demaille 9bfe901c33 * src/getargs.c (statistics_flag): Replace with...
(trace_flag): New.
(longopts): Accept --trace instead of --statistics.
* src/getargs.h, src/options.c: 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 10:37:58 +00:00
Akim Demaille 97db7bd4a1 * 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 10:33:54 +00:00
Akim Demaille 2c5f66eda7 * 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 10:33:40 +00:00
Akim Demaille 300f275f23 * 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 10:31:49 +00:00
Akim Demaille f59c437a25 * 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 10:29:17 +00:00
Akim Demaille 6986fd9e3b * src/LR0.c (new_state): Complete trace code.
* src/nullable.c (set_nullable): Don't translate traces.
2001-11-19 10:28:57 +00:00
Akim Demaille 4bc30f78dc * src/print_graph.c (print_core): Better locality of variables.
* src/print.c (print_core): Likewise.
2001-11-19 10:28:43 +00:00
Akim Demaille 08a946e008 * 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 10:28:29 +00:00
Akim Demaille f047348491 * src/bison.simple (yyparse): When reporting verbosely an error,
no longer issue additional quotes around token names.
* tests/calc.at: Adjust.
2001-11-19 10:27:52 +00:00
Akim Demaille e41dc70020 * 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 10:26:16 +00:00
Akim Demaille 652a871c29 * 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 10:19:56 +00:00
Akim Demaille b2ed6e5826 * 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 10:19:20 +00:00
Akim Demaille edad70670f * src/reader.c (symbols_output): New, extracted from...
(packsymbols): Here.
(reader): Call it.
2001-11-19 10:14:29 +00:00
Akim Demaille 3feec03433 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
(maxrhs): this new function.
2001-11-19 10:09:24 +00:00
Akim Demaille ddcd5fdff6 * src/lalr.c (F): New macro to access to the variable F.
Adjust.
2001-11-19 10:09:11 +00:00
Akim Demaille bb527fc271 * 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 10:08:54 +00:00
Akim Demaille a845a69707 * src/lalr.c (initialize_LA): Only initialize LA. Let...
(set_state_table): handle the `lookaheads' members.
2001-11-19 10:08:34 +00:00
Akim Demaille f004bf6ac4 * 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 10:08:20 +00:00
Akim Demaille de326cc0de * 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 10:08:02 +00:00
Akim Demaille 90b4416b5b * 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 10:07:44 +00:00
Akim Demaille 9703cc49e0 * 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 10:07:14 +00:00
Akim Demaille d803322e27 * 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.
* tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
stderr, there can be way too much random noise.
Instead pass -Werror to GCC and rely on the exit status.
Reported by Wolfram Wagner.
2001-11-14 15:20:47 +00:00
Akim Demaille 3d76b07def * 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:44 +00:00
Akim Demaille 09b503c8e1 * src/print.c: Include reduce.h.
Reported by Hans Aberg.
2001-11-14 14:43:58 +00:00
Akim Demaille 0f37a9942f * 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:15:22 +00:00
Akim Demaille fa63c49821 Adjust ngettext default. 2001-11-12 10:14:44 +00:00
Akim Demaille d39d93b834 * 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:57:58 +00:00
Akim Demaille 9edcd89542 * 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:36:31 +00:00
Akim Demaille 7da99edea7 %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:33:38 +00:00
Akim Demaille ba9dda1a2e * tests/regression.at (Conflicts): Rename as...
(Unresolved SR Conflicts): this.
(Solved SR Conflicts): New.
2001-11-12 09:33:04 +00:00
Akim Demaille 337c5bd131 * 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:32:51 +00:00
Akim Demaille c73a41af8e * 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:32:35 +00:00
Akim Demaille 0df87bb609 * 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:31:40 +00:00
Akim Demaille e4d3d4de4c * tests/regression.at (Invalid input): Remove, duplicate with
``Invalid input: 1''.
2001-11-12 09:25:19 +00:00
Akim Demaille 6d7d248e72 * tests/torture.at (AT_DATA_STACK_TORTURE)
(Exploding the Stack Size with Alloca)
(Exploding the Stack Size with Malloc): New.
2001-11-12 09:25:05 +00:00
Akim Demaille e9e4c32114 * src/bison.simple (YYSTACK_REALLOC): New.
(yyparse) [!yyoverflow]: Use it and free the old stack.
Reported by FIXME: Who.
2001-11-12 09:24:50 +00:00
Akim Demaille 5f7e08323a * src/bison.simple: Define type yystype instead of YYSTYPE, and
define CPP macro, which substitute YYSTYPE by yystype.
* 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.
From Akim.
2001-11-12 09:24:14 +00:00
Akim Demaille e3f1699f55 * src/reader.c (symbols_output): New, extracted from...
(packsymbols): here.
(reader): Adjust.
2001-11-05 14:19:29 +00:00
Akim Demaille 65be086611 * src/lex.c (parse_percent_token): s/quotearg/quote/. 2001-11-05 10:07:46 +00:00
Akim Demaille e4d910bf0f * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
pattern.
2001-11-05 09:19:00 +00:00
Akim Demaille 1964ad8c34 Formatting changes. 2001-11-05 09:14:55 +00:00
Akim Demaille 951366c145 * src/options.h (struct option_table_struct): set_flags is void*.
* src/options.c (longopts): Support `--output' and `%output'.
(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.
2001-11-05 09:09:19 +00:00
Akim Demaille 9f4503d6e9 Adjust. 2001-11-05 09:00:17 +00:00
Akim Demaille d8988b2fff * 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-05 08:50:46 +00:00
Akim Demaille 92fcb5efbe Really update refcard.tex... 2001-11-02 17:20:22 +00:00
Akim Demaille 6468d18e5c * doc/refcard.tex: Update. 2001-11-02 17:19:46 +00:00
Akim Demaille 6b7e85b994 * 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:27:11 +00:00
Akim Demaille cd5aafcf8c * tests/regression.at (Mixing %token styles): New test. 2001-11-02 14:15:48 +00:00
Akim Demaille 037ca2f14c * src/reader.c (parse_thong_decl): Formatting changes.
(token_translations_init): New, extracted from...
(packsymbols): Here.
Adjust.
2001-11-02 14:04:54 +00:00
Akim Demaille 270a173cf3 * 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:28:38 +00:00
Akim Demaille 561f9a30af * 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:05:22 +00:00
Akim Demaille f987e9d257 * tests/calc.at: Catch up with 1.30.
* configure.in: Bump to 1.49a.
Adjust to newer Autotest.
2001-11-01 17:47:39 +00:00
Akim Demaille de76abc1e9 Regen. 2001-11-01 17:46:46 +00:00
Paul Eggert 4a0d893695 Sync with fileutils 4.1.1. 2001-10-26 07:26:00 +00:00
Pascal Bart 0846f581e8 * src/conflicts.c: Move global variables rrc_total and src_total ...
(print_conflicts): here.
* src/output.c (output): Free global variable user_toknums.
* src/lex.c (token_obstack): Become static.
2001-10-19 11:03:50 +00:00
Akim Demaille 490abf53b1 More ignores. 2001-10-18 15:27:30 +00:00
Akim Demaille 3c1a79b314 * tests/atlocal.in (GCC): Add.
* tests/calc.at: s/m4_match/m4_bmatch/.
s/m4_patsubst/m4_bpatsubst/.
(AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
* configure.in: AC_SUBST(GCC).
2001-10-18 15:26:56 +00:00
Marc Autret 5d52e7d045 * src/options.c (create_long_option_table): Fix. 2001-10-15 19:01:12 +00:00
Akim Demaille 004b178558 Remove. 2001-10-10 15:36:26 +00:00
Akim Demaille 3bcfa9dedd More ignores. 2001-10-10 15:29:08 +00:00
Akim Demaille 631aa1d3dc * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA. 2001-10-10 14:58:26 +00:00
Akim Demaille ee006e3a4c Adjust. 2001-10-04 15:12:55 +00:00
Akim Demaille 9449f6d3a8 Remove. 2001-10-04 15:10:56 +00:00
Akim Demaille c07c873533 Adjust. 2001-10-04 15:09:51 +00:00
Akim Demaille f6ec6d13dc * src/reader.c (parse_union_decl): Push the caracters in
union_obstack, not attrs_obstack.
2001-10-04 15:07:32 +00:00
Akim Demaille 342b8b6e21 Merge in branch-1_29. 2001-10-04 14:55:21 +00:00
Akim Demaille 0150aabe35 Regen. 2001-10-04 14:49:22 +00:00
Akim Demaille 8484abf02c Remove from repo. 2001-10-04 13:32:34 +00:00
Akim Demaille bafbfdd24c Update. 2001-10-04 13:31:41 +00:00
Akim Demaille 20e0b9749c Remove from the repo. 2001-10-04 13:25:06 +00:00
Akim Demaille 3a7bc75ff7 Remove for the repo. 2001-10-04 13:21:02 +00:00
Akim Demaille 40b97583b8 Remove. 2001-10-04 13:20:00 +00:00
Pascal Bart c20e2bdcf1 Ignore .flc 2001-09-25 11:37:26 +00:00
Pascal Bart 1c8c2190b1 * src/output.c (output_master_parser): Don't finish action_obstack.
(output_parser): Don't care about the muscle action, here.
(prepare): Copy the action_obstack in the action muscle.
(output): Free action_obstack.
2001-09-25 11:36:25 +00:00
Pascal Bart 180d45ba81 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
will contain `%union' declaration.
(parse_union_decl): Delete #line directive output.
(parse_union_decl): Substitute /attrs_obstack/union_obstack for all
informations about %union.
(parse_union_decl): Copy the union_obstack in the muscle stype.
* src/bison.simple: Add new #line directive.
Add typdef %%stype YYSTYPE.
2001-09-23 15:33:14 +00:00
Pascal Bart c51d1a1973 * src/bison.simple: Add new `#line' directive. 2001-09-22 22:02:34 +00:00
Pascal Bart 577c6c8499 Fix line report with input_line 2001-09-22 21:43:05 +00:00
Pascal Bart 6f9344dadf * src/bison.simple: New `#line' directive.
* src/output.c (output_parser): Support new dynamic muscle input_line.
2001-09-22 21:30:53 +00:00
Marc Autret 652def8074 * src/output.c (output_master_parser): New.
(output_parser): Be more re-entrant.
2001-09-22 12:18:16 +00:00
Marc Autret 209215672e Update. 2001-09-21 16:25:59 +00:00
Marc Autret 25b222faf6 * src/reader.c (copy_definition, parse_union_decl): Update and use
`linef' muscle.
(copy_action): Likewise.
Use obstack_1grow ().
* src/muscle_tab.c (muscle_init): Add muscle `linef'.
2001-09-21 16:25:19 +00:00
Marc Autret 6bc35ae56a * src/options.c (option_table): Adjust.
* src/lex.c (parse_percent_token): Fix.
2001-09-21 15:42:26 +00:00
Marc Autret 31b53af2fa Update. 2001-09-21 00:09:28 +00:00
Pascal Bart a474de9b9a Regen. 2001-09-20 19:11:28 +00:00
Pascal Bart c0629aa10f * src/options.c (symtab.h): Include it, need by lex.h. 2001-09-20 18:51:48 +00:00
Pascal Bart 82b6d266fd * src/lex.c (parse_percent_token): Change type of variable `tx', which
is now an option_table_struct*.
(option_strcmp): New function option_strcmp.
(parse_percent_token): Call option_strcmp.
* src/getargs.c (xalloc.h, options.h): Include it.
(getargs): Call create_long_option_table.
(getargs): Free longopts at the end of the function.
(shortopts): Move in options.c.
* src/options.c (create_long_option_table): New function.  Convert
information from option_table to option structure.
* src/reader.c (options.h): Include it.
* src/Makefile.am: Adjust.
* src/options.c (option_table): Create from longopts and percent_table.
* src/getargs.c (longopts): Delete.
* src/lex.c (struct percent_table_struct): Delete.
(percent_table): Delete.
(options.h): Include it.
* src/options.c: Create.
* src/options.h: Create.
Declare enum opt_access_e.
Define struct option_table_struct.
2001-09-20 18:32:20 +00:00
Marc Autret 75f5aaea27 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
sections of Bison.
2001-09-20 18:24:27 +00:00
Pascal Bart f508cb0ac9 * src/bison.simple: s/%%filename/%%skeleton.
* src/muscle_tab.c (getargs.h): Include it.
(muscle_init): Insert new muscle skeleton.
2001-09-19 19:25:02 +00:00
Marc Autret f3c383d683 Update. 2001-09-19 15:25:49 +00:00
Pascal Bart 13105fc158 * src/output.c (output_parser): Delete unused variable actions_dumped. 2001-09-18 21:32:53 +00:00
Pascal Bart b0c4483ed2 * src/output.c (output): Delete call to reader_output_yylsp.
* src/reader.c (reader): Likewise.
* src/reader.h:	Delete declaration of reader_output_yylsp.
2001-09-07 16:50:01 +00:00
Marc Autret 714720fcfe Update 2001-09-02 17:25:48 +00:00
Marc Autret 4766a52862 Regen 2001-09-02 16:21:30 +00:00
Marc Autret 11d82f03b4 * src/reader.c: Include muscle_tab.h.
(parse_union_decl): Update.
(parse_macro_decl): Rename parse_muscle_decl.
Update to use renamed functions and variable.
(read_declarations, copy_action, read_additionnal_code, : Updated
with correct variables and functions names.
(packsymbols, reader): Likewise.
* src/reader.h (muscle_obstack): Extern declaration update.
* src/output.c: Include muscle_tab.h
In all functions using macro_insert, change by using muscle_insert ().
(macro_obstack): Rename muscle_obstack.
Echo modifications in the whole file.
(MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
(MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
(MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
* src/muscle_tab.h: Update double inclusion macros.
(macro_entry_s): Rename muscle_entry_s.
Update prototypes.
* src/muscle_tab.c: Include muscle_tab.h.
Rename macro_tabble to muscle_table.
(mhash1, mhash2, mcmp): Use muscle_entry.
(macro_init): Rename muscle_init. Update.
(macro_insert): Rename muscle_insert. Update.
(macro_find): Rename muscle_find. Update.
* src/main.c: Include muscle_tab.h.
(main): Call muscle_init ().
* src/Makefile.am (bison_SOURCES): Echo modifications.
2001-09-02 15:43:29 +00:00
Marc Autret a0ed1cb86a Update 2001-09-02 15:43:04 +00:00
Marc Autret f753cd6292 Add src/muscle_tab.c and src/muscle_tab.h 2001-09-02 15:27:27 +00:00
Marc Autret 93a37297e6 Remove src/macrotab.c and src/macrotab.h 2001-09-02 15:19:49 +00:00
Marc Autret 4134cae3c5 Update 2001-09-01 11:38:12 +00:00
Pascal Bart 682d48cd09 * src/reader.c (copy_guard): Use muscle to specify the `#line'
filename.
2001-09-01 10:40:54 +00:00
Marc Autret 53cdf751a3 Update 2001-09-01 01:23:21 +00:00
Marc Autret 087c8fdae3 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
to an explicit value to activate the feature. We do it here.
2001-09-01 01:20:54 +00:00
Pascal Bart 7a999fcb7b Update. 2001-08-31 23:24:55 +00:00
Pascal Bart dda680cb80 * src/output.c (prepare): Delete the `filename' muscule insertion.
* src/reader.c (copy_action): Use `filename' muscule with `#line'.
(parse_union_decl): Likewise.
* src/macrotab.c (macro_init): Initialize filename by infile.
2001-08-31 18:51:06 +00:00
Marc Autret 6b7d911c5d Update 2001-08-31 18:46:10 +00:00
Marc Autret 9e644e648d * src/bison.simple (YYLSP_NEEDED): New definition.
* src/output.c (prepare): Add macro insertion of `locations_flag'
2001-08-31 18:30:21 +00:00
Pascal Bart 17da6427fe * src/output.c (prepare): Delete insertion of previous muscles,
and insert the `prefix' muscles.
* src/macrotab.c (macro_init): Likewise.
(macro_init): Initialization prefix directive by `yy'.
* src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
%%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
yylval, yydebug, yyerror, yynerrs and yyparse.
New directive `#define' to substitute yydebug, ... with option
name_prefix.
2001-08-31 18:22:54 +00:00
Marc Autret 01ed3db59b Update 2001-08-31 17:07:18 +00:00
Pascal Bart e8cb70b957 * src/main.c (main): Standardize.
* src/output.c (output_table_data, output_parser): Likewise.
* src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
2001-08-31 16:56:44 +00:00
Marc Autret 63c2d5de0f * src/reader.c (read_additionnal_code): Rename %%user_code to
%%epilogue.
* src/output.c (output): Rename %%declarations to %%prologue.
* src/bison.simple: Echo modifications.
2001-08-31 16:01:53 +00:00
Marc Autret 675bc4e954 Update 2001-08-31 14:40:06 +00:00
Marc Autret d8cb51834b * src/reader.c (readgram): CleanUp.
(output_token_defines): Likewise.
(packsymbols): Likewise.
(reader): Likewise.
* src/output.c (output): CPP-out useless code.
2001-08-31 11:47:08 +00:00
Pascal Bart 6c686258e3 * src/reader.c (reader): Delete obsolete call to function
output_trailers and output_headers.
* src/output.h: Remove obsolete functions prototypes of output_headers
and output_trailers.
2001-08-31 08:00:56 +00:00
Marc Autret c111e171cd Update 2001-08-31 00:26:05 +00:00
Pascal Bart 8f451ef727 * src/main.c: Include macrotab.h.
* src/macrotab.h (macro_entry_s): Constify fields.
Adjust functions prototypes.
* src/macrotab.c (macro_insert): Constify key and value.
(macro_find): Constify key.
(macro_insert): Include 'xalloc.h'
(macro_insert): Use XMALLOC.
(macro_find): Constify return value.
* src/output.c (output_table_data): Rename table to table_data.
(output_parser): Constify macro_key, macro_value.
2001-08-30 18:51:56 +00:00
Akim Demaille 5086915ebd file bison was initially added on branch bison-1_29-branch. 2001-08-30 15:36:37 +00:00
Marc Autret 416bd7a9f3 New file 2001-08-30 00:44:59 +00:00
Marc Autret 997b6fd0c7 Adjust 2001-08-30 00:44:14 +00:00
Marc Autret 2ba3b73c58 * src/reader.c (parse_skel_decl): New.
(read_declarations): Add case `tok_skel', call parse_skel_decl ().
* src/lex.h (token_t): New token `tok_skel'.
* src/lex.c (percent_table): Add skeleton option entry.
Standardize.
2001-08-30 00:41:37 +00:00
Marc Autret ff48177d25 * src/bison.simple: Add %%user_code directive at the end.
* src/reader.c (read_additionnal_code): New.
(reader): Use it.
* src/output.c (output_program): Remove.
(output): Update.
2001-08-29 14:17:00 +00:00
Marc Autret 4e5caae2c6 Adjust 2001-08-28 20:55:58 +00:00
Marc Autret b33160bf45 * src/output.c (output_actions): Clean up.
* src/reader.c (reader): Clean up, CPP-out useless code.
2001-08-28 20:48:17 +00:00
Pascal Bart 535c0e75d1 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
directive.
* src/bison.simple: Add `%%definitions'.
2001-08-28 18:36:57 +00:00
Pascal Bart d1a2daf76a * src/output.c (output_definitions): New function, which copies
attrs_obstack in the '%%definitions' directive.
* src/bison.simple: Add `%%definitions'.
2001-08-28 18:35:33 +00:00
Marc Autret 2b763dfe15 * config/depcomp: New file. 2001-08-28 17:53:07 +00:00
Paul Eggert f1a87ef6ad * src/bison.simple (yyparse): Don't take the address of an
item before the start of an array, as that doesn't conform to
the C Standard.
2001-08-27 17:28:28 +00:00
Paul Eggert cbd8990652 (yyparse): Don't take the address of an item before the start of an
array, as that doesn't conform to the C Standard.
2001-08-27 17:24:34 +00:00
Robert Anisko 82e236e2d6 * src/output.c (output): Remove the initialization of the macro
obstack.  It was done too late here.

* src/reader.c (parse_macro_decl): Fix.  Use of the macro obstack was
completely wrong.
(reader): Initialize the macro obstack here, since we need it to grow
'%define' directives.

* src/reader.h: Declare the macro obstack as extern.
2001-08-27 14:55:39 +00:00
Robert Anisko b0cfa28a12 * src/output.c (output_parser): Fix. Store single '%' characters in
the output obstack instead of throwing them away.
2001-08-27 14:34:02 +00:00
Akim Demaille 6fc7423473 * Makefile.am (AUTOMAKE_OPTIONS): 1.5. 2001-08-27 08:57:54 +00:00
Marc Autret 40a64a7a48 Adjust 2001-08-25 18:38:03 +00:00
Robert Anisko 944bc6ce43 Regen. 2001-08-25 15:40:51 +00:00
Robert Anisko 9c76d118cc * lib/Makefile.am: Adjust. 2001-08-25 15:28:07 +00:00
Robert Anisko a8289c62db * src/bison.simple: Update and add '%%' directives. 2001-08-25 15:21:05 +00:00
Robert Anisko b6610515d5 * src/reader.c (reader): Remove calls to 'output_headers' and
'output_trailers'. Remove some C output.
(readgram): Disable a piece of code that was writing a default
definition for 'YYSTYPE'.
(reader_output_yylsp): Remove.
(packsymbols): Output token defintions to a macro.
(copy_definition): Disable C output.
* src/reader.c (parse_macro_decl): New function used to parse macro
declarations.
(copy_string2): Put the body of copy_string into this new function.
Add a parameter to let the caller choose whether he wants to copy the
string delimiters or not.
(copy_string): Be a simple call to copy_string2 with the last argument
bound to true.
(read_declarations): Add case for macro definition.
(copy_identifier): New.
(parse_macro_decl): Read macro identifiers using copy_identifier
rather than lex.
2001-08-25 15:13:42 +00:00
Robert Anisko 26f609ffc3 * src/output.c (prepare): Add prefixed names.
(output_parser): Output semantic actions.
(output_parser): Fix bug on '%%line' directives.
* src/output.c (output_headers): Remove. The C code printed by this
function should now be in the skeletons.
(output_trailers): Remove.
(output): Disable call to 'reader_output_yylsp'.
(output_rule_data): Do not output tables to the table obstack.
* src/output.c: Remove some C dedicated output.
Improve the use of macro and output obstacks.
(output_defines): Remove.
* src/output.c (output_token_translations): Associate 'translate'
table with a macro. No output to the table obstack.
(output_gram): Same for 'rhs' and 'prhs'.
(output_stos): Same for 'stos'.
(output_rule_data): Same for 'r1' and 'r2'.
(token_actions): Same for 'defact'.
(goto_actions): Same for 'defgoto'.
(output_base): Same for 'pact' and 'pgoto'.
(output_table): Same for 'table'.
(output_check): Same for 'check'.
* src/output.c (output_table_data): New function.
(output_short_table): Remove.
(output_short_or_char_table): Remove.
* src/output.c (output_parser): Replace most of the skeleton copy code
with something new. Skeletons are now processed character by character
rather than line by line, and Bison looks for '%%' macros. This is the
first step in making Bison's output process (a lot) more flexible.
(output_parser): Use the macro table.
2001-08-25 15:07:59 +00:00
Robert Anisko 6f43b11362 * src/main.c (main): Initialize the macro table. 2001-08-25 14:34:41 +00:00
Robert Anisko dd3127cf7a * src/lex.c (percent_table): Add tok_define.
* src/lex.h: Add tok_define.
2001-08-25 14:27:57 +00:00
Robert Anisko aa321494cf * src/macrotab.c: New file.
* src/macrotab.h: New file.
* src/Makefile.am: Update.
2001-08-25 14:21:46 +00:00
Robert Anisko 68bd3b6bfa * lib/hash.c: New file.
* lib/hash.h: New file.
* lib/Makefile.am: Update.
2001-08-25 14:15:11 +00:00
Robert Anisko bbb5bcc6f8 Revert to 1.28c 2001-08-25 13:13:14 +00:00
Pascal Bart 667a550e7b More cvsignore. 2001-08-23 22:51:37 +00:00
Pascal Bart 713fa62a74 Fix clcommit. 2001-08-21 20:44:16 +00:00
Robert Anisko 83cd972a1a 2001-08-20 Robert Anisko <[email protected]>
* src/output.c (prepare): Add prefixed names.
	(output_parser): Output semantic actions.
	(output_parser): Fix bug on '%%line' directives.

2001-08-19  Robert Anisko  <[email protected]>

	* src/output.c (output_rule_data): Do not output tables to
	the table obstack.

	* src/reader.c (reader): Remove calls to 'output_headers' and
	'output_trailers'. Remove some C output.
	(readgram): Disable a piece of code that was writing a default
	definition for 'YYSTYPE'.
	(reader_output_yylsp): Remove.
	(packsymbols): Output token defintions to a macro.
	(copy_definition): Disable C output.

	* src/output.c (output_headers): Remove. The C code printed by this
	function should now be in the skeletons.
	(output_trailers): Remove.
	(output): Disable call to 'reader_output_yylsp'.

2001-08-18  Robert Anisko  <[email protected]>

	* src/output.c: Remove some C dedicated output.

2001-08-18  Robert Anisko  <[email protected]>

	* src/output.c (output_defines): Remove.

2001-08-18  Robert Anisko  <[email protected]>

	* src/output.c: Improve the use of macro and output obstacks.

2001-08-18  Robert Anisko  <[email protected]>

	* src/output.c (output_token_translations): Associate 'translate' table
	with a macro. No output to the table obstack.
	(output_gram): Same for 'rhs' and 'prhs'.
	(output_stos): Same for 'stos'.
	(output_rule_data): Same for 'r1' and 'r2'.
	(token_actions): Same for 'defact'.
	(goto_actions): Same for 'defgoto'.
	(output_base): Same for 'pact' and 'pgoto'.
	(output_table): Same for 'table'.
	(output_check): Same for 'check'.

2001-08-18  Robert Anisko  <[email protected]>

	* src/output.c (output_table_data): New function.
	(output_short_table): Remove.
	(output_short_or_char_table): Remove.

2001-08-17  Robert Anisko  <[email protected]>

	* src/main.c (main): Initialize the macro table.

2001-08-17  Robert Anisko  <[email protected]>

	* src/output.c (output_parser): Use the macro table.
	* src/macrotab.c: New file.
	* src/macrotab.h: New file.

2001-08-17  Robert Anisko  <[email protected]>

	* lib/xalloc.h (CALLOC, MALLOC, REALLOC): New macros.

2001-08-17  Robert Anisko  <[email protected]>

	* lib/hash.c: New file.
	* lib/hash.h: New file.

2001-08-16  Robert Anisko  <[email protected]>

	* src/reader.c (parse_macro_decl): Read macro identifiers using
	copy_identifier rather than lex.

2001-08-16  Robert Anisko  <[email protected]>

	* src/reader.c (copy_identifier): New.

2001-08-16  Robert Anisko  <[email protected]>

	* src/reader.c (read_declarations): Add case for macro definition.
	* src/lex.c (percent_table): Add tok_define.
	* src/lex.h: Add tok_define.

2001-08-16  Robert Anisko  <[email protected]>

	* src/reader.c (parse_macro_decl): New function used to parse macro
	declarations.
	(copy_string2): Put the body of copy_string into this new function.
	Add a parameter to let the caller choose whether he wants to copy the
	string delimiters or not.
	(copy_string): Be a simple call to copy_string2 with the last argument
	bound to true.

2001-08-15  Robert Anisko  <[email protected]>

	* src/output.c (output_parser): Replace most of the skeleton copy code
	with something new. Skeletons are now processed character by character
	rather than line by line, and Bison looks for '%%' macros. This is the
	first step in making Bison's output process (a lot) more flexible.
2001-08-21 19:47:13 +00:00
139 changed files with 10831 additions and 40285 deletions
+9
View File
@@ -9,4 +9,13 @@ patches
*.patch *.log log patches applied
*.prj
releases
*.flc
autom4te.cache
intl
Makefile.in
configure
config.hin
aclocal.m4
ABOUT-NLS
INSTALL
COPYING
-324
View File
@@ -1,324 +0,0 @@
Notes on the Free Translation Project
*************************************
Free software is going international! The Free Translation Project
is a way to get maintainers of free software, translators, and users all
together, so that will gradually become able to speak many languages.
A few packages already provide translations for their messages.
If you found this `ABOUT-NLS' file inside a distribution, you may
assume that the distributed package does use GNU `gettext' internally,
itself available at your nearest GNU archive site. But you do _not_
need to install GNU `gettext' prior to configuring, installing or using
this package with messages translated.
Installers will find here some useful hints. These notes also
explain how users should proceed for getting the programs to use the
available translations. They tell how people wanting to contribute and
work at translations should contact the appropriate team.
When reporting bugs in the `intl/' directory or bugs which may be
related to internationalization, you should tell about the version of
`gettext' which is used. The information can be found in the
`intl/VERSION' file, in internationalized packages.
Quick configuration advice
==========================
If you want to exploit the full power of internationalization, you
should configure it using
./configure --with-included-gettext
to force usage of internationalizing routines provided within this
package, despite the existence of internationalizing capabilities in the
operating system where this package is being installed. So far, only
the `gettext' implementation in the GNU C library version 2 provides as
many features (such as locale alias, message inheritance, automatic
charset conversion or plural form handling) as the implementation here.
It is also not possible to offer this additional functionality on top
of a `catgets' implementation. Future versions of GNU `gettext' will
very likely convey even more functionality. So it might be a good idea
to change to GNU `gettext' as soon as possible.
So you need _not_ provide this option if you are using GNU libc 2 or
you have installed a recent copy of the GNU gettext package with the
included `libintl'.
INSTALL Matters
===============
Some packages are "localizable" when properly installed; the
programs they contain can be made to speak your own native language.
Most such packages use GNU `gettext'. Other packages have their own
ways to internationalization, predating GNU `gettext'.
By default, this package will be installed to allow translation of
messages. It will automatically detect whether the system already
provides the GNU `gettext' functions. If not, the GNU `gettext' own
library will be used. This library is wholly contained within this
package, usually in the `intl/' subdirectory, so prior installation of
the GNU `gettext' package is _not_ required. Installers may use
special options at configuration time for changing the default
behaviour. The commands:
./configure --with-included-gettext
./configure --disable-nls
will respectively bypass any pre-existing `gettext' to use the
internationalizing routines provided within this package, or else,
_totally_ disable translation of messages.
When you already have GNU `gettext' installed on your system and run
configure without an option for your new package, `configure' will
probably detect the previously built and installed `libintl.a' file and
will decide to use this. This might be not what is desirable. You
should use the more recent version of the GNU `gettext' library. I.e.
if the file `intl/VERSION' shows that the library which comes with this
package is more recent, you should use
./configure --with-included-gettext
to prevent auto-detection.
The configuration process will not test for the `catgets' function
and therefore it will not be used. The reason is that even an
emulation of `gettext' on top of `catgets' could not provide all the
extensions of the GNU `gettext' library.
Internationalized packages have usually many `po/LL.po' files, where
LL gives an ISO 639 two-letter code identifying the language. Unless
translations have been forbidden at `configure' time by using the
`--disable-nls' switch, all available translations are installed
together with the package. However, the environment variable `LINGUAS'
may be set, prior to configuration, to limit the installed set.
`LINGUAS' should then contain a space separated list of two-letter
codes, stating which languages are allowed.
Using This Package
==================
As a user, if your language has been installed for this package, you
only have to set the `LANG' environment variable to the appropriate
`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
and `CC' is an ISO 3166 two-letter country code. For example, let's
suppose that you speak German and live in Germany. At the shell
prompt, merely execute `setenv LANG de_DE' (in `csh'),
`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
This can be done from your `.login' or `.profile' file, once and for
all.
You might think that the country code specification is redundant.
But in fact, some languages have dialects in different countries. For
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
country code serves to distinguish the dialects.
Not all programs have translations for all languages. By default, an
English message is shown in place of a nonexistent translation. If you
understand other languages, you can set up a priority list of languages.
This is done through a different environment variable, called
`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
for the purpose of message handling, but you still need to have `LANG'
set to the primary language; this is required by other parts of the
system libraries. For example, some Swedish users who would rather
read translations in German than English for when Swedish is not
available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
In the `LANGUAGE' environment variable, but not in the `LANG'
environment variable, `LL_CC' combinations can be abbreviated as `LL'
to denote the language's main dialect. For example, `de' is equivalent
to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
(Portuguese as spoken in Portugal) in this context.
Translating Teams
=================
For the Free Translation Project to be a success, we need interested
people who like their own language and write it well, and who are also
able to synergize with other translators speaking the same language.
Each translation team has its own mailing list. The up-to-date list of
teams can be found at the Free Translation Project's homepage,
`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
area.
If you'd like to volunteer to _work_ at translating messages, you
should become a member of the translating team for your own language.
The subscribing address is _not_ the same as the list itself, it has
`-request' appended. For example, speakers of Swedish can send a
message to `[email protected]', having this message body:
subscribe
Keep in mind that team members are expected to participate
_actively_ in translations, or at solving translational difficulties,
rather than merely lurking around. If your team does not exist yet and
you want to start one, or if you are unsure about what to do or how to
get started, please write to `[email protected]' to reach the
coordinator for all translator teams.
The English team is special. It works at improving and uniformizing
the terminology in use. Proven linguistic skill are praised more than
programming skill, here.
Available Packages
==================
Languages are not equally supported in all packages. The following
matrix shows the current state of internationalization, as of September
2001. The matrix shows, in regard of each package, for which languages
PO files have been submitted to translation coordination, with a
translation percentage of at least 50%.
Ready PO files bg cs da de el en eo es et fi fr gl he hr id it ja
+----------------------------------------------------+
a2ps | [] [] [] |
bash | [] [] [] [] |
bfd | |
binutils | [] |
bison | [] [] [] [] [] |
clisp | [] [] [] [] |
cpio | [] [] [] [] [] |
diffutils | [] [] [] [] [] [] [] |
enscript | [] [] |
error | [] [] |
fetchmail | |
fileutils | [] [] [] [] [] [] [] [] |
findutils | [] [] [] [] [] [] [] [] |
flex | [] [] [] |
freetype | |
gas | |
gawk | [] [] |
gcal | |
gcc | |
gettext | [] [] [] [] [] [] [] [] [] [] |
gnupg | [] [] [] [] [] [] [] |
gprof | |
grep | [] [] [] [] [] [] [] [] |
hello | [] [] [] [] [] [] [] [] [] [] [] |
id-utils | [] [] [] |
indent | [] [] [] [] [] |
jpilot | [] |
kbd | |
ld | [] |
libc | [] [] [] [] [] [] [] [] |
lilypond | [] |
lynx | [] [] [] [] |
m4 | [] [] [] [] [] [] [] [] |
make | [] [] [] [] [] [] |
mysecretdiary | [] |
nano | [] [] [] |
opcodes | |
parted | [] [] [] |
ptx | [] [] [] [] [] [] [] |
python | |
recode | [] [] [] [] [] [] [] [] [] |
sed | [] [] [] [] [] [] [] [] [] [] [] [] |
sh-utils | [] [] [] [] [] [] [] [] [] [] |
sharutils | [] [] [] [] [] [] [] [] |
sketch | |
soundtracker | [] [] [] |
sp | |
tar | [] [] [] [] [] [] [] [] |
texinfo | [] [] [] [] [] [] |
textutils | [] [] [] [] [] [] [] [] |
util-linux | [] [] |
wdiff | [] [] [] |
wget | [] [] [] [] [] [] [] [] [] [] |
+----------------------------------------------------+
bg cs da de el en eo es et fi fr gl he hr id it ja
0 14 24 32 11 1 8 23 13 1 33 22 4 0 7 9 18
ko lv nb nl nn no pl pt pt_BR ru sk sl sv tr uk zh
+----------------------------------------------------+
a2ps | [] [] [] | 6
bash | | 4
bfd | | 0
binutils | | 1
bison | [] | 6
clisp | [] | 5
cpio | [] [] [] [] [] | 10
diffutils | [] [] [] [] | 11
enscript | [] [] [] | 5
error | [] [] | 4
fetchmail | | 0
fileutils | [] [] [] [] [] [] [] [] [] | 17
findutils | [] [] [] [] [] [] [] [] | 16
flex | [] [] [] | 6
freetype | | 0
gas | | 0
gawk | [] | 3
gcal | | 0
gcc | | 0
gettext | [] [] [] [] [] [] [] [] | 18
gnupg | [] [] [] | 10
gprof | | 0
grep | [] [] [] [] | 12
hello | [] [] [] [] [] [] [] [] [] [] [] | 22
id-utils | [] [] [] | 6
indent | [] [] [] [] [] [] [] | 12
jpilot | | 1
kbd | [] | 1
ld | | 1
libc | [] [] [] [] [] [] [] [] | 16
lilypond | [] [] | 3
lynx | [] [] [] [] | 8
m4 | [] [] [] [] | 12
make | [] [] [] [] [] [] | 12
mysecretdiary | | 1
nano | [] | 4
opcodes | [] | 1
parted | [] [] | 5
ptx | [] [] [] [] [] [] [] [] | 15
python | | 0
recode | [] [] [] [] | 13
sed | [] [] [] [] [] [] [] | 19
sh-utils | [] [] [] [] [] [] [] [] [] [] [] | 21
sharutils | [] [] [] | 11
sketch | | 0
soundtracker | | 3
sp | | 0
tar | [] [] [] [] [] [] [] | 15
texinfo | [] | 7
textutils | [] [] [] [] [] [] [] [] | 16
util-linux | [] [] | 4
wdiff | [] [] [] [] | 7
wget | [] [] [] [] [] [] [] | 17
+----------------------------------------------------+
33 teams ko lv nb nl nn no pl pt pt_BR ru sk sl sv tr uk zh
53 domains 9 1 6 20 0 6 17 1 13 25 10 11 23 21 2 2 387
Some counters in the preceding matrix are higher than the number of
visible blocks let us expect. This is because a few extra PO files are
used for implementing regional variants of languages, or language
dialects.
For a PO file in the matrix above to be effective, the package to
which it applies should also have been internationalized and
distributed as such by its maintainer. There might be an observable
lag between the mere existence a PO file and its wide availability in a
distribution.
If September 2001 seems to be old, you may fetch a more recent copy
of this `ABOUT-NLS' file on most GNU archive sites. The most
up-to-date matrix with full percentage details can be found at
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
Using `gettext' in new packages
===============================
If you are writing a freely available program and want to
internationalize it you are welcome to use GNU `gettext' in your
package. Of course you have to respect the GNU Library General Public
License which covers the use of the GNU `gettext' library. This means
in particular that even non-free programs can use `libintl' as a shared
library, whereas only free software can use `libintl' as a static
library or use modified versions of `libintl'.
Once the sources are changed appropriately and the setup can handle
to use of `gettext' the only thing missing are the translations. The
Free Translation Project is also available for packages which are not
developed inside the GNU project. Therefore the information given above
applies also for every other Free Software Project. Contact
`[email protected]' to make the `.pot' files available to
the translation teams.
+1610 -352
View File
File diff suppressed because it is too large Load Diff
-231
View File
@@ -1,231 +0,0 @@
Copyright 1994, 1995, 1996, 1999, 2000, 2001 Free Software Foundation,
Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. (Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You only need
`configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for variables by setting
them in the environment. You can do that on the command line like this:
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a
time in the source code directory. After you have installed the
package for one architecture, use `make distclean' before reconfiguring
for another architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it cannot guess the host type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are _building_ compiler tools for cross-compiling, you should
use the `--target=TYPE' option to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the host
platform (i.e., that on which the generated programs will eventually be
run) with `--host=TYPE'. In this case, you should also specify the
build platform with `--build=TYPE', because, in this case, it may not
be possible to guess the build platform (it sometimes involves
compiling and running simple test programs, and this can't be done if
the compiler is a cross compiler).
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
will cause the specified gcc to be used as the C compiler (unless it is
overridden in the site shell script).
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of the options to `configure', and exit.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
+3 -1
View File
@@ -1,3 +1,5 @@
## 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
@@ -18,7 +20,7 @@ AUTOMAKE_OPTIONS = 1.5 check-news readme-alpha dist-bzip2
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = config intl po lib src doc m4 tests
SUBDIRS = config intl po lib data src doc m4 tests
EXTRA_DIST = REFERENCES configure.bat OChangeLog Makefile.maint GNUmakefile
-477
View File
@@ -1,477 +0,0 @@
# Makefile.in generated by automake 1.5c from Makefile.am.
# @configure_input@
# 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,
# 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_sh_DATA = $(install_sh) -c -m 644
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@
LIB = @LIB@
LIBICONV = @LIBICONV@
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.5 check-news readme-alpha dist-bzip2
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = config intl po lib src doc m4 tests
EXTRA_DIST = REFERENCES configure.bat OChangeLog Makefile.maint GNUmakefile
DISTCLEANFILES = intl/libintl.h
move_if_change = $(srcdir)/config/move-if-change
prev_version_file = $(srcdir)/config/prev-version.txt
release_archive_dir = releases
# Uploading betas.
hosts = alpha
alpha_host = alpha.gnu.org
alpha_url_dir = gnu/bison
# Files to update automatically.
wget_files = $(srcdir)/config/config.guess $(srcdir)/config/config.sub \
$(srcdir)/config/texinfo.tex
cvs_files = $(srcdir)/config/missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = intl/Makefile
DIST_SOURCES =
RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
uninstall-info-recursive all-recursive install-data-recursive \
install-exec-recursive installdirs-recursive install-recursive \
uninstall-recursive check-recursive installcheck-recursive
DIST_COMMON = README ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL \
Makefile.am Makefile.in NEWS THANKS aclocal.m4 config.hin \
configure configure.in
DIST_SUBDIRS = $(SUBDIRS)
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
$(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 $@ $(am__depfiles_maybe)
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): configure.in m4/c-bs-a.m4 m4/codeset.m4 m4/dmalloc.m4 m4/error.m4 m4/gettext.m4 m4/glibc21.m4 m4/iconv.m4 m4/isc-posix.m4 m4/lcmessage.m4 m4/malloc.m4 m4/mbrtowc.m4 m4/mbstate_t.m4 m4/prereq.m4 m4/progtest.m4 m4/realloc.m4 m4/strerror_r.m4 m4/warning.m4
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.hin $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.hin: $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOHEADER)
touch $(srcdir)/config.hin
distclean-hdr:
-rm -f config.h
intl/Makefile: $(top_builddir)/config.status $(top_srcdir)/intl/Makefile.in
cd $(top_builddir) && $(SHELL) ./config.status $@
uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ETAGS = etags
ETAGSFLAGS =
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(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
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \
done; \
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)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = .
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; \
then :; else \
echo "NEWS not updated; not releasing" 1>&2; \
exit 1; \
fi
$(am__remove_distdir)
mkdir $(distdir)
$(mkinstalldirs) $(distdir)/intl $(distdir)/po $(distdir)/tests
@for file in $(DISTFILES); do \
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 \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir)$$dir \
|| exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" \
distdir=../$(distdir)/$$subdir \
distdir) \
|| exit 1; \
fi; \
done
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
$(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
$(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
$(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
$(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
mkdir $(distdir)/=inst
chmod a-w $(distdir)
dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
&& 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 \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
find $$dc_install_base -type f -print ; \
exit 1; } >&2 ) \
&& $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
&& rm -f $(distdir).tar.gz \
&& $(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
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-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:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
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-recursive
clean-am: clean-generic mostlyclean-am
distclean: distclean-recursive
-rm -f config.status config.cache config.log
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
dvi: dvi-recursive
dvi-am:
info: info-recursive
info-am:
install-data-am:
install-exec-am:
install-info: install-info-recursive
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
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 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 \
installdirs installdirs-am installdirs-recursive \
maintainer-clean maintainer-clean-generic \
maintainer-clean-recursive mostlyclean mostlyclean-generic \
mostlyclean-recursive tags tags-recursive uninstall \
uninstall-am uninstall-info-am uninstall-info-recursive \
uninstall-recursive
# 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:
+13 -36
View File
@@ -1,42 +1,20 @@
Bison News
----------
Changes in version 1.34, 2002-03-12:
Changes in version 1.49a:
* File name clashes are detected
$ bison foo.y -d -o foo.x
fatal error: header and parser would be both named `foo.x'
* Items overflow
Bison no longer dumps core when there are too many items, it just
dies.
* 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
* Token end-of-file
The token end of file may be specified by the user, in which case,
the user symbol is used in the reports, the graphs, and the verbose
error messages instead of `$', which remains being the defaults.
For instance
%token YYEOF 0
or
%token YYEOF 0 "end of file"
Changes in version 1.31, 2002-01-14:
@@ -65,7 +43,6 @@ Changes in version 1.31, 2002-01-14:
* 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.
@@ -123,7 +100,7 @@ Changes in version 1.31, 2002-01-14:
* --output
New, aliasing `--output-file'.
Changes in version 1.30, 2001-10-26:
Changes in version 1.30:
* `--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
-3
View File
@@ -5,9 +5,7 @@ Airy Andre [email protected]
Akim Demaille [email protected]
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]
@@ -15,7 +13,6 @@ 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]
+68
View File
@@ -0,0 +1,68 @@
-*- outline -*-
* NEWS
Sort from 1.31 NEWS.
* Prologue
The %union is declared after the user C declarations. It can be
a problem if YYSTYPE is declared after the user part. []
Actually, the real problem seems that the %union ought to be output
where it was defined. For instance, in gettext/intl/plural.y, we
have:
%{
...
#include "gettextP.h"
...
%}
%union {
unsigned long int num;
enum operator op;
struct expression *exp;
}
%{
...
static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
...
%}
Where the first part defines struct expression, the second uses it to
define YYSTYPE, and the last uses YYSTYPE. Only this order is valid.
* --graph
Show reductions. []
* Broken options ?
** %no-lines [ok]
** %no-parser []
** %pure-parser []
** %semantic-parser []
** %token-table []
** Options which could use parse_dquoted_param ().
Maybe transfered in lex.c.
*** %skeleton [ok]
*** %output []
*** %file-prefix []
*** %name-prefix []
** Skeleton strategy. []
Must we keep %no-parser?
%token-table?
*** New skeletons. []
* src/print_graph.c
Find the best graph parameters. []
* doc/bison.texinfo
** Update
informations about ERROR_VERBOSE. []
** Add explainations about
skeleton muscles. []
%skeleton. []
* testsuite
** tests/pure-parser.at []
New tests.
Vendored
-1820
View File
File diff suppressed because it is too large Load Diff
+74 -102
View File
@@ -5,110 +5,97 @@
*/
#undef CRAY_STACKSEG_END
/* Define to 1 if using `alloca.c'. */
/* Define 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 to 1 if you have `alloca', as a function or macro. */
/* Define if you have `alloca', as a function or macro. */
#undef HAVE_ALLOCA
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
#undef HAVE_ALLOCA_H
/* Define to 1 if you have the <argz.h> header file. */
/* Define if you have the <argz.h> header file. */
#undef HAVE_ARGZ_H
/* Define to 1 if you have the <ctype.h> header file. */
/* Define 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 to 1 if you have the `dcgettext' function. */
/* Define 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
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
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 to 1 if you have the `doprnt' function. */
/* Define if you have the `doprnt' function. */
#undef HAVE_DOPRNT
/* Define to 1 if you have the `feof_unlocked' function. */
/* Define if you have the `feof_unlocked' function. */
#undef HAVE_FEOF_UNLOCKED
/* Define to 1 if you have the `fgets_unlocked' function. */
/* Define if you have the `fgets_unlocked' function. */
#undef HAVE_FGETS_UNLOCKED
/* Define to 1 if you have the `getcwd' function. */
/* Define if you have the `getcwd' function. */
#undef HAVE_GETCWD
/* Define to 1 if you have the `getegid' function. */
/* Define if you have the `getegid' function. */
#undef HAVE_GETEGID
/* Define to 1 if you have the `geteuid' function. */
/* Define if you have the `geteuid' function. */
#undef HAVE_GETEUID
/* Define to 1 if you have the `getgid' function. */
/* Define if you have the `getgid' function. */
#undef HAVE_GETGID
/* Define to 1 if you have the `getpagesize' function. */
/* Define if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
/* Define to 1 if you have the `getuid' function. */
/* Define if you have the `getuid' function. */
#undef HAVE_GETUID
/* Define if you have the iconv() function. */
#undef HAVE_ICONV
/* Define to 1 if you have the <inttypes.h> header file. */
/* Define if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `isascii' function. */
/* Define if you have the `isascii' function. */
#undef HAVE_ISASCII
/* Define to 1 if you have the `iswprint' function. */
/* Define if you have the `iswprint' function. */
#undef HAVE_ISWPRINT
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
@@ -117,127 +104,130 @@
/* Define if your <locale.h> file defines LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
/* Define to 1 if you have the <limits.h> header file. */
/* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define to 1 if you have the <locale.h> header file. */
/* Define if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define to 1 if you have the <malloc.h> header file. */
/* Define 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 to 1 if you have the `mbsinit' function. */
/* Define if you have the `mbsinit' function. */
#undef HAVE_MBSINIT
/* Define to 1 if you have the `memchr' function. */
/* Define if you have the `memchr' function. */
#undef HAVE_MEMCHR
/* Define to 1 if you have the <memory.h> header file. */
/* Define if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `mempcpy' function. */
/* Define if you have the `mempcpy' function. */
#undef HAVE_MEMPCPY
/* Define to 1 if you have the `memrchr' function. */
#undef HAVE_MEMRCHR
/* Define to 1 if you have the `mkstemp' function. */
/* Define if you have the `mkstemp' function. */
#undef HAVE_MKSTEMP
/* Define to 1 if you have a working `mmap' system call. */
/* Define if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define to 1 if you have the `munmap' function. */
/* Define if you have the `munmap' function. */
#undef HAVE_MUNMAP
/* Define to 1 if you have the <nl_types.h> header file. */
/* Define if you have the <nl_types.h> header file. */
#undef HAVE_NL_TYPES_H
/* Define to 1 if libc includes obstacks. */
#undef HAVE_OBSTACK
/* Define to 1 if you have the `putenv' function. */
/* Define if you have the `putenv' function. */
#undef HAVE_PUTENV
/* Define to 1 if you have the `setenv' function. */
/* Define if you have the `setenv' function. */
#undef HAVE_SETENV
/* Define to 1 if you have the `setlocale' function. */
/* Define if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
/* Define to 1 if you have the <stddef.h> header file. */
/* Define if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
/* Define to 1 if you have the <stdint.h> header file. */
/* Define if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `stpcpy' function. */
/* Define if you have the `stpcpy' function. */
#undef HAVE_STPCPY
/* Define to 1 if you have the `strcasecmp' function. */
/* Define if you have the `strcasecmp' function. */
#undef HAVE_STRCASECMP
/* Define to 1 if you have the `strchr' function. */
/* Define if you have the `strchr' function. */
#undef HAVE_STRCHR
/* Define to 1 if you have the `strdup' function. */
/* Define if you have the `strdup' function. */
#undef HAVE_STRDUP
/* Define to 1 if you have the `strerror' function. */
/* Define if you have the `strerror' function. */
#undef HAVE_STRERROR
/* Define to 1 if you have the `strerror_r' function. */
/* Define if you have the `strerror_r' function. */
#undef HAVE_STRERROR_R
/* Define to 1 if you have the <strings.h> header file. */
/* Define if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strspn' function. */
/* 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. */
#undef HAVE_STRSPN
/* Define to 1 if you have the `strtoul' function. */
/* Define if you have the `strtoul' function. */
#undef HAVE_STRTOUL
/* Define to 1 if you have the <sys/param.h> header file. */
/* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/stat.h> header file. */
/* Define if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
/* Define if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the `tsearch' function. */
/* Define if you have the `tsearch' function. */
#undef HAVE_TSEARCH
/* Define to 1 if you have the <unistd.h> header file. */
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `vprintf' function. */
/* Define if you have the `vprintf' function. */
#undef HAVE_VPRINTF
/* Define to 1 if you have the <wchar.h> header file. */
/* Define if you have the <wchar.h> header file. */
#undef HAVE_WCHAR_H
/* Define to 1 if you have the <wctype.h> header file. */
/* Define if you have the <wctype.h> header file. */
#undef HAVE_WCTYPE_H
/* Define to 1 if you have the `__argz_count' function. */
/* Define to 1 if `strerror_r' returns a string. */
#undef HAVE_WORKING_STRERROR_R
/* Define if you have the `__argz_count' function. */
#undef HAVE___ARGZ_COUNT
/* Define to 1 if you have the `__argz_next' function. */
/* Define if you have the `__argz_next' function. */
#undef HAVE___ARGZ_NEXT
/* Define to 1 if you have the `__argz_stringify' function. */
/* Define if you have the `__argz_stringify' function. */
#undef HAVE___ARGZ_STRINGIFY
/* Define as const if the declaration of iconv() needs const. */
@@ -246,21 +236,6 @@
/* 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
@@ -272,12 +247,9 @@
STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION
/* Define to 1 if you have the ANSI C header files. */
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to 1 if strerror_r returns char *. */
#undef STRERROR_R_CHAR_P
/* Version number of package */
#undef VERSION
@@ -287,14 +259,14 @@
/* Define to 1 for GNU C library extensions. */
#undef _GNU_SOURCE
/* Define to 1 if on MINIX. */
/* Define if on MINIX. */
#undef _MINIX
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
/* Define if the system does not provide POSIX.1 features except with this
defined. */
#undef _POSIX_1_SOURCE
/* Define to 1 if you need to in order for `stat' and other things to work. */
/* Define 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. */
+7
View File
@@ -1,2 +1,9 @@
Makefile
*.t
Makefile.in
mkinstalldirs
missing
config.sub
config.guess
mdate-sh
texinfo.tex
-225
View File
@@ -1,225 +0,0 @@
# Makefile.in generated by automake 1.5c from Makefile.am.
# @configure_input@
# 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,
# 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_sh_DATA = $(install_sh) -c -m 644
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@
LIB = @LIB@
LIBICONV = @LIBICONV@
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
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in config.guess config.sub depcomp \
install-sh mdate-sh missing mkinstalldirs texinfo.tex
all: all-am
.SUFFIXES:
$(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)/$@ $(am__depfiles_maybe)
uninstall-info-am:
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 || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir)$$dir \
|| exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
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)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
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:
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic 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-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
# 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:
-1321
View File
File diff suppressed because it is too large Load Diff
-1443
View File
File diff suppressed because it is too large Load Diff
+3 -28
View File
@@ -31,16 +31,7 @@ if test -z "$depmode" || test -z "$source" || test -z "$object"; then
fi
# `libtool' can also be set to `yes' or `no'.
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
depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
@@ -213,9 +204,8 @@ tru64)
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
base=`echo "$object" | sed -e 's/\.o$/.d/' -e 's/\.lo$/.d/'`
tmpdepfile1="$base.o.d"
tmpdepfile2="$base.d"
tmpdepfile1="$object.d"
tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'`
if test "$libtool" = yes; then
"$@" -Wc,-MD
else
@@ -392,21 +382,6 @@ 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"
) &
-97
View File
@@ -1,97 +0,0 @@
#!/bin/sh
# Get modification time of a file or directory and pretty-print it.
# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
# written by Ulrich Drepper <[email protected]>, June 1995
#
# 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.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Prevent date giving response in another language.
LANG=C
export LANG
LC_ALL=C
export LC_ALL
LC_TIME=C
export LC_TIME
# Get the extended ls output of the file or directory.
# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
if ls -L /dev/null 1>/dev/null 2>&1; then
set - x`ls -L -l -d $1`
else
set - x`ls -l -d $1`
fi
# The month is at least the fourth argument
# (3 shifts here, the next inside the loop).
shift
shift
shift
# Find the month. Next argument is day, followed by the year or time.
month=
until test $month
do
shift
case $1 in
Jan) month=January; nummonth=1;;
Feb) month=February; nummonth=2;;
Mar) month=March; nummonth=3;;
Apr) month=April; nummonth=4;;
May) month=May; nummonth=5;;
Jun) month=June; nummonth=6;;
Jul) month=July; nummonth=7;;
Aug) month=August; nummonth=8;;
Sep) month=September; nummonth=9;;
Oct) month=October; nummonth=10;;
Nov) month=November; nummonth=11;;
Dec) month=December; nummonth=12;;
esac
done
day=$2
# Here we have to deal with the problem that the ls output gives either
# the time of day or the year.
case $3 in
*:*) set `date`; eval year=\$$#
case $2 in
Jan) nummonthtod=1;;
Feb) nummonthtod=2;;
Mar) nummonthtod=3;;
Apr) nummonthtod=4;;
May) nummonthtod=5;;
Jun) nummonthtod=6;;
Jul) nummonthtod=7;;
Aug) nummonthtod=8;;
Sep) nummonthtod=9;;
Oct) nummonthtod=10;;
Nov) nummonthtod=11;;
Dec) nummonthtod=12;;
esac
# For the first six month of the year the time notation can also
# be used for files modified in the last year.
if (expr $nummonth \> $nummonthtod) > /dev/null;
then
year=`expr $year - 1`
fi;;
*) year=$3;;
esac
# The result.
echo $day $month $year
-336
View File
@@ -1,336 +0,0 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <[email protected]>, 1996.
# 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.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing 0.4 - GNU automake"
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
aclocal*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them.
You can get \`$1Help2man' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
# We have makeinfo, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
touch $file
;;
tar)
shift
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar ${1+"$@"} && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar ${1+"$@"} && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" ${1+"$@"} && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" ${1+"$@"} && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequirements for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0
-101
View File
@@ -1,101 +0,0 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <[email protected]>
# Created: 1993-05-16
# Public domain
# $Id$
errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
# process command line arguments
while test $# -gt 0 ; do
case "${1}" in
-h | --help | --h* ) # -h for help
echo "${usage}" 1>&2; exit 0 ;;
-m ) # -m PERM arg
shift
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
dirmode="${1}"
shift ;;
-- ) shift; break ;; # stop option processing
-* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
* ) break ;; # first non-opt arg
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
case $dirmode in
'')
if mkdir -p -- . 2>/dev/null; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
fi ;;
*)
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
fi ;;
esac
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 3
# End:
# mkinstalldirs ends here
+1 -1
View File
@@ -1 +1 @@
1.33b
1.29c
-6345
View File
File diff suppressed because it is too large Load Diff
Vendored
-10441
View File
File diff suppressed because it is too large Load Diff
+7 -4
View File
@@ -20,21 +20,23 @@
# We need a recent Autoconf to run a recent Autotest.
AC_PREREQ(2.52g)
AC_INIT([GNU Bison], [1.34], [[email protected]])
AC_INIT([GNU Bison], [1.49a], [[email protected]])
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE([bison], [1.34])
AM_INIT_AUTOMAKE([bison], [1.49a])
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])
AC_CONFIG_FILES([tests/bison], [chmod +x tests/bison])
# Needed by tests/atlocal.in.
AC_SUBST([GCC])
# Checks for programs.
AC_PROG_CC
AM_PROG_LEX
AC_PROG_YACC
AC_MINIX
AC_ISC_POSIX
AM_PROG_CC_STDC
@@ -88,7 +90,7 @@ AC_FUNC_OBSTACK
AC_FUNC_ERROR_AT_LINE
AC_FUNC_STRNLEN
AC_CHECK_FUNCS(mkstemp setlocale)
AC_CHECK_DECLS([stpcpy, strchr, strspn, strnlen, memchr, memrchr])
AC_CHECK_DECLS([free, stpcpy, strchr, strspn, strnlen, malloc, memchr, memrchr])
AC_REPLACE_FUNCS(stpcpy strchr strspn memchr memrchr)
jm_FUNC_MALLOC
jm_FUNC_REALLOC
@@ -107,5 +109,6 @@ AC_SUBST(LIB@&t@OBJS)
AC_OUTPUT([Makefile
config/Makefile
intl/Makefile po/Makefile.in
data/Makefile
lib/Makefile src/Makefile doc/Makefile
m4/Makefile])
+18
View File
@@ -0,0 +1,18 @@
## 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 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
dist_pkgdata_DATA = bison.simple bison.hairy bison.c++
+523
View File
@@ -0,0 +1,523 @@
%%{section} %%{output-prefix} %%{output-infix} %%".hh"
/* -*- C++ -*- */
/* A Bison parser, made from %%filename,
by GNU bison %%version. */
/* Skeleton output parser for bison,
Copyright 1984, 1989, 1990, 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. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
#include "stack.hh"
/* #include "parser.hh" */
#include "location.hh"
namespace yy
{
class %%{name};
template < typename P >
struct Traits
{
};
template < >
struct Traits< %%{name} >
{
typedef int StateType;
typedef %%{stype} SemanticType;
typedef Location LocationType;
};
}
%%{prologue}
namespace yy
{
class %%{name}
{
public:
typedef Traits< %%{name} >::StateType StateType;
typedef Traits< %%{name} >::SemanticType SemanticType;
typedef Traits< %%{name} >::LocationType LocationType;
typedef Stack< StateType > StateStack;
typedef Stack< SemanticType > SemanticStack;
typedef Stack< LocationType > LocationStack;
%%{name} () : debug (1)
{
looka = empty;
}
virtual int parse ();
private:
/* Call to lexical analyser. */
virtual
void
lex ()
{
looka = yylex (&value);
}
/* Stacks. */
StateStack state_stack;
SemanticStack semantic_stack;
LocationStack location_stack;
/* Tables. */
static const short pact_[];
static const short defact_[];
static const short pgoto_[];
static const short defgoto_[];
static const short table_[];
static const short check_[];
static const short line_[];
static const short r1_[];
static const short r2_[];
static const char* const name_[];
/* More tables, for debugging. */
/* FIXME: These tables should not be printed when not in debug
mode. %%ifdef? */
static const short rhs_[];
static const short prhs_[];
static const short rline_[];
/* Even more tables. */
static inline char translate (int token);
/* Eof and empty. */
static const int eof;
static const int empty;
/* State. */
int n;
int len;
int debug;
int state;
/* Lookahead. */
int looka;
int ilooka;
/* @$ and $$. */
SemanticType value;
LocationType location;
};
}
%%{section} %%{output-prefix} %%{output-infix} %%".cc"
#include "%%{output-prefix}%%{output-infix}.hh"
/* Enable debugging if requested. */
#if %%{debug}
# include <cstdio>
# define YYFPRINTF std::fprintf
# define YYDPRINTF(Args) \
do { \
if (debug) \
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.
*/
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
#endif /* !YYDEBUG */
/* Tokens. */
%%{tokendef}
int
yy::%%{name}::parse ()
{
/* Initialize stack. */
state_stack = StateStack (0);
semantic_stack = SemanticStack (1);
location_stack = LocationStack (1);
/* Reserve initial space. The C parser needed that, but is it really
useful here? */
state_stack.reserve (%%{initdepth});
semantic_stack.reserve (%%{initdepth});
location_stack.reserve (%%{initdepth});
/* Start. */
state = 0;
YYDPRINTF ((stderr, "Starting parse\n"));
/* New state. */
yynewstate:
state_stack.push (state);
YYDPRINTF ((stderr, "Entering state %d\n", state));
/* Backup. */
yybackup:
/* Try to take a decision without lookahead. */
n = pact_[state];
if (n == %%{flag})
goto yydefault;
/* Read a lookahead token. */
if (looka == empty)
{
YYDPRINTF ((stderr, "Reading a token: "));
lex ();
}
/* Convert token to internal form. */
if (looka <= 0)
{
looka = eof;
ilooka = 0;
YYDPRINTF ((stderr, "Now at end of input.\n"));
}
else
{
ilooka = translate (looka);
#if %%{debug}
YYFPRINTF (stderr, "Next token is %d (%s", looka, name_[ilooka]);
YYFPRINTF (stderr, ")\n");
#endif
}
n += ilooka;
if (n < 0 || n > %%{last} || check_[n] != ilooka)
goto yydefault;
/* Reduce or error. */
n = table_[n];
if (n < 0)
{
if (n == %%{flag})
goto yyerrlab;
else
{
n = -n;
goto yyreduce;
}
}
else if (n == 0)
goto yyerrlab;
/* Accept? */
if (n == %%{final})
goto yyacceptlab;
/* Shift the lookahead token. */
YYDPRINTF ((stderr, "Shifting token %d (%s), ", looka, name_[ilooka]));
/* Discard the token being shifted unless it is eof. */
if (looka != eof)
looka = empty;
semantic_stack.push (value);
location_stack.push (location);
state = n;
goto yynewstate;
/* Default action. */
yydefault:
n = defact_[state];
if (n == 0)
goto yyerrlab;
/* Reduce. */
yyreduce:
len = r2_[n];
value = semantic_stack[1 - len];
location = location_stack[1 - len];
#if %%{debug}
if (debug)
{
YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", n - 1, rline_[n]);
for (unsigned i = prhs_[n];
rhs_[i] >= 0; ++i)
YYFPRINTF (stderr, "%s ", name_[rhs_[i]]);
YYFPRINTF (stderr, "-> %s\n", name_[r1_[n]]);
}
#endif
{
SemanticType& yyval (value);
SemanticStack& yyvsp (semantic_stack);
switch (n)
{
%%{actions}
}
}
state_stack.pop (len);
semantic_stack.pop (len);
location_stack.pop (len);
#if %%{debug}
if (debug)
{
YYFPRINTF (stderr, "state stack now");
for (StateStack::ConstIterator i = state_stack.begin ();
i != state_stack.end (); ++i)
YYFPRINTF (stderr, " %d", *i);
YYFPRINTF (stderr, "\n");
}
#endif
semantic_stack.push (value);
location_stack.push (location);
/* Shift the result of the reduction. */
n = r1_[n];
state = pgoto_[n - %%{ntokens}] + state_stack[0];
if (state >= 0 && state <= %%{last} && check_[state] == state_stack[0])
state = table_[state];
else
state = defgoto_[n - %%{ntokens}];
goto yynewstate;
/* Report and recover from errors. This is very incomplete. */
yyerrlab:
std::cerr << "Parse error." << std::endl; // FIXME: Need something like yyerror?
return 1;
/* Accept. */
yyacceptlab:
return 0;
}
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
const short
yy::%%{name}::pact_[] =
{
%%{pact}
};
/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
doesn't specify something else to do. Zero means the default is an
error. */
const short
yy::%%{name}::defact_[] =
{
%%{defact}
};
/* YYPGOTO[NTERM-NUM]. */
const short
yy::%%{name}::pgoto_[] =
{
%%{pgoto}
};
/* YYDEFGOTO[NTERM-NUM]. */
const short
yy::%%{name}::defgoto_[] =
{
%%{defgoto}
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says. */
const short
yy::%%{name}::table_[] =
{
%%{table}
};
/* YYCHECK. */
const short
yy::%%{name}::check_[] =
{
%%{check}
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
const short
yy::%%{name}::line_[] =
{
%%{line}
};
/*YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
const short
yy::%%{name}::r1_[] =
{
%%{r1}
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
const short
yy::%%{name}::r2_[] =
{
%%{r2}
};
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
const char*
const yy::%%{name}::name_[] =
{
%%{tname}
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
const short
yy::%%{name}::rhs_[] =
{
%%{rhs}
};
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
YYRHS. */
const short
yy::%%{name}::prhs_[] =
{
%%{prhs}
};
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
const short
yy::%%{name}::rline_[] =
{
%%{rline}
};
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
char
yy::%%{name}::translate (int token)
{
static
const char
translate_[] =
{
%%{translate}
};
return ((unsigned)(token) <= %%{maxtok} ? translate_[token] : %%{nsym});
}
const int yy::%%{name}::eof = 0;
const int yy::%%{name}::empty = -2;
%%{epilogue}
%%{section} %%"stack.hh"
#ifndef BISON_STACK_HH
# define BISON_STACK_HH
#include <vector>
namespace yy
{
template < class T, class S = std::vector< T > >
class Stack
{
public:
typedef typename S::iterator Iterator;
typedef typename S::const_iterator ConstIterator;
Stack () : seq_ ()
{
}
Stack (unsigned n) : seq_ (n)
{
}
inline
T&
operator [] (int index)
{
return seq_[seq_.size () - 1 + index];
}
inline
const T&
operator [] (int index) const
{
return seq_[seq_.size () - 1 + index];
}
inline
void
push (const T& t)
{
seq_.push_back (t);
}
inline
void
pop (unsigned n = 1)
{
for (; n; --n)
seq_.pop_back ();
}
inline
void
reserve (unsigned n)
{
seq_.reserve (n);
}
inline ConstIterator begin () const { return seq_.begin (); }
inline ConstIterator end () const { return seq_.end (); }
private:
S seq_;
};
}
#endif // not BISON_STACK_HH
%%{section} %%"location.hh"
#ifndef BISON_LOCATION_HH
# define BISON_LOCATION_HH
namespace yy
{
struct Position
{
int line;
int column;
};
struct Location
{
Position first;
Position last;
};
}
#endif // not BISON_LOCATION_HH
+336
View File
@@ -0,0 +1,336 @@
%%{section} %%{output-prefix} %%{output-infix} %%".c"
/* -*- C -*- */
/* YYERROR and YYCOST are set by guards. If yyerror is set to a
nonzero value by a guard, the reduction with which the guard is
associated is not performed, and the error recovery mechanism is
invoked. Yycost indicates the cost of performing the reduction
given the attributes of the symbols. */
static int yyerror;
static int yycost;
/* YYMAXDEPTH indicates the size of the parser's state and value
stacks. */
#ifndef YYMAXDEPTH
# define YYMAXDEPTH 500
#endif
/* YYMAXRULES must be at least as large as the number of rules that
could be placed in the rule queue. That number could be determined
from the grammar and the size of the stack, but, as yet, it is not.
*/
#ifndef YYMAXRULES
# define YYMAXRULES 100
#endif
#ifndef YYMAXBACKUP
# define YYMAXBACKUP 100
#endif
/* The state stack. */
static short yyss[YYMAXDEPTH];
/* The semantic value stack. */
static YYSTYPE yyvs[YYMAXDEPTH];
/* The location stack. */
static YYLTYPE yyls[YYMAXDEPTH];
/* The rule queue. */
static short yyrq[YYMAXRULES];
/* The lookahead symbol. */
static int yychar;
/* the semantic value of the lookahead symbol. */
static YYSTYPE yylval;
/* the semantic value for the state at the top of the state stack. */
static YYSTYPE yytval;
/* the variable used to return semantic values from the action
routines. */
static YYSTYPE yyval;
/* location data for the lookahead symbol. */
static YYLTYPE yylloc;
/* location data for the state at the top of the state stack. */
static YYLTYPE yytloc;
static int yynunlexed;
static short yyunchar[YYMAXBACKUP];
static YYSTYPE yyunval[YYMAXBACKUP];
static YYLTYPE yyunloc[YYMAXBACKUP];
/* a pointer to the top of the state stack; only set during error
recovery. */
static short *yygssp;
/* a pointer to the top of the value stack; only set during error
recovery. */
static YYSTYPE *yygvsp;
/* a pointer to the top of the location stack; only set during error
recovery. */
static YYLTYPE *yyglsp;
/*--------------------------------------------------------------------.
| Yyget is an interface between the parser and the lexical analyzer. |
| It is costly to provide such an interface, but it avoids requiring |
| the lexical analyzer to be able to back up the scan. |
`--------------------------------------------------------------------*/
static inline void
yyget (void)
{
if (yynunlexed > 0)
{
yynunlexed--;
yychar = yyunchar[yynunlexed];
yylval = yyunval[yynunlexed];
yylloc = yyunloc[yynunlexed];
}
else if (yychar <= 0)
yychar = 0;
else
{
yychar = yylex ();
if (yychar < 0)
yychar = 0;
else
yychar = YYTRANSLATE (yychar);
}
}
static inline void
yyunlex (int chr, YYSTYPE val, YYLTYPE loc)
{
yyunchar[yynunlexed] = chr;
yyunval[yynunlexed] = val;
yyunloc[yynunlexed] = loc;
yynunlexed++;
}
static inline void
yyrestore (short *first, short *last)
{
short *ssp;
short *rp;
int symbol;
int state;
int tvalsaved;
ssp = yygssp;
yyunlex (yychar, yylval, yylloc);
tvalsaved = 0;
while (first != last)
{
symbol = yystos[*ssp];
if (symbol < YYNTBASE)
{
yyunlex (symbol, yytval, yytloc);
tvalsaved = 1;
ssp--;
}
ssp--;
if (first == yyrq)
first = yyrq + YYMAXRULES;
first--;
for (rp = yyrhs + yyprhs[*first]; symbol = *rp; rp++)
{
if (symbol < YYNTBASE)
state = yytable[yypact[*ssp] + symbol];
else
{
state = yypgoto[symbol - YYNTBASE] + *ssp;
if (state >= 0 && state <= YYLAST && yycheck[state] == *ssp)
state = yytable[state];
else
state = yydefgoto[symbol - YYNTBASE];
}
*++ssp = state;
}
}
if (!tvalsaved && ssp > yyss)
{
yyunlex (yystos[*ssp], yytval, yytloc);
ssp--;
}
yygssp = ssp;
}
int
yyparse (void)
{
int yystate;
int yyn;
short *yyssp;
short *yyrq0;
short *yyptr;
YYSTYPE *yyvsp;
int yylen;
YYLTYPE *yylsp;
short *yyrq1;
short *yyrq2;
yystate = 0;
yyssp = yyss - 1;
yyvsp = yyvs - 1;
yylsp = yyls - 1;
yyrq0 = yyrq;
yyrq1 = yyrq0;
yyrq2 = yyrq0;
yychar = yylex ();
if (yychar < 0)
yychar = 0;
else
yychar = YYTRANSLATE (yychar);
yynewstate:
if (yyssp >= yyss + YYMAXDEPTH - 1)
{
yyabort ("Parser Stack Overflow");
YYABORT;
}
*++yyssp = yystate;
yyresume:
yyn = yypact[yystate];
if (yyn == YYFLAG)
goto yydefault;
yyn += yychar;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar)
goto yydefault;
yyn = yytable[yyn];
if (yyn < 0)
{
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrlab;
yystate = yyn;
yyptr = yyrq2;
while (yyptr != yyrq1)
{
yyn = *yyptr++;
yylen = yyr2[yyn];
yyvsp -= yylen;
yylsp -= yylen;
yyguard (yyn, yyvsp, yylsp);
if (yyerror)
goto yysemerr;
yyaction (yyn, yyvsp, yylsp);
*++yyvsp = yyval;
yylsp++;
if (yylen == 0)
{
yylsp->first_line = yytloc.first_line;
yylsp->first_column = yytloc.first_column;
yylsp->last_line = (yylsp - 1)->last_line;
yylsp->last_column = (yylsp - 1)->last_column;
yylsp->text = 0;
}
else
{
yylsp->last_line = (yylsp + yylen - 1)->last_line;
yylsp->last_column = (yylsp + yylen - 1)->last_column;
}
if (yyptr == yyrq + YYMAXRULES)
yyptr = yyrq;
}
if (yystate == YYFINAL)
YYACCEPT;
yyrq2 = yyptr;
yyrq1 = yyrq0;
*++yyvsp = yytval;
*++yylsp = yytloc;
yytval = yylval;
yytloc = yylloc;
yyget ();
goto yynewstate;
yydefault:
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
yyreduce:
*yyrq0++ = yyn;
if (yyrq0 == yyrq + YYMAXRULES)
yyrq0 = yyrq;
if (yyrq0 == yyrq2)
{
yyabort ("Parser Rule Queue Overflow");
YYABORT;
}
yyssp -= yyr2[yyn];
yyn = yyr1[yyn];
yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
yystate = yydefgoto[yyn - YYNTBASE];
goto yynewstate;
yysemerr:
*--yyptr = yyn;
yyrq2 = yyptr;
yyvsp += yyr2[yyn];
yyerrlab:
yygssp = yyssp;
yygvsp = yyvsp;
yyglsp = yylsp;
yyrestore (yyrq0, yyrq2);
yyrecover ();
yystate = *yygssp;
yyssp = yygssp;
yyvsp = yygvsp;
yyrq0 = yyrq;
yyrq1 = yyrq0;
yyrq2 = yyrq0;
goto yyresume;
}
%%{actions}
+269 -61
View File
@@ -1,5 +1,9 @@
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
#line
%%{section} %%{output-prefix} %%{output-infix} %%".c"
/* -*- C -*- */
/* A Bison parser, made from %%{filename}
by GNU bison %%{version}. */
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
@@ -30,6 +34,64 @@
It was written by Richard Stallman by simplifying the hairy parser
used when %semantic_parser is specified. */
/* Identify Bison output. */
#define YYBISON 1
/* Pure parsers. */
#define YYPURE %%{pure}
/* Using locations. */
#define YYLSP_NEEDED %%{locations-flag}
/* If NAME_PREFIX is specified substitute the variables and functions
names. */
#define yyparse %%{prefix}parse
#define yylex %%{prefix}lex
#define yyerror %%{prefix}error
#define yylval %%{prefix}lval
#define yychar %%{prefix}char
#define yydebug %%{prefix}debug
#define yynerrs %%{prefix}nerrs
#if YYLSP_NEEDED
# define yylloc %%{prefix}lloc
#endif
/* Copy the user declarations. */
%%{prologue}
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG %%{debug}
#endif
/* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE %%{error-verbose}
#endif
#ifndef YYSTYPE
typedef %%{stype} yystype;
# define YYSTYPE yystype
#endif
#ifndef YYLTYPE
typedef struct yyltype
{
int first_line;
int first_column;
int last_line;
int last_column;
} yyltype;
# define YYLTYPE %%{ltype}
#endif
/* Line %%{skeleton-line} of %%{skeleton}. */
#line %%{line} "%%{parser-file-name}"
/* 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.
@@ -37,6 +99,12 @@
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
#ifdef __cplusplus
# define YYSTD(x) std::x
#else
# define YYSTD(x) x
#endif
#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
/* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -59,12 +127,17 @@
/* 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
# ifdef __cplusplus
# include <cstdlib> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T std::size_t
# else
# ifdef __STDC__
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# endif
# endif
# define YYSTACK_ALLOC malloc
# define YYSTACK_FREE free
# define YYSTACK_ALLOC YYSTD (malloc)
# define YYSTACK_FREE YYSTD (free)
# endif
/* A type that is properly aligned for any stack member. */
@@ -84,12 +157,12 @@ union yyalloc
N elements. */
# if YYLSP_NEEDED
# define YYSTACK_BYTES(N) \
((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
+ 2 * YYSTACK_GAP_MAX)
((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
+ 2 * YYSTACK_GAP_MAX)
# else
# define YYSTACK_BYTES(N) \
((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAX)
((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAX)
# endif
/* Relocate the TYPE STACK from its old location to the new one. The
@@ -109,7 +182,122 @@ union yyalloc
} \
while (0)
#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
/* Tokens. */
%%{tokendef}
/* YYFINAL -- State number of the termination state. */
#define YYFINAL %%{final}
#define YYFLAG %%{flag}
#define YYLAST %%{last}
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS %%{ntokens}
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS %%{nnts}
/* YYNRULES -- Number of rules. */
#define YYNRULES %%{nrules}
/* YYNRULES -- Number of states. */
#define YYNSTATES %%{nstates}
#define YYMAXUTOK %%{maxtok}
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYTRANSLATE(x) ((unsigned)(x) <= %%{maxtok} ? yytranslate[x] : %%{nsym})
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
static const char yytranslate[] =
{
%%{translate}
};
#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
YYRHS. */
static const short yyprhs[] =
{
%%{prhs}
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const short yyrhs[] =
{
%%{rhs}
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const short yyrline[] =
{
%%{rline}
};
#endif
#if (YYDEBUG) || YYERROR_VERBOSE
/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
%%{tname}
};
#endif
/* YYTOKNUM[YYN] -- Index in YYTNAME corresponding to YYLEX. */
static const short yytoknum[] =
{
%%{toknum}
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const short yyr1[] =
{
%%{r1}
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const short yyr2[] =
{
%%{r2}
};
/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
doesn't specify something else to do. Zero means the default is an
error. */
static const short yydefact[] =
{
%%{defact}
};
/* YYPGOTO[NTERM-NUM]. */
static const short yydefgoto[] =
{
%%{defgoto}
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
static const short yypact[] =
{
%%{pact}
};
/* YYPGOTO[NTERM-NUM]. */
static const short yypgoto[] =
{
%%{pgoto}
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says. */
static const short yytable[] =
{
%%{table}
};
static const short yycheck[] =
{
%%{check}
};
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
@@ -119,9 +307,14 @@ union yyalloc
# 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
# ifdef __cplusplus
# include <cstddef> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T std::size_t
# else
# ifdef __STDC__
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# endif
# endif
#endif
#if ! defined (YYSIZE_T)
@@ -132,14 +325,19 @@ union yyalloc
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY -2
#define YYEOF 0
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
#define YYABORT goto yyabortlab
#define YYERROR goto yyerrlab1
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */
#define YYFAIL goto yyerrlab
#define YYRECOVERING() (!!yyerrstatus)
#define YYBACKUP(Token, Value) \
do \
if (yychar == YYEMPTY && yylen == 1) \
@@ -160,7 +358,6 @@ while (0)
#define YYTERROR 1
#define YYERRCODE 256
/* YYLLOC_DEFAULT -- Compute the default location (before the actions
are run).
@@ -174,7 +371,6 @@ while (0)
Current.last_column = Rhs[N].last_column;
#endif
/* YYLEX -- calling `yylex' with the right arguments. */
#if YYPURE
@@ -195,13 +391,16 @@ while (0)
# define YYLEX yylex ()
#endif /* !YYPURE */
/* Enable debugging if requested. */
#if YYDEBUG
# ifndef YYFPRINTF
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
# define YYFPRINTF fprintf
# ifdef __cplusplus
# include <cstdio> /* INFRINGES ON USER NAME SPACE */
# else
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
# endif
# define YYFPRINTF YYSTD (fprintf)
# endif
# define YYDPRINTF(Args) \
@@ -209,8 +408,10 @@ do { \
if (yydebug) \
YYFPRINTF Args; \
} while (0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
/* 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.
*/
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
@@ -218,7 +419,7 @@ int yydebug;
/* YYINITDEPTH -- initial size of the parser's stacks. */
#ifndef YYINITDEPTH
# define YYINITDEPTH 200
# define YYINITDEPTH %%{initdepth}
#endif
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
@@ -233,9 +434,11 @@ int yydebug;
#endif
#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
# define YYMAXDEPTH %%{maxdepth}
#endif
#if ! defined (yyoverflow) && ! defined (yymemcpy)
# if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
# define yymemcpy __builtin_memcpy
@@ -263,7 +466,7 @@ yymemcpy (yyto, yyfrom, yycount)
# endif
#endif
#ifdef YYERROR_VERBOSE
#if YYERROR_VERBOSE
# ifndef yystrlen
# if defined (__GLIBC__) && defined (_STRING_H)
@@ -313,9 +516,10 @@ yystpcpy (yydest, yysrc)
}
# endif
# endif
#endif
#endif /* !YYERROR_VERBOSE */
#line
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
@@ -324,13 +528,13 @@ yystpcpy (yydest, yysrc)
to the proper pointer type. */
#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
# ifdef __cplusplus
# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
# define YYPARSE_PARAM_DECL
# else
# else /* !__cplusplus */
# define YYPARSE_PARAM_ARG YYPARSE_PARAM
# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
# endif
# endif /* !__cplusplus */
#else /* !YYPARSE_PARAM */
# define YYPARSE_PARAM_ARG
# define YYPARSE_PARAM_DECL
@@ -352,7 +556,7 @@ int yyparse (void);
/* The lookahead symbol. */ \
int yychar; \
\
/* The semantic value of the lookahead symbol. */ \
/* The semantic value of the lookahead symbol. */ \
YYSTYPE yylval; \
\
/* Number of parse errors so far. */ \
@@ -369,8 +573,7 @@ YYLTYPE yylloc;
YY_DECL_NON_LSP_VARIABLES
#endif
/* If nonreentrant, generate the variables here. */
/* If nonreentrant, generate the variables here. */
#if !YYPURE
YY_DECL_VARIABLES
@@ -380,7 +583,7 @@ int
yyparse (YYPARSE_PARAM_ARG)
YYPARSE_PARAM_DECL
{
/* If reentrant, generate the variables here. */
/* If reentrant, generate the variables here. */
#if YYPURE
YY_DECL_VARIABLES
#endif /* !YYPURE */
@@ -401,7 +604,7 @@ yyparse (YYPARSE_PARAM_ARG)
Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* The state stack. */
/* The state stack. */
short yyssa[YYINITDEPTH];
short *yyss = yyssa;
register short *yyssp;
@@ -426,7 +629,6 @@ yyparse (YYPARSE_PARAM_ARG)
YYSIZE_T yystacksize = YYINITDEPTH;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
@@ -435,7 +637,7 @@ yyparse (YYPARSE_PARAM_ARG)
#endif
/* When reducing, the number of symbols on the RHS of the reduced
rule. */
rule. */
int yylen;
YYDPRINTF ((stderr, "Starting parse\n"));
@@ -545,7 +747,6 @@ yyparse (YYPARSE_PARAM_ARG)
goto yybackup;
/*-----------.
| yybackup. |
`-----------*/
@@ -572,12 +773,12 @@ yybackup:
yychar = YYLEX;
}
/* Convert token to internal form (in yychar1) for indexing tables with */
/* Convert token to internal form (in yychar1) for indexing tables with. */
if (yychar <= 0) /* This means end of input. */
if (yychar <= 0) /* This means end of input. */
{
yychar1 = 0;
yychar = YYEOF; /* Don't call YYLEX any more */
yychar = YYEOF; /* Don't call YYLEX any more. */
YYDPRINTF ((stderr, "Now at end of input.\n"));
}
@@ -692,16 +893,21 @@ yyreduce:
int yyi;
YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
yyn, yyrline[yyn]);
yyn - 1, yyrline[yyn]);
/* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
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. */
#line
switch (yyn)
{
%%{actions}
}
/* Line %%{skeleton-line} of %%{skeleton}. */
#line %%{line} "%%{parser-file-name}"
yyvsp -= yylen;
yyssp -= yylen;
@@ -731,11 +937,11 @@ yyreduce:
yyn = yyr1[yyn];
yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
yystate = yydefgoto[yyn - YYNTBASE];
yystate = yydefgoto[yyn - YYNTOKENS];
goto yynewstate;
@@ -749,7 +955,7 @@ yyerrlab:
{
++yynerrs;
#ifdef YYERROR_VERBOSE
#if YYERROR_VERBOSE
yyn = yypact[yystate];
if (yyn > YYFLAG && yyn < YYLAST)
@@ -789,27 +995,27 @@ yyerrlab:
}
yyerror (yymsg);
YYSTACK_FREE (yymsg);
}
else
yyerror ("parse error; also virtual memory exhausted");
}
}
else
yyerror ("parse error; also virtual memory exhausted");
}
else
#endif /* defined (YYERROR_VERBOSE) */
yyerror ("parse error");
#endif /* YYERROR_VERBOSE */
yyerror ("parse error");
}
goto yyerrlab1;
/*--------------------------------------------------.
| yyerrlab1 -- error raised explicitly by an action |
`--------------------------------------------------*/
/*----------------------------------------------------.
| yyerrlab1 -- error raised explicitly by an action. |
`----------------------------------------------------*/
yyerrlab1:
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
error, discard it. */
/* return failure if at end of input */
/* Return failure if at end of input. */
if (yychar == YYEOF)
YYABORT;
YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
@@ -820,7 +1026,7 @@ yyerrlab1:
/* Else will try to reuse lookahead token after shifting the error
token. */
yyerrstatus = 3; /* Each real token shifted decrements this */
yyerrstatus = 3; /* Each real token shifted decrements this. */
goto yyerrhandle;
@@ -843,7 +1049,7 @@ yyerrdefault:
/*---------------------------------------------------------------.
| yyerrpop -- pop the current state because it cannot handle the |
| error token |
| error token. |
`---------------------------------------------------------------*/
yyerrpop:
if (yyssp == yyss)
@@ -931,3 +1137,5 @@ yyreturn:
#endif
return yyresult;
}
%%{epilogue}
+12 -4
View File
@@ -1,12 +1,20 @@
Makefile Makefile.in
*.aux *.dvi *.log *.info* *.pdf *.ps
stamp-*
auto
Makefile
bison.aux
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
Makefile.in
*.info*
stamp-vti
version.texi
+179 -197
View File
@@ -191,7 +191,7 @@ Examples
Reverse Polish Notation Calculator
* Decls: Rpcalc Decls. Bison and C declarations for rpcalc.
* Decls: Rpcalc Decls. Prologue (declarations) for rpcalc.
* Rules: Rpcalc Rules. Grammar Rules for rpcalc, with explanation.
* Lexer: Rpcalc Lexer. The lexical analyzer.
* Main: Rpcalc Main. The controlling function.
@@ -229,10 +229,10 @@ Bison Grammar Files
Outline of a Bison Grammar
* C Declarations:: Syntax and usage of the C declarations section.
* Prologue:: Syntax and usage of the prologue (declarations section).
* Bison Declarations:: Syntax and usage of the Bison declarations section.
* Grammar Rules:: Syntax and usage of the grammar rules section.
* C Code:: Syntax and usage of the additional C code section.
* Epilogue:: Syntax and usage of the epilogue (additional code section).
Defining Language Semantics
@@ -304,8 +304,6 @@ 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
@@ -678,12 +676,13 @@ the grammar rules---for example, to build identifiers and operators into
expressions. As it does this, it runs the actions for the grammar rules it
uses.
The tokens come from a function called the @dfn{lexical analyzer} that you
must supply in some fashion (such as by writing it in C). The Bison parser
calls the lexical analyzer each time it wants a new token. It doesn't know
what is ``inside'' the tokens (though their semantic values may reflect
this). Typically the lexical analyzer makes the tokens by parsing
characters of text, but Bison does not depend on this. @xref{Lexical, ,The Lexical Analyzer Function @code{yylex}}.
The tokens come from a function called the @dfn{lexical analyzer} that
you must supply in some fashion (such as by writing it in C). The Bison
parser calls the lexical analyzer each time it wants a new token. It
doesn't know what is ``inside'' the tokens (though their semantic values
may reflect this). Typically the lexical analyzer makes the tokens by
parsing characters of text, but Bison does not depend on this.
@xref{Lexical, ,The Lexical Analyzer Function @code{yylex}}.
The Bison parser file is C code which defines a function named
@code{yyparse} which implements that grammar. This function does not make
@@ -708,7 +707,8 @@ 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.
declare memory allocators and related types. In the same situation,
C++ parsers may include @code{<cstddef>} and @code{<cstdlib>} instead.
Other system headers may be included if you define @code{YYDEBUG} to a
nonzero value (@pxref{Debugging, ,Debugging Your Parser}).
@@ -723,15 +723,16 @@ to a working compiler or interpreter, has these parts:
@enumerate
@item
Formally specify the grammar in a form recognized by Bison
(@pxref{Grammar File, ,Bison Grammar Files}). For each grammatical rule in the language,
describe the action that is to be taken when an instance of that rule
is recognized. The action is described by a sequence of C statements.
(@pxref{Grammar File, ,Bison Grammar Files}). For each grammatical rule
in the language, describe the action that is to be taken when an
instance of that rule is recognized. The action is described by a
sequence of C statements.
@item
Write a lexical analyzer to process input and pass tokens to the
parser. The lexical analyzer may be written by hand in C
(@pxref{Lexical, ,The Lexical Analyzer Function @code{yylex}}). It could also be produced using Lex, but the use
of Lex is not discussed in this manual.
Write a lexical analyzer to process input and pass tokens to the parser.
The lexical analyzer may be written by hand in C (@pxref{Lexical, ,The
Lexical Analyzer Function @code{yylex}}). It could also be produced
using Lex, but the use of Lex is not discussed in this manual.
@item
Write a controlling function that calls the Bison-produced parser.
@@ -766,7 +767,7 @@ general form of a Bison grammar file is as follows:
@example
%@{
@var{C declarations}
@var{Prologue (declarations)}
%@}
@var{Bison declarations}
@@ -774,15 +775,15 @@ general form of a Bison grammar file is as follows:
%%
@var{Grammar rules}
%%
@var{Additional C code}
@var{Epilogue (additional code)}
@end example
@noindent
The @samp{%%}, @samp{%@{} and @samp{%@}} are punctuation that appears
in every Bison grammar file to separate the sections.
The C declarations may define types and variables used in the actions.
You can also use preprocessor commands to define macros used there, and use
The prologue may define types and variables used in the actions. You can
also use preprocessor commands to define macros used there, and use
@code{#include} to include header files that do any of these things.
The Bison declarations declare the names of the terminal and nonterminal
@@ -792,10 +793,10 @@ semantic values of various symbols.
The grammar rules define how to construct each nonterminal symbol from its
parts.
The additional C code can contain any C code you want to use. Often the
definition of the lexical analyzer @code{yylex} goes here, plus subroutines
called by the actions in the grammar rules. In a simple program, all the
rest of the program can go here.
The epilogue can contain any code you want to use. Often the definition of
the lexical analyzer @code{yylex} goes here, plus subroutines called by the
actions in the grammar rules. In a simple program, all the rest of the
program can go here.
@node Examples
@chapter Examples
@@ -843,7 +844,7 @@ The source code for this calculator is named @file{rpcalc.y}. The
@samp{.y} extension is a convention used for Bison input files.
@menu
* Decls: Rpcalc Decls. Bison and C declarations for rpcalc.
* Decls: Rpcalc Decls. Prologue (declarations) for rpcalc.
* Rules: Rpcalc Rules. Grammar Rules for rpcalc, with explanation.
* Lexer: Rpcalc Lexer. The lexical analyzer.
* Main: Rpcalc Main. The controlling function.
@@ -871,7 +872,7 @@ calculator. As in C, comments are placed between @samp{/*@dots{}*/}.
%% /* Grammar rules and actions follow */
@end example
The C declarations section (@pxref{C Declarations, ,The C Declarations Section}) contains two
The declarations section (@pxref{Prologue, , The prologue}) contains two
preprocessor directives.
The @code{#define} directive defines the macro @code{YYSTYPE}, thus
@@ -885,9 +886,10 @@ which is a floating point number.
The @code{#include} directive is used to declare the exponentiation
function @code{pow}.
The second section, Bison declarations, provides information to Bison about
the token types (@pxref{Bison Declarations, ,The Bison Declarations Section}). Each terminal symbol that is
not a single-character literal must be declared here. (Single-character
The second section, Bison declarations, provides information to Bison
about the token types (@pxref{Bison Declarations, ,The Bison
Declarations Section}). Each terminal symbol that is not a
single-character literal must be declared here. (Single-character
literals normally don't need to be declared.) In this example, all the
arithmetic operators are designated by single-character literals, so the
only terminal symbol that needs to be declared is @code{NUM}, the token
@@ -1067,9 +1069,10 @@ The latter, however, is much more readable.
@cindex writing a lexical analyzer
@cindex lexical analyzer, writing
The lexical analyzer's job is low-level parsing: converting characters or
sequences of characters into tokens. The Bison parser gets its tokens by
calling the lexical analyzer. @xref{Lexical, ,The Lexical Analyzer Function @code{yylex}}.
The lexical analyzer's job is low-level parsing: converting characters
or sequences of characters into tokens. The Bison parser gets its
tokens by calling the lexical analyzer. @xref{Lexical, ,The Lexical
Analyzer Function @code{yylex}}.
Only a simple lexical analyzer is needed for the RPN calculator. This
lexical analyzer skips blanks and tabs, then reads in numbers as
@@ -1194,8 +1197,8 @@ Before running Bison to produce a parser, we need to decide how to
arrange all the source code in one or more source files. For such a
simple example, the easiest thing is to put everything in one file. The
definitions of @code{yylex}, @code{yyerror} and @code{main} go at the
end, in the ``additional C code'' section of the file (@pxref{Grammar
Layout, ,The Overall Layout of a Bison Grammar}).
end, in the epilogue of the file
(@pxref{Grammar Layout, ,The Overall Layout of a Bison Grammar}).
For a large project, you would probably have several source files, and use
@code{make} to arrange to recompile them.
@@ -1326,12 +1329,14 @@ Operator precedence is determined by the line ordering of the
declarations; the higher the line number of the declaration (lower on
the page or screen), the higher the precedence. Hence, exponentiation
has the highest precedence, unary minus (@code{NEG}) is next, followed
by @samp{*} and @samp{/}, and so on. @xref{Precedence, ,Operator Precedence}.
by @samp{*} and @samp{/}, and so on. @xref{Precedence, ,Operator
Precedence}.
The other important new feature is the @code{%prec} in the grammar section
for the unary minus operator. The @code{%prec} simply instructs Bison that
the rule @samp{| '-' exp} has the same precedence as @code{NEG}---in this
case the next-to-highest. @xref{Contextual Precedence, ,Context-Dependent Precedence}.
The other important new feature is the @code{%prec} in the grammar
section for the unary minus operator. The @code{%prec} simply instructs
Bison that the rule @samp{| '-' exp} has the same precedence as
@code{NEG}---in this case the next-to-highest. @xref{Contextual
Precedence, ,Context-Dependent Precedence}.
Here is a sample run of @file{calc.y}:
@@ -1684,11 +1689,12 @@ are @code{NUM}, @code{VAR}, @code{FNCT}, and @code{exp}. Their
declarations are augmented with information about their data type (placed
between angle brackets).
The Bison construct @code{%type} is used for declaring nonterminal symbols,
just as @code{%token} is used for declaring token types. We have not used
@code{%type} before because nonterminal symbols are normally declared
implicitly by the rules that define them. But @code{exp} must be declared
explicitly so we can specify its value type. @xref{Type Decl, ,Nonterminal Symbols}.
The Bison construct @code{%type} is used for declaring nonterminal
symbols, just as @code{%token} is used for declaring token types. We
have not used @code{%type} before because nonterminal symbols are
normally declared implicitly by the rules that define them. But
@code{exp} must be declared explicitly so we can specify its value type.
@xref{Type Decl, ,Nonterminal Symbols}.
@node Mfcalc Rules
@subsection Grammar Rules for @code{mfcalc}
@@ -1962,8 +1968,8 @@ yylex (void)
@end smallexample
This program is both powerful and flexible. You may easily add new
functions, and it is a simple job to modify this code to install predefined
variables such as @code{pi} or @code{e} as well.
functions, and it is a simple job to modify this code to install
predefined variables such as @code{pi} or @code{e} as well.
@node Exercises
@section Exercises
@@ -2011,7 +2017,7 @@ appropriate delimiters:
@example
%@{
@var{C declarations}
@var{Prologue}
%@}
@var{Bison declarations}
@@ -2020,24 +2026,25 @@ appropriate delimiters:
@var{Grammar rules}
%%
@var{Additional C code}
@var{Epilogue}
@end example
Comments enclosed in @samp{/* @dots{} */} may appear in any of the sections.
@menu
* C Declarations:: Syntax and usage of the C declarations section.
* Prologue:: Syntax and usage of the prologue.
* Bison Declarations:: Syntax and usage of the Bison declarations section.
* Grammar Rules:: Syntax and usage of the grammar rules section.
* C Code:: Syntax and usage of the additional C code section.
* Epilogue:: Syntax and usage of the epilogue.
@end menu
@node C Declarations
@subsection The C Declarations Section
@cindex C declarations section
@cindex declarations, C
@node Prologue, Bison Declarations, , Grammar Outline
@subsection The prologue
@cindex declarations section
@cindex Prologue
@cindex declarations
The @var{C declarations} section contains macro definitions and
The @var{prologue} section contains macro definitions and
declarations of functions and variables that are used in the actions in the
grammar rules. These are copied to the beginning of the parser file so
that they precede the definition of @code{yyparse}. You can use
@@ -2067,18 +2074,18 @@ There must always be at least one grammar rule, and the first
@samp{%%} (which precedes the grammar rules) may never be omitted even
if it is the first thing in the file.
@node C Code
@subsection The Additional C Code Section
@node Epilogue, , Grammar Rules, Grammar Outline
@subsection The epilogue
@cindex additional C code section
@cindex epilogue
@cindex C code, section for additional
The @var{additional C code} section is copied verbatim to the end of the
parser file, just as the @var{C declarations} section is copied to the
beginning. This is the most convenient place to put anything that you
want to have in the parser file but which need not come before the
definition of @code{yyparse}. For example, the definitions of
@code{yylex} and @code{yyerror} often go here. @xref{Interface, ,Parser
C-Language Interface}.
The @var{epilogue} is copied verbatim to the end of the parser file, just as
the @var{prologue} is copied to the beginning. This is the most convenient
place to put anything that you want to have in the parser file but which need
not come before the definition of @code{yyparse}. For example, the
definitions of @code{yylex} and @code{yyerror} often go here.
@xref{Interface, ,Parser C-Language Interface}.
If the last section is empty, you may omit the @samp{%%} that separates it
from the grammar rules.
@@ -2086,7 +2093,7 @@ from the grammar rules.
The Bison parser itself contains many static variables whose names start
with @samp{yy} and many macros whose names start with @samp{YY}. It is a
good idea to avoid using any such names (except those documented in this
manual) in the additional C code section of the grammar file.
manual) in the epilogue of the grammar file.
@node Symbols
@section Symbols, Terminal and Nonterminal
@@ -2408,8 +2415,8 @@ specify some other type, define @code{YYSTYPE} as a macro, like this:
@end example
@noindent
This macro definition must go in the C declarations section of the grammar
file (@pxref{Grammar Outline, ,Outline of a Bison Grammar}).
This macro definition must go in the prologue of the grammar file
(@pxref{Grammar Outline, ,Outline of a Bison Grammar}).
@node Multiple Types
@subsection More Than One Value Type
@@ -2425,7 +2432,8 @@ requires you to do two things:
@itemize @bullet
@item
Specify the entire collection of possible data types, with the
@code{%union} Bison declaration (@pxref{Union Decl, ,The Collection of Value Types}).
@code{%union} Bison declaration (@pxref{Union Decl, ,The Collection of
Value Types}).
@item
Choose one of those types for each symbol (terminal or nonterminal) for
@@ -2447,10 +2455,11 @@ is to compute a semantic value for the grouping built by the rule from the
semantic values associated with tokens or smaller groupings.
An action consists of C statements surrounded by braces, much like a
compound statement in C. It can be placed at any position in the rule; it
is executed at that position. Most rules have just one action at the end
of the rule, following all the components. Actions in the middle of a rule
are tricky and used only for special purposes (@pxref{Mid-Rule Actions, ,Actions in Mid-Rule}).
compound statement in C. It can be placed at any position in the rule;
it is executed at that position. Most rules have just one action at the
end of the rule, following all the components. Actions in the middle of
a rule are tricky and used only for special purposes (@pxref{Mid-Rule
Actions, ,Actions in Mid-Rule}).
The C code in an action can refer to the semantic values of the components
matched by the rule with the construct @code{$@var{n}}, which stands for
@@ -2730,8 +2739,8 @@ especially symbol locations.
@c (terminal or not) ?
The way locations are handled is defined by providing a data type, and actions
to take when rules are matched.
The way locations are handled is defined by providing a data type, and
actions to take when rules are matched.
@menu
* Location Type:: Specifying a data type for locations.
@@ -2832,11 +2841,11 @@ exp: @dots{}
@subsection Default Action for Locations
@vindex YYLLOC_DEFAULT
Actually, actions are not the best place to compute locations. Since locations
are much more general than semantic values, there is room in the output parser
to redefine the default action to take for each rule. The
@code{YYLLOC_DEFAULT} macro is called each time a rule is matched, before the
associated action is run.
Actually, actions are not the best place to compute locations. Since
locations are much more general than semantic values, there is room in
the output parser to redefine the default action to take for each
rule. The @code{YYLLOC_DEFAULT} macro is invoked each time a rule is
matched, before the associated action is run.
Most of the time, this macro is general enough to suppress location
dedicated code from semantic actions.
@@ -2888,7 +2897,8 @@ value (@pxref{Multiple Types, ,More Than One Value Type}).
The first rule in the file also specifies the start symbol, by default.
If you want some other symbol to be the start symbol, you must declare
it explicitly (@pxref{Language and Grammar, ,Languages and Context-Free Grammars}).
it explicitly (@pxref{Language and Grammar, ,Languages and Context-Free
Grammars}).
@menu
* Token Decl:: Declaring terminal symbols.
@@ -2937,7 +2947,8 @@ with each other or with ASCII characters.
In the event that the stack type is a union, you must augment the
@code{%token} or other token declaration to include the data type
alternative delimited by angle-brackets (@pxref{Multiple Types, ,More Than One Value Type}).
alternative delimited by angle-brackets (@pxref{Multiple Types, ,More
Than One Value Type}).
For example:
@@ -2984,7 +2995,8 @@ obtain the token type code number (@pxref{Calling Convention}).
Use the @code{%left}, @code{%right} or @code{%nonassoc} declaration to
declare a token and specify its precedence and associativity, all at
once. These are called @dfn{precedence declarations}.
@xref{Precedence, ,Operator Precedence}, for general information on operator precedence.
@xref{Precedence, ,Operator Precedence}, for general information on
operator precedence.
The syntax of a precedence declaration is the same as that of
@code{%token}: either
@@ -3071,11 +3083,12 @@ used. This is done with a @code{%type} declaration, like this:
@end example
@noindent
Here @var{nonterminal} is the name of a nonterminal symbol, and @var{type}
is the name given in the @code{%union} to the alternative that you want
(@pxref{Union Decl, ,The Collection of Value Types}). You can give any number of nonterminal symbols in
the same @code{%type} declaration, if they have the same value type. Use
spaces to separate the symbol names.
Here @var{nonterminal} is the name of a nonterminal symbol, and
@var{type} is the name given in the @code{%union} to the alternative
that you want (@pxref{Union Decl, ,The Collection of Value Types}). You
can give any number of nonterminal symbols in the same @code{%type}
declaration, if they have the same value type. Use spaces to separate
the symbol names.
You can also declare the value type of a terminal symbol. To do this,
use the same @code{<@var{type}>} construction in a declaration for the
@@ -3150,7 +3163,7 @@ may override this restriction with the @code{%start} declaration as follows:
@subsection A Pure (Reentrant) Parser
@cindex reentrant parser
@cindex pure parser
@findex %pure_parser
@findex %pure-parser
A @dfn{reentrant} program is one which does not alter in the course of
execution; in other words, it consists entirely of @dfn{pure} (read-only)
@@ -3166,11 +3179,11 @@ statically allocated variables for communication with @code{yylex},
including @code{yylval} and @code{yylloc}.)
Alternatively, you can generate a pure, reentrant parser. The Bison
declaration @code{%pure_parser} says that you want the parser to be
declaration @code{%pure-parser} says that you want the parser to be
reentrant. It looks like this:
@example
%pure_parser
%pure-parser
@end example
The result is that the communication variables @code{yylval} and
@@ -3257,12 +3270,12 @@ be able to refer to token type codes and the variable
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 @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 @code{%header-extension .hh} directive will produce a header file
@c named @file{foo.tab.hh}
@item %locations
@@ -3276,10 +3289,10 @@ accurate parse error messages.
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}.
@code{yylval}, @code{yychar}, @code{yydebug}, and possible
@code{yylloc}. 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
@@ -3305,14 +3318,14 @@ Specify the @var{filename} for the parser file.
Request a pure (reentrant) parser program (@pxref{Pure Decl, ,A Pure
(Reentrant) Parser}).
@c @item %source_extension
@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 @code{%source-extension .cpp} directive will produce a parser file
@c named @file{foo.tab.cpp}
@item %token_table
@item %token-table
Generate an array of token names in the parser file. The name of the
array is @code{yytname}; @code{yytname[@var{i}]} is the name of the
token whose internal Bison token code number is @var{i}. The first three
@@ -3330,7 +3343,7 @@ consists of three characters @samp{*"*}, its string in @code{yytname}
contains @samp{"*"*"}. (In C, that would be written as
@code{"\"*\"*\""}).
When you specify @code{%token_table}, Bison also generates macro
When you specify @code{%token-table}, Bison also generates macro
definitions for macros @code{YYNTOKENS}, @code{YYNNTS}, and
@code{YYNRULES}, and @code{YYNSTATES}:
@@ -3361,7 +3374,6 @@ 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
@@ -3378,10 +3390,10 @@ language with the same program? Then you need to avoid a name conflict
between different definitions of @code{yyparse}, @code{yylval}, and so on.
The easy way to do this is to use the option @samp{-p @var{prefix}}
(@pxref{Invocation, ,Invoking Bison}). This renames the interface functions and
variables of the Bison parser to start with @var{prefix} instead of
@samp{yy}. You can use this to give each parser distinct names that do
not conflict.
(@pxref{Invocation, ,Invoking Bison}). This renames the interface
functions and variables of the Bison parser to start with @var{prefix}
instead of @samp{yy}. You can use this to give each parser distinct
names that do not conflict.
The precise list of symbols renamed is @code{yyparse}, @code{yylex},
@code{yyerror}, @code{yynerrs}, @code{yylval}, @code{yychar} and
@@ -3410,8 +3422,8 @@ functions that it needs to use.
Keep in mind that the parser uses many C identifiers starting with
@samp{yy} and @samp{YY} for internal purposes. If you use such an
identifier (aside from those in this manual) in an action or in additional
C code in the grammar file, you are likely to run into trouble.
identifier (aside from those in this manual) in an action or in epilogue
in the grammar file, you are likely to run into trouble.
@menu
* Parser Function:: How to call @code{yyparse} and what it returns.
@@ -3552,7 +3564,7 @@ for (i = 0; i < YYNTOKENS; i++)
@end smallexample
The @code{yytname} table is generated only if you use the
@code{%token_table} declaration. @xref{Decl Summary}.
@code{%token-table} declaration. @xref{Decl Summary}.
@end itemize
@node Token Values
@@ -3575,9 +3587,10 @@ Thus, if the type is @code{int} (the default), you might write this in
@end example
When you are using multiple data types, @code{yylval}'s type is a union
made from the @code{%union} declaration (@pxref{Union Decl, ,The Collection of Value Types}). So when
you store a token's value, you must use the proper member of the union.
If the @code{%union} declaration looks like this:
made from the @code{%union} declaration (@pxref{Union Decl, ,The
Collection of Value Types}). So when you store a token's value, you
must use the proper member of the union. If the @code{%union}
declaration looks like this:
@example
@group
@@ -3625,7 +3638,7 @@ The data type of @code{yylloc} has the name @code{YYLTYPE}.
@node Pure Calling
@subsection Calling Conventions for Pure Parsers
When you use the Bison declaration @code{%pure_parser} to request a
When you use the Bison declaration @code{%pure-parser} to request a
pure, reentrant parser, the global communication variables @code{yylval}
and @code{yylloc} cannot be used. (@xref{Pure Decl, ,A Pure (Reentrant)
Parser}.) In such parsers the two global variables are replaced by
@@ -3725,7 +3738,7 @@ arguments in total, depending on whether an argument of type
the proper object type, or you can declare it as @code{void *} and
access the contents as shown above.
You can use @samp{%pure_parser} to request a reentrant parser without
You can use @samp{%pure-parser} to request a reentrant parser without
also using @code{YYPARSE_PARAM}. Then you should call @code{yyparse}
with no arguments, as usual.
@@ -3786,8 +3799,8 @@ immediately return 1.
@vindex yynerrs
The variable @code{yynerrs} contains the number of syntax errors
encountered so far. Normally this variable is global; but if you
request a pure parser (@pxref{Pure Decl, ,A Pure (Reentrant) Parser}) then it is a local variable
which only the actions can access.
request a pure parser (@pxref{Pure Decl, ,A Pure (Reentrant) Parser})
then it is a local variable which only the actions can access.
@node Action Features
@section Special Features for Use in Actions
@@ -3808,7 +3821,8 @@ Acts like a variable that contains the semantic value for the
@item $<@var{typealt}>$
Like @code{$$} but specifies alternative @var{typealt} in the union
specified by the @code{%union} declaration. @xref{Action Types, ,Data Types of Values in Actions}.
specified by the @code{%union} declaration. @xref{Action Types, ,Data
Types of Values in Actions}.
@item $<@var{typealt}>@var{n}
Like @code{$@var{n}} but specifies alternative @var{typealt} in the
@@ -4237,18 +4251,19 @@ and therefore are represented by names, not character literals.)
The first effect of the precedence declarations is to assign precedence
levels to the terminal symbols declared. The second effect is to assign
precedence levels to certain rules: each rule gets its precedence from the
last terminal symbol mentioned in the components. (You can also specify
explicitly the precedence of a rule. @xref{Contextual Precedence, ,Context-Dependent Precedence}.)
precedence levels to certain rules: each rule gets its precedence from
the last terminal symbol mentioned in the components. (You can also
specify explicitly the precedence of a rule. @xref{Contextual
Precedence, ,Context-Dependent Precedence}.)
Finally, the resolution of conflicts works by comparing the
precedence of the rule being considered with that of the
look-ahead token. If the token's precedence is higher, the
choice is to shift. If the rule's precedence is higher, the
choice is to reduce. If they have equal precedence, the choice
is made based on the associativity of that precedence level. The
verbose output file made by @samp{-v} (@pxref{Invocation, ,Invoking Bison}) says
how each conflict was resolved.
Finally, the resolution of conflicts works by comparing the precedence
of the rule being considered with that of the look-ahead token. If the
token's precedence is higher, the choice is to shift. If the rule's
precedence is higher, the choice is to reduce. If they have equal
precedence, the choice is made based on the associativity of that
precedence level. The verbose output file made by @samp{-v}
(@pxref{Invocation, ,Invoking Bison}) says how each conflict was
resolved.
Not all rules and not all tokens have precedence. If either the rule or
the look-ahead token has no precedence, then the default is to shift.
@@ -4855,10 +4870,9 @@ Here we assume that @code{yylex} looks at the value of @code{hexflag}; when
it is nonzero, all integers are parsed in hexadecimal, and tokens starting
with letters are parsed as integers if possible.
The declaration of @code{hexflag} shown in the C declarations section of
the parser file is needed to make it accessible to the actions
(@pxref{C Declarations, ,The C Declarations Section}). You must also write the code in @code{yylex}
to obey the flag.
The declaration of @code{hexflag} shown in the prologue of the parser file
is needed to make it accessible to the actions (@pxref{Prologue, ,The Prologue}).
You must also write the code in @code{yylex} to obey the flag.
@node Tie-in Recovery
@section Lexical Tie-ins and Error Recovery
@@ -4928,19 +4942,21 @@ 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} 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.
@samp{#define YYDEBUG 1} in the prologue of the grammar file
(@pxref{Prologue, , The Prologue}). 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 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}.
and @code{YYPRINTF} is defined to @code{fprintf}. In the same
situation, C++ parsers include @code{<cstdio>} and use
@code{std::fprintf} instead.
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}.
@@ -4965,13 +4981,14 @@ of the state stack afterward.
@end itemize
To make sense of this information, it helps to refer to the listing file
produced by the Bison @samp{-v} option (@pxref{Invocation, ,Invoking Bison}). This file
shows the meaning of each state in terms of positions in various rules, and
also what each state will do with each possible input token. As you read
the successive trace messages, you can see that the parser is functioning
according to its specification in the listing file. Eventually you will
arrive at the place where something undesirable happens, and you will see
which parts of the grammar are to blame.
produced by the Bison @samp{-v} option (@pxref{Invocation, ,Invoking
Bison}). This file shows the meaning of each state in terms of
positions in various rules, and also what each state will do with each
possible input token. As you read the successive trace messages, you
can see that the parser is functioning according to its specification in
the listing file. Eventually you will arrive at the place where
something undesirable happens, and you will see which parts of the
grammar are to blame.
The parser file is a C program and you can use C debuggers on it, but it's
not easy to interpret what it is doing. The parser function is a
@@ -5046,8 +5063,6 @@ 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
@@ -5080,7 +5095,6 @@ Print the version number of Bison and exit.
@need 1750
@item -y
@itemx --yacc
@itemx --fixed-output-files
Equivalent to @samp{-o y.tab.c}; the parser output file is called
@file{y.tab.c}, and the other outputs are called @file{y.output} and
@file{y.tab.h}. The purpose of this option is to imitate Yacc's output
@@ -5193,7 +5207,7 @@ would like to direct Bison to use a different copy, setting the
environment variable @code{BISON_SIMPLE} to the path of the file will
cause Bison to use that copy instead.
When the @samp{%semantic_parser} declaration is used, Bison copies from
When the @samp{%semantic-parser} declaration is used, Bison copies from
a file called @file{bison.hairy} instead. The location of this file can
also be specified or overridden in a similar fashion, with the
@code{BISON_HAIRY} environment variable.
@@ -5213,7 +5227,6 @@ the corresponding short option.
\line{ --debug \leaderfill -t}
\line{ --defines \leaderfill -d}
\line{ --file-prefix \leaderfill -b}
\line{ --fixed-output-files \leaderfill -y}
\line{ --graph \leaderfill -g}
\line{ --help \leaderfill -h}
\line{ --name-prefix \leaderfill -p}
@@ -5232,7 +5245,6 @@ the corresponding short option.
--debug -t
--defines=@var{defines-file} -d
--file-prefix=@var{prefix} -b @var{file-prefix}
--fixed-output-files --yacc -y
--graph=@var{graph-file} -d
--help -h
--name-prefix=@var{prefix} -p @var{name-prefix}
@@ -5242,43 +5254,10 @@ the corresponding short option.
--token-table -k
--verbose -v
--version -V
--yacc -y
@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
@@ -5413,8 +5392,9 @@ containing an error message. @xref{Error Reporting, ,The Error
Reporting Function @code{yyerror}}.
@item yylex
User-supplied lexical analyzer function, called with no arguments
to get the next token. @xref{Lexical, ,The Lexical Analyzer Function @code{yylex}}.
User-supplied lexical analyzer function, called with no arguments to get
the next token. @xref{Lexical, ,The Lexical Analyzer Function
@code{yylex}}.
@item yylval
External variable in which @code{yylex} should place the semantic
@@ -5450,11 +5430,11 @@ Bison declaration to create a header file meant for the scanner.
Bison declaration to set tge prefix of the output files. @xref{Decl
Summary}.
@c @item %source_extension
@c @item %source-extension
@c Bison declaration to specify the generated parser output file extension.
@c @xref{Decl Summary}.
@c
@c @item %header_extension
@c @item %header-extension
@c Bison declaration to specify the generated parser header file extension
@c if required. @xref{Decl Summary}.
@@ -5490,7 +5470,8 @@ Bison declaration to assign right associativity to token(s).
@xref{Precedence Decl, ,Operator Precedence}.
@item %start
Bison declaration to specify the start symbol. @xref{Start Decl, ,The Start-Symbol}.
Bison declaration to specify the start symbol. @xref{Start Decl, ,The
Start-Symbol}.
@item %token
Bison declaration to declare token(s) without specifying precedence.
@@ -5501,7 +5482,8 @@ Bison declaration to include a token name table in the parser file.
@xref{Decl Summary}.
@item %type
Bison declaration to declare nonterminals. @xref{Type Decl, ,Nonterminal Symbols}.
Bison declaration to declare nonterminals. @xref{Type Decl,
,Nonterminal Symbols}.
@item %union
Bison declaration to specify several possible data types for semantic
@@ -5513,13 +5495,13 @@ These are the punctuation and delimiters used in Bison input:
@table @samp
@item %%
Delimiter used to separate the grammar rule section from the
Bison declarations section or the additional C code section.
Bison declarations section or the epilogue.
@xref{Grammar Layout, ,The Overall Layout of a Bison Grammar}.
@item %@{ %@}
All code listed between @samp{%@{} and @samp{%@}} is copied directly to
the output file uninterpreted. Such code forms the ``C declarations''
section of the input file. @xref{Grammar Outline, ,Outline of a Bison
the output file uninterpreted. Such code forms the prologue of the input
file. @xref{Grammar Outline, ,Outline of a Bison
Grammar}.
@item /*@dots{}*/
-4
View File
@@ -1,4 +0,0 @@
@set UPDATED 25 February 2002
@set UPDATED-MONTH February 2002
@set EDITION 1.34
@set VERSION 1.34
-1
View File
@@ -1 +0,0 @@
Makefile
-4
View File
@@ -1,4 +0,0 @@
2001-09-13 GNU <[email protected]>
* Version 0.10.40 released.
-313
View File
@@ -1,313 +0,0 @@
# Makefile for directory with message catalog handling in GNU NLS Utilities.
# Copyright (C) 1995-1998, 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 Library 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
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library 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.
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ..
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
transform = @program_transform_name@
libdir = @libdir@
includedir = @includedir@
datadir = @datadir@
localedir = $(datadir)/locale
gettextsrcdir = $(datadir)/gettext/intl
aliaspath = $(localedir)
subdir = intl
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = @MKINSTALLDIRS@
mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
l = @INTL_LIBTOOL_SUFFIX_PREFIX@
AR = ar
CC = @CC@
LIBTOOL = @LIBTOOL@
RANLIB = @RANLIB@
YACC = @INTLBISON@ -y -d
YFLAGS = --name-prefix=__gettext
DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
-DLIBDIR=\"$(libdir)\" @DEFS@
CPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
HEADERS = $(COMHDRS) libgnuintl.h libgettext.h loadinfo.h
COMHDRS = gettext.h gettextP.h hash-string.h
SOURCES = $(COMSRCS) intl-compat.c
COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \
localcharset.c
OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \
plural.$lo localcharset.$lo
GETTOBJS = intl-compat.$lo
DISTFILES.common = Makefile.in \
config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
DISTFILES.generated = plural.c
DISTFILES.normal = VERSION
DISTFILES.gettext = COPYING.LIB-2 COPYING.LIB-2.1 libintl.glibc
DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c
# Libtool's library version information for libintl.
# Before making a gettext release, the gettext maintainer must change this
# according to the libtool documentation, section "Library interface versions".
# Maintainers of other packages that include the intl directory must *not*
# change these values.
LTV_CURRENT=1
LTV_REVISION=1
LTV_AGE=0
.SUFFIXES:
.SUFFIXES: .c .y .o .lo .sin .sed
.c.o:
$(COMPILE) $<
.c.lo:
$(LIBTOOL) --mode=compile $(COMPILE) $<
.y.c:
$(YACC) $(YFLAGS) --output $@ $<
rm -f $*.h
.sin.sed:
sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
mv t-$@ $@
INCLUDES = -I.. -I. -I$(top_srcdir)/intl
all: all-@USE_INCLUDED_LIBINTL@
all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
all-no: all-no-@BUILD_INCLUDED_LIBINTL@
all-no-yes: libgnuintl.$la
all-no-no:
libintl.a libgnuintl.a: $(OBJECTS)
rm -f $@
$(AR) cru $@ $(OBJECTS)
$(RANLIB) $@
libintl.la libgnuintl.la: $(OBJECTS)
$(LIBTOOL) --mode=link \
$(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
$(OBJECTS) @LIBICONV@ \
-version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
-rpath $(libdir) \
-no-undefined
libintl.h: libgnuintl.h
cp $(srcdir)/libgnuintl.h libintl.h
charset.alias: config.charset
$(SHELL) $(srcdir)/config.charset '@host@' > t-$@
mv t-$@ $@
check: all
# This installation goal is only used in GNU gettext. Packages which
# only use the library should use install instead.
# We must not install the libintl.h/libintl.a files if we are on a
# system which has the GNU gettext() function in its C library or in a
# separate library.
# If you want to use the one which comes with this version of the
# package, you have to use `configure --with-included-gettext'.
install: install-exec install-data
install-exec: all
if test "$(PACKAGE)" = "gettext" \
&& test '@INTLOBJS@' = '$(GETTOBJS)'; then \
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
$(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
$(LIBTOOL) --mode=install \
$(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
else \
: ; \
fi
if test '@USE_INCLUDED_LIBINTL@' = yes; then \
$(mkinstalldirs) $(DESTDIR)$(libdir); \
temp=$(DESTDIR)$(libdir)/t-charset.alias; \
dest=$(DESTDIR)$(libdir)/charset.alias; \
if test -f $(DESTDIR)$(libdir)/charset.alias; then \
orig=$(DESTDIR)$(libdir)/charset.alias; \
sed -f ref-add.sed $$orig > $$temp; \
$(INSTALL_DATA) $$temp $$dest; \
rm -f $$temp; \
else \
if test @GLIBC21@ = no; then \
orig=charset.alias; \
sed -f ref-add.sed $$orig > $$temp; \
$(INSTALL_DATA) $$temp $$dest; \
rm -f $$temp; \
fi; \
fi; \
$(mkinstalldirs) $(DESTDIR)$(localedir); \
test -f $(DESTDIR)$(localedir)/locale.alias \
&& orig=$(DESTDIR)$(localedir)/locale.alias \
|| orig=$(srcdir)/locale.alias; \
temp=$(DESTDIR)$(localedir)/t-locale.alias; \
dest=$(DESTDIR)$(localedir)/locale.alias; \
sed -f ref-add.sed $$orig > $$temp; \
$(INSTALL_DATA) $$temp $$dest; \
rm -f $$temp; \
else \
: ; \
fi
install-data: all
if test "$(PACKAGE)" = "gettext"; then \
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
$(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
$(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
dists="COPYING.LIB-2 COPYING.LIB-2.1 $(DISTFILES.common)"; \
for file in $$dists; do \
$(INSTALL_DATA) $(srcdir)/$$file \
$(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
dists="$(DISTFILES.generated)"; \
for file in $$dists; do \
if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
$(INSTALL_DATA) $$dir/$$file \
$(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
dists="$(DISTFILES.obsolete)"; \
for file in $$dists; do \
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
else \
: ; \
fi
# Define this as empty until I found a useful application.
installcheck:
uninstall:
if test "$(PACKAGE)" = "gettext" \
&& test '@INTLOBJS@' = '$(GETTOBJS)'; then \
rm -f $(DESTDIR)$(includedir)/libintl.h; \
$(LIBTOOL) --mode=uninstall \
rm -f $(DESTDIR)$(libdir)/libintl.$la; \
else \
: ; \
fi
if test '@USE_INCLUDED_LIBINTL@' = yes; then \
if test -f $(DESTDIR)$(libdir)/charset.alias; then \
temp=$(DESTDIR)$(libdir)/t-charset.alias; \
dest=$(DESTDIR)$(libdir)/charset.alias; \
sed -f ref-del.sed $$dest > $$temp; \
if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
rm -f $$dest; \
else \
$(INSTALL_DATA) $$temp $$dest; \
fi; \
rm -f $$temp; \
fi; \
if test -f $(DESTDIR)$(localedir)/locale.alias; then \
temp=$(DESTDIR)$(localedir)/t-locale.alias; \
dest=$(DESTDIR)$(localedir)/locale.alias; \
sed -f ref-del.sed $$dest > $$temp; \
if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
rm -f $$dest; \
else \
$(INSTALL_DATA) $$temp $$dest; \
fi; \
rm -f $$temp; \
fi; \
else \
: ; \
fi
if test "$(PACKAGE)" = "gettext"; then \
for file in VERSION ChangeLog COPYING.LIB-2 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
else \
: ; \
fi
info dvi:
$(OBJECTS): ../config.h libgnuintl.h
bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
tags: TAGS
TAGS: $(HEADERS) $(SOURCES)
here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
id: ID
ID: $(HEADERS) $(SOURCES)
here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
mostlyclean:
rm -f *.a *.la *.o *.lo core core.*
rm -f libintl.h charset.alias ref-add.sed ref-del.sed
rm -f -r .libs _libs
clean: mostlyclean
distclean: clean
rm -f Makefile ID TAGS
if test "$(PACKAGE)" = gettext; then \
rm -f ChangeLog.inst $(DISTFILES.normal); \
else \
: ; \
fi
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
# GNU gettext needs not contain the file `VERSION' but contains some
# other files which should not be distributed in other packages.
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir: Makefile
if test "$(PACKAGE)" = gettext; then \
additional="$(DISTFILES.gettext)"; \
else \
additional="$(DISTFILES.normal)"; \
fi; \
$(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
ln $$dir/$$file $(distdir) 2> /dev/null \
|| cp -p $$dir/$$file $(distdir); \
done
Makefile: Makefile.in ../config.status
cd .. \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
-1
View File
@@ -1 +0,0 @@
GNU gettext library from gettext-0.10.40
-369
View File
@@ -1,369 +0,0 @@
/* Implementation of the bindtextdomain(3) function
Copyright (C) 1995-1998, 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 Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library 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. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#ifdef _LIBC
# include <libintl.h>
#else
# include "libgnuintl.h"
#endif
#include "gettextP.h"
#ifdef _LIBC
/* We have to handle multi-threaded applications. */
# include <bits/libc-lock.h>
#else
/* Provide dummy implementation if this is outside glibc. */
# define __libc_rwlock_define(CLASS, NAME)
# define __libc_rwlock_wrlock(NAME)
# define __libc_rwlock_unlock(NAME)
#endif
/* The internal variables in the standalone libintl.a must have different
names than the internal variables in GNU libc, otherwise programs
using libintl.a cannot be linked statically. */
#if !defined _LIBC
# define _nl_default_dirname _nl_default_dirname__
# define _nl_domain_bindings _nl_domain_bindings__
#endif
/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
#ifndef offsetof
# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
#endif
/* @@ end of prolog @@ */
/* Contains the default location of the message catalogs. */
extern const char _nl_default_dirname[];
/* List with bindings of specific domains. */
extern struct binding *_nl_domain_bindings;
/* Lock variable to protect the global data in the gettext implementation. */
__libc_rwlock_define (extern, _nl_state_lock)
/* Names for the libintl functions are a problem. They must not clash
with existing names and they should follow ANSI C. But this source
code is also used in GNU C Library where the names have a __
prefix. So we have to make a difference here. */
#ifdef _LIBC
# define BINDTEXTDOMAIN __bindtextdomain
# define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset
# ifndef strdup
# define strdup(str) __strdup (str)
# endif
#else
# define BINDTEXTDOMAIN bindtextdomain__
# define BIND_TEXTDOMAIN_CODESET bind_textdomain_codeset__
#endif
/* Prototypes for local functions. */
static void set_binding_values PARAMS ((const char *domainname,
const char **dirnamep,
const char **codesetp));
/* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
to be used for the DOMAINNAME message catalog.
If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not
modified, only the current value is returned.
If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither
modified nor returned. */
static void
set_binding_values (domainname, dirnamep, codesetp)
const char *domainname;
const char **dirnamep;
const char **codesetp;
{
struct binding *binding;
int modified;
/* Some sanity checks. */
if (domainname == NULL || domainname[0] == '\0')
{
if (dirnamep)
*dirnamep = NULL;
if (codesetp)
*codesetp = NULL;
return;
}
__libc_rwlock_wrlock (_nl_state_lock);
modified = 0;
for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
{
int compare = strcmp (domainname, binding->domainname);
if (compare == 0)
/* We found it! */
break;
if (compare < 0)
{
/* It is not in the list. */
binding = NULL;
break;
}
}
if (binding != NULL)
{
if (dirnamep)
{
const char *dirname = *dirnamep;
if (dirname == NULL)
/* The current binding has be to returned. */
*dirnamep = binding->dirname;
else
{
/* The domain is already bound. If the new value and the old
one are equal we simply do nothing. Otherwise replace the
old binding. */
char *result = binding->dirname;
if (strcmp (dirname, result) != 0)
{
if (strcmp (dirname, _nl_default_dirname) == 0)
result = (char *) _nl_default_dirname;
else
{
#if defined _LIBC || defined HAVE_STRDUP
result = strdup (dirname);
#else
size_t len = strlen (dirname) + 1;
result = (char *) malloc (len);
if (__builtin_expect (result != NULL, 1))
memcpy (result, dirname, len);
#endif
}
if (__builtin_expect (result != NULL, 1))
{
if (binding->dirname != _nl_default_dirname)
free (binding->dirname);
binding->dirname = result;
modified = 1;
}
}
*dirnamep = result;
}
}
if (codesetp)
{
const char *codeset = *codesetp;
if (codeset == NULL)
/* The current binding has be to returned. */
*codesetp = binding->codeset;
else
{
/* The domain is already bound. If the new value and the old
one are equal we simply do nothing. Otherwise replace the
old binding. */
char *result = binding->codeset;
if (result == NULL || strcmp (codeset, result) != 0)
{
#if defined _LIBC || defined HAVE_STRDUP
result = strdup (codeset);
#else
size_t len = strlen (codeset) + 1;
result = (char *) malloc (len);
if (__builtin_expect (result != NULL, 1))
memcpy (result, codeset, len);
#endif
if (__builtin_expect (result != NULL, 1))
{
if (binding->codeset != NULL)
free (binding->codeset);
binding->codeset = result;
binding->codeset_cntr++;
modified = 1;
}
}
*codesetp = result;
}
}
}
else if ((dirnamep == NULL || *dirnamep == NULL)
&& (codesetp == NULL || *codesetp == NULL))
{
/* Simply return the default values. */
if (dirnamep)
*dirnamep = _nl_default_dirname;
if (codesetp)
*codesetp = NULL;
}
else
{
/* We have to create a new binding. */
size_t len = strlen (domainname) + 1;
struct binding *new_binding =
(struct binding *) malloc (offsetof (struct binding, domainname) + len);
if (__builtin_expect (new_binding == NULL, 0))
goto failed;
memcpy (new_binding->domainname, domainname, len);
if (dirnamep)
{
const char *dirname = *dirnamep;
if (dirname == NULL)
/* The default value. */
dirname = _nl_default_dirname;
else
{
if (strcmp (dirname, _nl_default_dirname) == 0)
dirname = _nl_default_dirname;
else
{
char *result;
#if defined _LIBC || defined HAVE_STRDUP
result = strdup (dirname);
if (__builtin_expect (result == NULL, 0))
goto failed_dirname;
#else
size_t len = strlen (dirname) + 1;
result = (char *) malloc (len);
if (__builtin_expect (result == NULL, 0))
goto failed_dirname;
memcpy (result, dirname, len);
#endif
dirname = result;
}
}
*dirnamep = dirname;
new_binding->dirname = (char *) dirname;
}
else
/* The default value. */
new_binding->dirname = (char *) _nl_default_dirname;
new_binding->codeset_cntr = 0;
if (codesetp)
{
const char *codeset = *codesetp;
if (codeset != NULL)
{
char *result;
#if defined _LIBC || defined HAVE_STRDUP
result = strdup (codeset);
if (__builtin_expect (result == NULL, 0))
goto failed_codeset;
#else
size_t len = strlen (codeset) + 1;
result = (char *) malloc (len);
if (__builtin_expect (result == NULL, 0))
goto failed_codeset;
memcpy (result, codeset, len);
#endif
codeset = result;
new_binding->codeset_cntr++;
}
*codesetp = codeset;
new_binding->codeset = (char *) codeset;
}
else
new_binding->codeset = NULL;
/* Now enqueue it. */
if (_nl_domain_bindings == NULL
|| strcmp (domainname, _nl_domain_bindings->domainname) < 0)
{
new_binding->next = _nl_domain_bindings;
_nl_domain_bindings = new_binding;
}
else
{
binding = _nl_domain_bindings;
while (binding->next != NULL
&& strcmp (domainname, binding->next->domainname) > 0)
binding = binding->next;
new_binding->next = binding->next;
binding->next = new_binding;
}
modified = 1;
/* Here we deal with memory allocation failures. */
if (0)
{
failed_codeset:
if (new_binding->dirname != _nl_default_dirname)
free (new_binding->dirname);
failed_dirname:
free (new_binding);
failed:
if (dirnamep)
*dirnamep = NULL;
if (codesetp)
*codesetp = NULL;
}
}
/* If we modified any binding, we flush the caches. */
if (modified)
++_nl_msg_cat_cntr;
__libc_rwlock_unlock (_nl_state_lock);
}
/* Specify that the DOMAINNAME message catalog will be found
in DIRNAME rather than in the system locale data base. */
char *
BINDTEXTDOMAIN (domainname, dirname)
const char *domainname;
const char *dirname;
{
set_binding_values (domainname, &dirname, NULL);
return (char *) dirname;
}
/* Specify the character encoding in which the messages from the
DOMAINNAME message catalog will be returned. */
char *
BIND_TEXTDOMAIN_CODESET (domainname, codeset)
const char *domainname;
const char *codeset;
{
set_binding_values (domainname, NULL, &codeset);
return (char *) codeset;
}
#ifdef _LIBC
/* Aliases for function names in GNU C Library. */
weak_alias (__bindtextdomain, bindtextdomain);
weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset);
#endif
-438
View File
@@ -1,438 +0,0 @@
#! /bin/sh
# Output a system dependent table of character encoding aliases.
#
# Copyright (C) 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 Library 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
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library 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.
#
# The table consists of lines of the form
# ALIAS CANONICAL
#
# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
# ALIAS is compared in a case sensitive way.
#
# CANONICAL is the GNU canonical name for this character encoding.
# It must be an encoding supported by libiconv. Support by GNU libc is
# also desirable. CANONICAL is case insensitive. Usually an upper case
# MIME charset name is preferred.
# The current list of GNU canonical charset names is as follows.
#
# name used by which systems a MIME name?
# ASCII, ANSI_X3.4-1968 glibc solaris freebsd
# ISO-8859-1 glibc aix hpux irix osf solaris freebsd yes
# ISO-8859-2 glibc aix hpux irix osf solaris freebsd yes
# ISO-8859-3 glibc yes
# ISO-8859-4 osf solaris freebsd yes
# ISO-8859-5 glibc aix hpux irix osf solaris freebsd yes
# ISO-8859-6 glibc aix hpux solaris yes
# ISO-8859-7 glibc aix hpux irix osf solaris yes
# ISO-8859-8 glibc aix hpux osf solaris yes
# ISO-8859-9 glibc aix hpux irix osf solaris yes
# ISO-8859-13 glibc
# ISO-8859-15 glibc aix osf solaris freebsd
# KOI8-R glibc solaris freebsd yes
# KOI8-U glibc freebsd yes
# CP437 dos
# CP775 dos
# CP850 aix osf dos
# CP852 dos
# CP855 dos
# CP856 aix
# CP857 dos
# CP861 dos
# CP862 dos
# CP864 dos
# CP865 dos
# CP866 freebsd dos
# CP869 dos
# CP874 win32 dos
# CP922 aix
# CP932 aix win32 dos
# CP943 aix
# CP949 osf win32 dos
# CP950 win32 dos
# CP1046 aix
# CP1124 aix
# CP1129 aix
# CP1250 win32
# CP1251 glibc win32
# CP1252 aix win32
# CP1253 win32
# CP1254 win32
# CP1255 win32
# CP1256 win32
# CP1257 win32
# GB2312 glibc aix hpux irix solaris freebsd yes
# EUC-JP glibc aix hpux irix osf solaris freebsd yes
# EUC-KR glibc aix hpux irix osf solaris freebsd yes
# EUC-TW glibc aix hpux irix osf solaris
# BIG5 glibc aix hpux osf solaris freebsd yes
# BIG5-HKSCS glibc
# GBK aix osf win32 dos
# GB18030 glibc
# SHIFT_JIS hpux osf solaris freebsd yes
# JOHAB glibc win32
# TIS-620 glibc aix hpux osf solaris
# VISCII glibc yes
# HP-ROMAN8 hpux
# HP-ARABIC8 hpux
# HP-GREEK8 hpux
# HP-HEBREW8 hpux
# HP-TURKISH8 hpux
# HP-KANA8 hpux
# DEC-KANJI osf
# DEC-HANYU osf
# UTF-8 glibc aix hpux osf solaris yes
#
# Note: Names which are not marked as being a MIME name should not be used in
# Internet protocols for information interchange (mail, news, etc.).
#
# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
# must understand both names and treat them as equivalent.
#
# The first argument passed to this file is the canonical host specification,
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
host="$1"
os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
echo "# This file contains a table of character encoding aliases,"
echo "# suitable for operating system '${os}'."
echo "# It was automatically generated from config.charset."
# List of references, updated during installation:
echo "# Packages using this file: "
case "$os" in
linux* | *-gnu*)
# With glibc-2.1 or newer, we don't need any canonicalization,
# because glibc has iconv and both glibc and libiconv support all
# GNU canonical names directly. Therefore, the Makefile does not
# need to install the alias file at all.
# The following applies only to glibc-2.0.x and older libcs.
echo "ISO_646.IRV:1983 ASCII"
;;
aix*)
echo "ISO8859-1 ISO-8859-1"
echo "ISO8859-2 ISO-8859-2"
echo "ISO8859-5 ISO-8859-5"
echo "ISO8859-6 ISO-8859-6"
echo "ISO8859-7 ISO-8859-7"
echo "ISO8859-8 ISO-8859-8"
echo "ISO8859-9 ISO-8859-9"
echo "ISO8859-15 ISO-8859-15"
echo "IBM-850 CP850"
echo "IBM-856 CP856"
echo "IBM-921 ISO-8859-13"
echo "IBM-922 CP922"
echo "IBM-932 CP932"
echo "IBM-943 CP943"
echo "IBM-1046 CP1046"
echo "IBM-1124 CP1124"
echo "IBM-1129 CP1129"
echo "IBM-1252 CP1252"
echo "IBM-eucCN GB2312"
echo "IBM-eucJP EUC-JP"
echo "IBM-eucKR EUC-KR"
echo "IBM-eucTW EUC-TW"
echo "big5 BIG5"
echo "GBK GBK"
echo "TIS-620 TIS-620"
echo "UTF-8 UTF-8"
;;
hpux*)
echo "iso88591 ISO-8859-1"
echo "iso88592 ISO-8859-2"
echo "iso88595 ISO-8859-5"
echo "iso88596 ISO-8859-6"
echo "iso88597 ISO-8859-7"
echo "iso88598 ISO-8859-8"
echo "iso88599 ISO-8859-9"
echo "iso885915 ISO-8859-15"
echo "roman8 HP-ROMAN8"
echo "arabic8 HP-ARABIC8"
echo "greek8 HP-GREEK8"
echo "hebrew8 HP-HEBREW8"
echo "turkish8 HP-TURKISH8"
echo "kana8 HP-KANA8"
echo "tis620 TIS-620"
echo "big5 BIG5"
echo "eucJP EUC-JP"
echo "eucKR EUC-KR"
echo "eucTW EUC-TW"
echo "hp15CN GB2312"
#echo "ccdc ?" # what is this?
echo "SJIS SHIFT_JIS"
echo "utf8 UTF-8"
;;
irix*)
echo "ISO8859-1 ISO-8859-1"
echo "ISO8859-2 ISO-8859-2"
echo "ISO8859-5 ISO-8859-5"
echo "ISO8859-7 ISO-8859-7"
echo "ISO8859-9 ISO-8859-9"
echo "eucCN GB2312"
echo "eucJP EUC-JP"
echo "eucKR EUC-KR"
echo "eucTW EUC-TW"
;;
osf*)
echo "ISO8859-1 ISO-8859-1"
echo "ISO8859-2 ISO-8859-2"
echo "ISO8859-4 ISO-8859-4"
echo "ISO8859-5 ISO-8859-5"
echo "ISO8859-7 ISO-8859-7"
echo "ISO8859-8 ISO-8859-8"
echo "ISO8859-9 ISO-8859-9"
echo "ISO8859-15 ISO-8859-15"
echo "cp850 CP850"
echo "big5 BIG5"
echo "dechanyu DEC-HANYU"
echo "dechanzi GB2312"
echo "deckanji DEC-KANJI"
echo "deckorean EUC-KR"
echo "eucJP EUC-JP"
echo "eucKR EUC-KR"
echo "eucTW EUC-TW"
echo "GBK GBK"
echo "KSC5601 CP949"
echo "sdeckanji EUC-JP"
echo "SJIS SHIFT_JIS"
echo "TACTIS TIS-620"
echo "UTF-8 UTF-8"
;;
solaris*)
echo "646 ASCII"
echo "ISO8859-1 ISO-8859-1"
echo "ISO8859-2 ISO-8859-2"
echo "ISO8859-4 ISO-8859-4"
echo "ISO8859-5 ISO-8859-5"
echo "ISO8859-6 ISO-8859-6"
echo "ISO8859-7 ISO-8859-7"
echo "ISO8859-8 ISO-8859-8"
echo "ISO8859-9 ISO-8859-9"
echo "ISO8859-15 ISO-8859-15"
echo "koi8-r KOI8-R"
echo "BIG5 BIG5"
echo "gb2312 GB2312"
echo "cns11643 EUC-TW"
echo "5601 EUC-KR"
echo "eucJP EUC-JP"
echo "PCK SHIFT_JIS"
echo "TIS620.2533 TIS-620"
#echo "sun_eu_greek ?" # what is this?
echo "UTF-8 UTF-8"
;;
freebsd*)
# FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
# localcharset.c falls back to using the full locale name
# from the environment variables.
echo "C ASCII"
echo "US-ASCII ASCII"
for l in la_LN lt_LN; do
echo "$l.ASCII ASCII"
done
for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
echo "$l.ISO_8859-1 ISO-8859-1"
echo "$l.DIS_8859-15 ISO-8859-15"
done
for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
echo "$l.ISO_8859-2 ISO-8859-2"
done
for l in la_LN lt_LT; do
echo "$l.ISO_8859-4 ISO-8859-4"
done
for l in ru_RU ru_SU; do
echo "$l.KOI8-R KOI8-R"
echo "$l.ISO_8859-5 ISO-8859-5"
echo "$l.CP866 CP866"
done
echo "uk_UA.KOI8-U KOI8-U"
echo "zh_TW.BIG5 BIG5"
echo "zh_TW.Big5 BIG5"
echo "zh_CN.EUC GB2312"
echo "ja_JP.EUC EUC-JP"
echo "ja_JP.SJIS SHIFT_JIS"
echo "ja_JP.Shift_JIS SHIFT_JIS"
echo "ko_KR.EUC EUC-KR"
;;
beos*)
# BeOS has a single locale, and it has UTF-8 encoding.
echo "* UTF-8"
;;
msdosdjgpp*)
# DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
# localcharset.c falls back to using the full locale name
# from the environment variables.
echo "#"
echo "# The encodings given here may not all be correct."
echo "# If you find that the encoding given for your language and"
echo "# country is not the one your DOS machine actually uses, just"
echo "# correct it in this file, and send a mail to"
echo "# Juan Manuel Guerrero <[email protected]>"
echo "# and Bruno Haible <[email protected]>."
echo "#"
echo "C ASCII"
# ISO-8859-1 languages
echo "ca CP850"
echo "ca_ES CP850"
echo "da CP865" # not CP850 ??
echo "da_DK CP865" # not CP850 ??
echo "de CP850"
echo "de_AT CP850"
echo "de_CH CP850"
echo "de_DE CP850"
echo "en CP850"
echo "en_AU CP850" # not CP437 ??
echo "en_CA CP850"
echo "en_GB CP850"
echo "en_NZ CP437"
echo "en_US CP437"
echo "en_ZA CP850" # not CP437 ??
echo "es CP850"
echo "es_AR CP850"
echo "es_BO CP850"
echo "es_CL CP850"
echo "es_CO CP850"
echo "es_CR CP850"
echo "es_CU CP850"
echo "es_DO CP850"
echo "es_EC CP850"
echo "es_ES CP850"
echo "es_GT CP850"
echo "es_HN CP850"
echo "es_MX CP850"
echo "es_NI CP850"
echo "es_PA CP850"
echo "es_PY CP850"
echo "es_PE CP850"
echo "es_SV CP850"
echo "es_UY CP850"
echo "es_VE CP850"
echo "et CP850"
echo "et_EE CP850"
echo "eu CP850"
echo "eu_ES CP850"
echo "fi CP850"
echo "fi_FI CP850"
echo "fr CP850"
echo "fr_BE CP850"
echo "fr_CA CP850"
echo "fr_CH CP850"
echo "fr_FR CP850"
echo "ga CP850"
echo "ga_IE CP850"
echo "gd CP850"
echo "gd_GB CP850"
echo "gl CP850"
echo "gl_ES CP850"
echo "id CP850" # not CP437 ??
echo "id_ID CP850" # not CP437 ??
echo "is CP861" # not CP850 ??
echo "is_IS CP861" # not CP850 ??
echo "it CP850"
echo "it_CH CP850"
echo "it_IT CP850"
echo "lt CP775"
echo "lt_LT CP775"
echo "lv CP775"
echo "lv_LV CP775"
echo "nb CP865" # not CP850 ??
echo "nb_NO CP865" # not CP850 ??
echo "nl CP850"
echo "nl_BE CP850"
echo "nl_NL CP850"
echo "nn CP865" # not CP850 ??
echo "nn_NO CP865" # not CP850 ??
echo "no CP865" # not CP850 ??
echo "no_NO CP865" # not CP850 ??
echo "pt CP850"
echo "pt_BR CP850"
echo "pt_PT CP850"
echo "sv CP850"
echo "sv_SE CP850"
# ISO-8859-2 languages
echo "cs CP852"
echo "cs_CZ CP852"
echo "hr CP852"
echo "hr_HR CP852"
echo "hu CP852"
echo "hu_HU CP852"
echo "pl CP852"
echo "pl_PL CP852"
echo "ro CP852"
echo "ro_RO CP852"
echo "sk CP852"
echo "sk_SK CP852"
echo "sl CP852"
echo "sl_SI CP852"
echo "sq CP852"
echo "sq_AL CP852"
echo "sr CP852" # CP852 or CP866 or CP855 ??
echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
# ISO-8859-3 languages
echo "mt CP850"
echo "mt_MT CP850"
# ISO-8859-5 languages
echo "be CP866"
echo "be_BE CP866"
echo "bg CP866" # not CP855 ??
echo "bg_BG CP866" # not CP855 ??
echo "mk CP866" # not CP855 ??
echo "mk_MK CP866" # not CP855 ??
echo "ru KOI8-R" # not CP866 ??
echo "ru_RU KOI8-R" # not CP866 ??
# ISO-8859-6 languages
echo "ar CP864"
echo "ar_AE CP864"
echo "ar_DZ CP864"
echo "ar_EG CP864"
echo "ar_IQ CP864"
echo "ar_IR CP864"
echo "ar_JO CP864"
echo "ar_KW CP864"
echo "ar_MA CP864"
echo "ar_OM CP864"
echo "ar_QA CP864"
echo "ar_SA CP864"
echo "ar_SY CP864"
# ISO-8859-7 languages
echo "el CP869"
echo "el_GR CP869"
# ISO-8859-8 languages
echo "he CP862"
echo "he_IL CP862"
# ISO-8859-9 languages
echo "tr CP857"
echo "tr_TR CP857"
# Japanese
echo "ja CP932"
echo "ja_JP CP932"
# Chinese
echo "zh_CN GBK"
echo "zh_TW CP950" # not CP938 ??
# Korean
echo "kr CP949" # not CP934 ??
echo "kr_KR CP949" # not CP934 ??
# Thai
echo "th CP874"
echo "th_TH CP874"
# Other
echo "eo CP850"
echo "eo_EO CP850"
;;
esac
-58
View File
@@ -1,58 +0,0 @@
/* Implementation of the dcgettext(3) function.
Copyright (C) 1995-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 Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library 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. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "gettextP.h"
#ifdef _LIBC
# include <libintl.h>
#else
# include "libgnuintl.h"
#endif
/* @@ end of prolog @@ */
/* Names for the libintl functions are a problem. They must not clash
with existing names and they should follow ANSI C. But this source
code is also used in GNU C Library where the names have a __
prefix. So we have to make a difference here. */
#ifdef _LIBC
# define DCGETTEXT __dcgettext
# define DCIGETTEXT __dcigettext
#else
# define DCGETTEXT dcgettext__
# define DCIGETTEXT dcigettext__
#endif
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
locale. */
char *
DCGETTEXT (domainname, msgid, category)
const char *domainname;
const char *msgid;
int category;
{
return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
}
#ifdef _LIBC
/* Alias for function name in GNU C Library. */
weak_alias (__dcgettext, dcgettext);
#endif
-1259
View File
File diff suppressed because it is too large Load Diff
-60
View File
@@ -1,60 +0,0 @@
/* Implementation of the dcngettext(3) function.
Copyright (C) 1995-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 Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library 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. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "gettextP.h"
#ifdef _LIBC
# include <libintl.h>
#else
# include "libgnuintl.h"
#endif
/* @@ end of prolog @@ */
/* Names for the libintl functions are a problem. They must not clash
with existing names and they should follow ANSI C. But this source
code is also used in GNU C Library where the names have a __
prefix. So we have to make a difference here. */
#ifdef _LIBC
# define DCNGETTEXT __dcngettext
# define DCIGETTEXT __dcigettext
#else
# define DCNGETTEXT dcngettext__
# define DCIGETTEXT dcigettext__
#endif
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
locale. */
char *
DCNGETTEXT (domainname, msgid1, msgid2, n, category)
const char *domainname;
const char *msgid1;
const char *msgid2;
unsigned long int n;
int category;
{
return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category);
}
#ifdef _LIBC
/* Alias for function name in GNU C Library. */
weak_alias (__dcngettext, dcngettext);
#endif
-59
View File
@@ -1,59 +0,0 @@
/* Implementation of the dgettext(3) function.
Copyright (C) 1995-1997, 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 Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library 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. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <locale.h>
#include "gettextP.h"
#ifdef _LIBC
# include <libintl.h>
#else
# include "libgnuintl.h"
#endif
/* @@ end of prolog @@ */
/* Names for the libintl functions are a problem. They must not clash
with existing names and they should follow ANSI C. But this source
code is also used in GNU C Library where the names have a __
prefix. So we have to make a difference here. */
#ifdef _LIBC
# define DGETTEXT __dgettext
# define DCGETTEXT __dcgettext
#else
# define DGETTEXT dgettext__
# define DCGETTEXT dcgettext__
#endif
/* Look up MSGID in the DOMAINNAME message catalog of the current
LC_MESSAGES locale. */
char *
DGETTEXT (domainname, msgid)
const char *domainname;
const char *msgid;
{
return DCGETTEXT (domainname, msgid, LC_MESSAGES);
}
#ifdef _LIBC
/* Alias for function name in GNU C Library. */
weak_alias (__dgettext, dgettext);
#endif
-61
View File
@@ -1,61 +0,0 @@
/* Implementation of the dngettext(3) function.
Copyright (C) 1995-1997, 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 Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library 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. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <locale.h>
#include "gettextP.h"
#ifdef _LIBC
# include <libintl.h>
#else
# include "libgnuintl.h"
#endif
/* @@ end of prolog @@ */
/* Names for the libintl functions are a problem. They must not clash
with existing names and they should follow ANSI C. But this source
code is also used in GNU C Library where the names have a __
prefix. So we have to make a difference here. */
#ifdef _LIBC
# define DNGETTEXT __dngettext
# define DCNGETTEXT __dcngettext
#else
# define DNGETTEXT dngettext__
# define DCNGETTEXT dcngettext__
#endif
/* Look up MSGID in the DOMAINNAME message catalog of the current
LC_MESSAGES locale and skip message according to the plural form. */
char *
DNGETTEXT (domainname, msgid1, msgid2, n)
const char *domainname;
const char *msgid1;
const char *msgid2;
unsigned long int n;
{
return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES);
}
#ifdef _LIBC
/* Alias for function name in GNU C Library. */
weak_alias (__dngettext, dngettext);
#endif
-192
View File
@@ -1,192 +0,0 @@
/* Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <[email protected]>, 1995.
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, 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; 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>
#include <string.h>
#include <sys/types.h>
#include "loadinfo.h"
/* On some strange systems still no definition of NULL is found. Sigh! */
#ifndef NULL
# if defined __STDC__ && __STDC__
# define NULL ((void *) 0)
# else
# define NULL 0
# endif
#endif
/* @@ end of prolog @@ */
char *
_nl_find_language (name)
const char *name;
{
while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
&& name[0] != '+' && name[0] != ',')
++name;
return (char *) name;
}
int
_nl_explode_name (name, language, modifier, territory, codeset,
normalized_codeset, special, sponsor, revision)
char *name;
const char **language;
const char **modifier;
const char **territory;
const char **codeset;
const char **normalized_codeset;
const char **special;
const char **sponsor;
const char **revision;
{
enum { undecided, xpg, cen } syntax;
char *cp;
int mask;
*modifier = NULL;
*territory = NULL;
*codeset = NULL;
*normalized_codeset = NULL;
*special = NULL;
*sponsor = NULL;
*revision = NULL;
/* Now we determine the single parts of the locale name. First
look for the language. Termination symbols are `_' and `@' if
we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
mask = 0;
syntax = undecided;
*language = cp = name;
cp = _nl_find_language (*language);
if (*language == cp)
/* This does not make sense: language has to be specified. Use
this entry as it is without exploding. Perhaps it is an alias. */
cp = strchr (*language, '\0');
else if (cp[0] == '_')
{
/* Next is the territory. */
cp[0] = '\0';
*territory = ++cp;
while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@'
&& cp[0] != '+' && cp[0] != ',' && cp[0] != '_')
++cp;
mask |= TERRITORY;
if (cp[0] == '.')
{
/* Next is the codeset. */
syntax = xpg;
cp[0] = '\0';
*codeset = ++cp;
while (cp[0] != '\0' && cp[0] != '@')
++cp;
mask |= XPG_CODESET;
if (*codeset != cp && (*codeset)[0] != '\0')
{
*normalized_codeset = _nl_normalize_codeset (*codeset,
cp - *codeset);
if (strcmp (*codeset, *normalized_codeset) == 0)
free ((char *) *normalized_codeset);
else
mask |= XPG_NORM_CODESET;
}
}
}
if (cp[0] == '@' || (syntax != xpg && cp[0] == '+'))
{
/* Next is the modifier. */
syntax = cp[0] == '@' ? xpg : cen;
cp[0] = '\0';
*modifier = ++cp;
while (syntax == cen && cp[0] != '\0' && cp[0] != '+'
&& cp[0] != ',' && cp[0] != '_')
++cp;
mask |= XPG_MODIFIER | CEN_AUDIENCE;
}
if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_'))
{
syntax = cen;
if (cp[0] == '+')
{
/* Next is special application (CEN syntax). */
cp[0] = '\0';
*special = ++cp;
while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_')
++cp;
mask |= CEN_SPECIAL;
}
if (cp[0] == ',')
{
/* Next is sponsor (CEN syntax). */
cp[0] = '\0';
*sponsor = ++cp;
while (cp[0] != '\0' && cp[0] != '_')
++cp;
mask |= CEN_SPONSOR;
}
if (cp[0] == '_')
{
/* Next is revision (CEN syntax). */
cp[0] = '\0';
*revision = ++cp;
mask |= CEN_REVISION;
}
}
/* For CEN syntax values it might be important to have the
separator character in the file name, not for XPG syntax. */
if (syntax == xpg)
{
if (*territory != NULL && (*territory)[0] == '\0')
mask &= ~TERRITORY;
if (*codeset != NULL && (*codeset)[0] == '\0')
mask &= ~XPG_CODESET;
if (*modifier != NULL && (*modifier)[0] == '\0')
mask &= ~XPG_MODIFIER;
}
return mask;
}
-198
View File
@@ -1,198 +0,0 @@
/* Handle list of needed message catalogs
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
Written by Ulrich Drepper <[email protected]>, 1995.
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, 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; 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 <stdio.h>
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
#if defined HAVE_UNISTD_H || defined _LIBC
# include <unistd.h>
#endif
#include "gettextP.h"
#ifdef _LIBC
# include <libintl.h>
#else
# include "libgnuintl.h"
#endif
/* @@ end of prolog @@ */
/* List of already loaded domains. */
static struct loaded_l10nfile *_nl_loaded_domains;
/* Return a data structure describing the message catalog described by
the DOMAINNAME and CATEGORY parameters with respect to the currently
established bindings. */
struct loaded_l10nfile *
internal_function
_nl_find_domain (dirname, locale, domainname, domainbinding)
const char *dirname;
char *locale;
const char *domainname;
struct binding *domainbinding;
{
struct loaded_l10nfile *retval;
const char *language;
const char *modifier;
const char *territory;
const char *codeset;
const char *normalized_codeset;
const char *special;
const char *sponsor;
const char *revision;
const char *alias_value;
int mask;
/* LOCALE can consist of up to four recognized parts for the XPG syntax:
language[_territory[.codeset]][@modifier]
and six parts for the CEN syntax:
language[_territory][+audience][+special][,[sponsor][_revision]]
Beside the first part all of them are allowed to be missing. If
the full specified locale is not found, the less specific one are
looked for. The various parts will be stripped off according to
the following order:
(1) revision
(2) sponsor
(3) special
(4) codeset
(5) normalized codeset
(6) territory
(7) audience/modifier
*/
/* If we have already tested for this locale entry there has to
be one data set in the list of loaded domains. */
retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
strlen (dirname) + 1, 0, locale, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, domainname, 0);
if (retval != NULL)
{
/* We know something about this locale. */
int cnt;
if (retval->decided == 0)
_nl_load_domain (retval, domainbinding);
if (retval->data != NULL)
return retval;
for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
{
if (retval->successor[cnt]->decided == 0)
_nl_load_domain (retval->successor[cnt], domainbinding);
if (retval->successor[cnt]->data != NULL)
break;
}
return cnt >= 0 ? retval : NULL;
/* NOTREACHED */
}
/* See whether the locale value is an alias. If yes its value
*overwrites* the alias name. No test for the original value is
done. */
alias_value = _nl_expand_alias (locale);
if (alias_value != NULL)
{
#if defined _LIBC || defined HAVE_STRDUP
locale = strdup (alias_value);
if (locale == NULL)
return NULL;
#else
size_t len = strlen (alias_value) + 1;
locale = (char *) malloc (len);
if (locale == NULL)
return NULL;
memcpy (locale, alias_value, len);
#endif
}
/* Now we determine the single parts of the locale name. First
look for the language. Termination symbols are `_' and `@' if
we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
mask = _nl_explode_name (locale, &language, &modifier, &territory,
&codeset, &normalized_codeset, &special,
&sponsor, &revision);
/* Create all possible locale entries which might be interested in
generalization. */
retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
strlen (dirname) + 1, mask, language, territory,
codeset, normalized_codeset, modifier, special,
sponsor, revision, domainname, 1);
if (retval == NULL)
/* This means we are out of core. */
return NULL;
if (retval->decided == 0)
_nl_load_domain (retval, domainbinding);
if (retval->data == NULL)
{
int cnt;
for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
{
if (retval->successor[cnt]->decided == 0)
_nl_load_domain (retval->successor[cnt], domainbinding);
if (retval->successor[cnt]->data != NULL)
break;
}
}
/* The room for an alias was dynamically allocated. Free it now. */
if (alias_value != NULL)
free (locale);
/* The space for normalized_codeset is dynamically allocated. Free it. */
if (mask & XPG_NORM_CODESET)
free ((void *) normalized_codeset);
return retval;
}
#ifdef _LIBC
static void __attribute__ ((unused))
free_mem (void)
{
struct loaded_l10nfile *runp = _nl_loaded_domains;
while (runp != NULL)
{
struct loaded_l10nfile *here = runp;
if (runp->data != NULL)
_nl_unload_domain ((struct loaded_domain *) runp->data);
runp = runp->next;
free ((char *) here->filename);
free (here);
}
}
text_set_element (__libc_subfreeres, free_mem);
#endif
-64
View File
@@ -1,64 +0,0 @@
/* Implementation of gettext(3) function.
Copyright (C) 1995, 1997, 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 Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library 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. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifdef _LIBC
# define __need_NULL
# include <stddef.h>
#else
# include <stdlib.h> /* Just for NULL. */
#endif
#include "gettextP.h"
#ifdef _LIBC
# include <libintl.h>
#else
# include "libgnuintl.h"
#endif
/* @@ end of prolog @@ */
/* Names for the libintl functions are a problem. They must not clash
with existing names and they should follow ANSI C. But this source
code is also used in GNU C Library where the names have a __
prefix. So we have to make a difference here. */
#ifdef _LIBC
# define GETTEXT __gettext
# define DCGETTEXT __dcgettext
#else
# define GETTEXT gettext__
# define DCGETTEXT dcgettext__
#endif
/* Look up MSGID in the current default message catalog for the current
LC_MESSAGES locale. If not found, returns MSGID itself (the default
text). */
char *
GETTEXT (msgid)
const char *msgid;
{
return DCGETTEXT (NULL, msgid, LC_MESSAGES);
}
#ifdef _LIBC
/* Alias for function name in GNU C Library. */
weak_alias (__gettext, gettext);
#endif
-102
View File
@@ -1,102 +0,0 @@
/* Description of GNU message catalog format: general file layout.
Copyright (C) 1995, 1997, 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 Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library 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 _GETTEXT_H
#define _GETTEXT_H 1
#if HAVE_LIMITS_H || _LIBC
# include <limits.h>
#endif
/* @@ end of prolog @@ */
/* The magic number of the GNU message catalog format. */
#define _MAGIC 0x950412de
#define _MAGIC_SWAPPED 0xde120495
/* Revision number of the currently used .mo (binary) file format. */
#define MO_REVISION_NUMBER 0
/* The following contortions are an attempt to use the C preprocessor
to determine an unsigned integral type that is 32 bits wide. An
alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
when cross-compiling. */
#if __STDC__
# define UINT_MAX_32_BITS 4294967295U
#else
# define UINT_MAX_32_BITS 0xFFFFFFFF
#endif
/* If UINT_MAX isn't defined, assume it's a 32-bit type.
This should be valid for all systems GNU cares about because
that doesn't include 16-bit systems, and only modern systems
(that certainly have <limits.h>) have 64+-bit integral types. */
#ifndef UINT_MAX
# define UINT_MAX UINT_MAX_32_BITS
#endif
#if UINT_MAX == UINT_MAX_32_BITS
typedef unsigned nls_uint32;
#else
# if USHRT_MAX == UINT_MAX_32_BITS
typedef unsigned short nls_uint32;
# else
# if ULONG_MAX == UINT_MAX_32_BITS
typedef unsigned long nls_uint32;
# else
/* The following line is intended to throw an error. Using #error is
not portable enough. */
"Cannot determine unsigned 32-bit data type."
# endif
# endif
#endif
/* Header for binary .mo file format. */
struct mo_file_header
{
/* The magic number. */
nls_uint32 magic;
/* The revision number of the file format. */
nls_uint32 revision;
/* The number of strings pairs. */
nls_uint32 nstrings;
/* Offset of table with start offsets of original strings. */
nls_uint32 orig_tab_offset;
/* Offset of table with start offsets of translation strings. */
nls_uint32 trans_tab_offset;
/* Size of hashing table. */
nls_uint32 hash_tab_size;
/* Offset of first hashing entry. */
nls_uint32 hash_tab_offset;
};
struct string_desc
{
/* Length of addressed string. */
nls_uint32 length;
/* Offset of string in file. */
nls_uint32 offset;
};
/* @@ begin of epilog @@ */
#endif /* gettext.h */
-252
View File
@@ -1,252 +0,0 @@
/* Header describing internals of libintl library.
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
Written by Ulrich Drepper <[email protected]>, 1995.
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, 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; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */
#ifndef _GETTEXTP_H
#define _GETTEXTP_H
#include <stddef.h> /* Get size_t. */
#ifdef _LIBC
# include "../iconv/gconv_int.h"
#else
# if HAVE_ICONV
# include <iconv.h>
# endif
#endif
#include "loadinfo.h"
#include "gettext.h" /* Get nls_uint32. */
/* @@ end of prolog @@ */
#ifndef PARAMS
# if __STDC__
# define PARAMS(args) args
# else
# define PARAMS(args) ()
# endif
#endif
#ifndef internal_function
# define internal_function
#endif
/* Tell the compiler when a conditional or integer expression is
almost always true or almost always false. */
#ifndef HAVE_BUILTIN_EXPECT
# define __builtin_expect(expr, val) (expr)
#endif
#ifndef W
# define W(flag, data) ((flag) ? SWAP (data) : (data))
#endif
#ifdef _LIBC
# include <byteswap.h>
# define SWAP(i) bswap_32 (i)
#else
static inline nls_uint32
SWAP (i)
nls_uint32 i;
{
return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
}
#endif
/* This is the representation of the expressions to determine the
plural form. */
struct expression
{
int nargs; /* Number of arguments. */
enum operator
{
/* Without arguments: */
var, /* The variable "n". */
num, /* Decimal number. */
/* Unary operators: */
lnot, /* Logical NOT. */
/* Binary operators: */
mult, /* Multiplication. */
divide, /* Division. */
module, /* Module operation. */
plus, /* Addition. */
minus, /* Subtraction. */
less_than, /* Comparison. */
greater_than, /* Comparison. */
less_or_equal, /* Comparison. */
greater_or_equal, /* Comparison. */
equal, /* Comparision for equality. */
not_equal, /* Comparision for inequality. */
land, /* Logical AND. */
lor, /* Logical OR. */
/* Ternary operators: */
qmop /* Question mark operator. */
} operation;
union
{
unsigned long int num; /* Number value for `num'. */
struct expression *args[3]; /* Up to three arguments. */
} val;
};
/* This is the data structure to pass information to the parser and get
the result in a thread-safe way. */
struct parse_args
{
const char *cp;
struct expression *res;
};
/* The representation of an opened message catalog. */
struct loaded_domain
{
const char *data;
int use_mmap;
size_t mmap_size;
int must_swap;
nls_uint32 nstrings;
struct string_desc *orig_tab;
struct string_desc *trans_tab;
nls_uint32 hash_size;
nls_uint32 *hash_tab;
int codeset_cntr;
#ifdef _LIBC
__gconv_t conv;
#else
# if HAVE_ICONV
iconv_t conv;
# endif
#endif
char **conv_tab;
struct expression *plural;
unsigned long int nplurals;
};
/* We want to allocate a string at the end of the struct. But ISO C
doesn't allow zero sized arrays. */
#ifdef __GNUC__
# define ZERO 0
#else
# define ZERO 1
#endif
/* A set of settings bound to a message domain. Used to store settings
from bindtextdomain() and bind_textdomain_codeset(). */
struct binding
{
struct binding *next;
char *dirname;
int codeset_cntr; /* Incremented each time codeset changes. */
char *codeset;
char domainname[ZERO];
};
/* A counter which is incremented each time some previous translations
become invalid.
This variable is part of the external ABI of the GNU libintl. */
extern int _nl_msg_cat_cntr;
struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
char *__locale,
const char *__domainname,
struct binding *__domainbinding))
internal_function;
void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain,
struct binding *__domainbinding))
internal_function;
void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
internal_function;
const char *_nl_init_domain_conv PARAMS ((struct loaded_l10nfile *__domain_file,
struct loaded_domain *__domain,
struct binding *__domainbinding))
internal_function;
void _nl_free_domain_conv PARAMS ((struct loaded_domain *__domain))
internal_function;
char *_nl_find_msg PARAMS ((struct loaded_l10nfile *domain_file,
struct binding *domainbinding,
const char *msgid, size_t *lengthp))
internal_function;
#ifdef _LIBC
extern char *__gettext PARAMS ((const char *__msgid));
extern char *__dgettext PARAMS ((const char *__domainname,
const char *__msgid));
extern char *__dcgettext PARAMS ((const char *__domainname,
const char *__msgid, int __category));
extern char *__ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
unsigned long int __n));
extern char *__dngettext PARAMS ((const char *__domainname,
const char *__msgid1, const char *__msgid2,
unsigned long int n));
extern char *__dcngettext PARAMS ((const char *__domainname,
const char *__msgid1, const char *__msgid2,
unsigned long int __n, int __category));
extern char *__dcigettext PARAMS ((const char *__domainname,
const char *__msgid1, const char *__msgid2,
int __plural, unsigned long int __n,
int __category));
extern char *__textdomain PARAMS ((const char *__domainname));
extern char *__bindtextdomain PARAMS ((const char *__domainname,
const char *__dirname));
extern char *__bind_textdomain_codeset PARAMS ((const char *__domainname,
const char *__codeset));
#else
extern char *gettext__ PARAMS ((const char *__msgid));
extern char *dgettext__ PARAMS ((const char *__domainname,
const char *__msgid));
extern char *dcgettext__ PARAMS ((const char *__domainname,
const char *__msgid, int __category));
extern char *ngettext__ PARAMS ((const char *__msgid1, const char *__msgid2,
unsigned long int __n));
extern char *dngettext__ PARAMS ((const char *__domainname,
const char *__msgid1, const char *__msgid2,
unsigned long int __n));
extern char *dcngettext__ PARAMS ((const char *__domainname,
const char *__msgid1, const char *__msgid2,
unsigned long int __n, int __category));
extern char *dcigettext__ PARAMS ((const char *__domainname,
const char *__msgid1, const char *__msgid2,
int __plural, unsigned long int __n,
int __category));
extern char *textdomain__ PARAMS ((const char *__domainname));
extern char *bindtextdomain__ PARAMS ((const char *__domainname,
const char *__dirname));
extern char *bind_textdomain_codeset__ PARAMS ((const char *__domainname,
const char *__codeset));
#endif
#ifdef _LIBC
extern void __gettext_free_exp PARAMS ((struct expression *exp))
internal_function;
extern int __gettextparse PARAMS ((void *arg));
#else
extern void gettext_free_exp__ PARAMS ((struct expression *exp))
internal_function;
extern int gettextparse__ PARAMS ((void *arg));
#endif
/* @@ begin of epilog @@ */
#endif /* gettextP.h */
-59
View File
@@ -1,59 +0,0 @@
/* Description of GNU message catalog format: string hashing function.
Copyright (C) 1995, 1997, 1998, 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 Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library 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. */
/* @@ end of prolog @@ */
#ifndef PARAMS
# if __STDC__
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
#endif
/* We assume to have `unsigned long int' value with at least 32 bits. */
#define HASHWORDBITS 32
/* Defines the so called `hashpjw' function by P.J. Weinberger
[see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
1986, 1987 Bell Telephone Laboratories, Inc.] */
static unsigned long int hash_string PARAMS ((const char *__str_param));
static inline unsigned long int
hash_string (str_param)
const char *str_param;
{
unsigned long int hval, g;
const char *str = str_param;
/* Compute the hash value for the given string. */
hval = 0;
while (*str != '\0')
{
hval <<= 4;
hval += (unsigned long int) *str++;
g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
if (g != 0)
{
hval ^= g >> (HASHWORDBITS - 8);
hval ^= g;
}
}
return hval;
}
-166
View File
@@ -1,166 +0,0 @@
/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
Library.
Copyright (C) 1995, 2000, 2001 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, 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; 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 "libgnuintl.h"
#include "gettextP.h"
/* @@ end of prolog @@ */
/* This file redirects the gettext functions (without prefix or suffix) to
those defined in the included GNU gettext library (with "__" suffix).
It is compiled into libintl when the included GNU gettext library is
configured --with-included-gettext.
This redirection works also in the case that the system C library or
the system libintl library contain gettext/textdomain/... functions.
If it didn't, we would need to add preprocessor level redirections to
libgnuintl.h of the following form:
# define gettext gettext__
# define dgettext dgettext__
# define dcgettext dcgettext__
# define ngettext ngettext__
# define dngettext dngettext__
# define dcngettext dcngettext__
# define textdomain textdomain__
# define bindtextdomain bindtextdomain__
# define bind_textdomain_codeset bind_textdomain_codeset__
How does this redirection work? There are two cases.
A. When libintl.a is linked into an executable, it works because
functions defined in the executable always override functions in
the shared libraries.
B. When libintl.so is used, it works because
1. those systems defining gettext/textdomain/... in the C library
(namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer) are
ELF systems and define these symbols as weak, thus explicitly
letting other shared libraries override it.
2. those systems defining gettext/textdomain/... in a standalone
libintl.so library (namely, Solaris 2.3 and newer) have this
shared library in /usr/lib, and the linker will search /usr/lib
*after* the directory where the GNU gettext library is installed.
A third case, namely when libintl.a is linked into a shared library
whose name is not libintl.so, is not supported. In this case, on
Solaris, when -lintl precedes the linker option for the shared library
containing GNU gettext, the system's gettext would indeed override
the GNU gettext. Anyone doing this kind of stuff must be clever enough
to 1. compile libintl.a with -fPIC, 2. remove -lintl from his linker
command line. */
#undef gettext
#undef dgettext
#undef dcgettext
#undef ngettext
#undef dngettext
#undef dcngettext
#undef textdomain
#undef bindtextdomain
#undef bind_textdomain_codeset
char *
gettext (msgid)
const char *msgid;
{
return gettext__ (msgid);
}
char *
dgettext (domainname, msgid)
const char *domainname;
const char *msgid;
{
return dgettext__ (domainname, msgid);
}
char *
dcgettext (domainname, msgid, category)
const char *domainname;
const char *msgid;
int category;
{
return dcgettext__ (domainname, msgid, category);
}
char *
ngettext (msgid1, msgid2, n)
const char *msgid1;
const char *msgid2;
unsigned long int n;
{
return ngettext__ (msgid1, msgid2, n);
}
char *
dngettext (domainname, msgid1, msgid2, n)
const char *domainname;
const char *msgid1;
const char *msgid2;
unsigned long int n;
{
return dngettext__ (domainname, msgid1, msgid2, n);
}
char *
dcngettext (domainname, msgid1, msgid2, n, category)
const char *domainname;
const char *msgid1;
const char *msgid2;
unsigned long int n;
int category;
{
return dcngettext__ (domainname, msgid1, msgid2, n, category);
}
char *
textdomain (domainname)
const char *domainname;
{
return textdomain__ (domainname);
}
char *
bindtextdomain (domainname, dirname)
const char *domainname;
const char *dirname;
{
return bindtextdomain__ (domainname, dirname);
}
char *
bind_textdomain_codeset (domainname, codeset)
const char *domainname;
const char *codeset;
{
return bind_textdomain_codeset__ (domainname, codeset);
}
-405
View File
@@ -1,405 +0,0 @@
/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <[email protected]>, 1995.
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, 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; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */
/* Tell glibc's <string.h> to provide a prototype for stpcpy().
This must come before <config.h> because <config.h> may include
<features.h>, and once <features.h> has been included, it's too late. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <string.h>
#if !HAVE_STRCHR && !defined _LIBC
# ifndef strchr
# define strchr index
# endif
#endif
#if defined _LIBC || defined HAVE_ARGZ_H
# include <argz.h>
#endif
#include <ctype.h>
#include <sys/types.h>
#include <stdlib.h>
#include "loadinfo.h"
/* On some strange systems still no definition of NULL is found. Sigh! */
#ifndef NULL
# if defined __STDC__ && __STDC__
# define NULL ((void *) 0)
# else
# define NULL 0
# endif
#endif
/* @@ end of prolog @@ */
#ifdef _LIBC
/* Rename the non ANSI C functions. This is required by the standard
because some ANSI C functions will require linking with this object
file and the name space must not be polluted. */
# ifndef stpcpy
# define stpcpy(dest, src) __stpcpy(dest, src)
# endif
#else
# ifndef HAVE_STPCPY
static char *stpcpy PARAMS ((char *dest, const char *src));
# endif
#endif
/* Define function which are usually not available. */
#if !defined _LIBC && !defined HAVE___ARGZ_COUNT
/* Returns the number of strings in ARGZ. */
static size_t argz_count__ PARAMS ((const char *argz, size_t len));
static size_t
argz_count__ (argz, len)
const char *argz;
size_t len;
{
size_t count = 0;
while (len > 0)
{
size_t part_len = strlen (argz);
argz += part_len + 1;
len -= part_len + 1;
count++;
}
return count;
}
# undef __argz_count
# define __argz_count(argz, len) argz_count__ (argz, len)
#endif /* !_LIBC && !HAVE___ARGZ_COUNT */
#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
except the last into the character SEP. */
static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
static void
argz_stringify__ (argz, len, sep)
char *argz;
size_t len;
int sep;
{
while (len > 0)
{
size_t part_len = strlen (argz);
argz += part_len;
len -= part_len + 1;
if (len > 0)
*argz++ = sep;
}
}
# undef __argz_stringify
# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
#if !defined _LIBC && !defined HAVE___ARGZ_NEXT
static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
const char *entry));
static char *
argz_next__ (argz, argz_len, entry)
char *argz;
size_t argz_len;
const char *entry;
{
if (entry)
{
if (entry < argz + argz_len)
entry = strchr (entry, '\0') + 1;
return entry >= argz + argz_len ? NULL : (char *) entry;
}
else
if (argz_len > 0)
return argz;
else
return 0;
}
# undef __argz_next
# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry)
#endif /* !_LIBC && !HAVE___ARGZ_NEXT */
/* Return number of bits set in X. */
static int pop PARAMS ((int x));
static inline int
pop (x)
int x;
{
/* We assume that no more than 16 bits are used. */
x = ((x & ~0x5555) >> 1) + (x & 0x5555);
x = ((x & ~0x3333) >> 2) + (x & 0x3333);
x = ((x >> 4) + x) & 0x0f0f;
x = ((x >> 8) + x) & 0xff;
return x;
}
struct loaded_l10nfile *
_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
territory, codeset, normalized_codeset, modifier, special,
sponsor, revision, filename, do_allocate)
struct loaded_l10nfile **l10nfile_list;
const char *dirlist;
size_t dirlist_len;
int mask;
const char *language;
const char *territory;
const char *codeset;
const char *normalized_codeset;
const char *modifier;
const char *special;
const char *sponsor;
const char *revision;
const char *filename;
int do_allocate;
{
char *abs_filename;
struct loaded_l10nfile *last = NULL;
struct loaded_l10nfile *retval;
char *cp;
size_t entries;
int cnt;
/* Allocate room for the full file name. */
abs_filename = (char *) malloc (dirlist_len
+ strlen (language)
+ ((mask & TERRITORY) != 0
? strlen (territory) + 1 : 0)
+ ((mask & XPG_CODESET) != 0
? strlen (codeset) + 1 : 0)
+ ((mask & XPG_NORM_CODESET) != 0
? strlen (normalized_codeset) + 1 : 0)
+ (((mask & XPG_MODIFIER) != 0
|| (mask & CEN_AUDIENCE) != 0)
? strlen (modifier) + 1 : 0)
+ ((mask & CEN_SPECIAL) != 0
? strlen (special) + 1 : 0)
+ (((mask & CEN_SPONSOR) != 0
|| (mask & CEN_REVISION) != 0)
? (1 + ((mask & CEN_SPONSOR) != 0
? strlen (sponsor) + 1 : 0)
+ ((mask & CEN_REVISION) != 0
? strlen (revision) + 1 : 0)) : 0)
+ 1 + strlen (filename) + 1);
if (abs_filename == NULL)
return NULL;
retval = NULL;
last = NULL;
/* Construct file name. */
memcpy (abs_filename, dirlist, dirlist_len);
__argz_stringify (abs_filename, dirlist_len, PATH_SEPARATOR);
cp = abs_filename + (dirlist_len - 1);
*cp++ = '/';
cp = stpcpy (cp, language);
if ((mask & TERRITORY) != 0)
{
*cp++ = '_';
cp = stpcpy (cp, territory);
}
if ((mask & XPG_CODESET) != 0)
{
*cp++ = '.';
cp = stpcpy (cp, codeset);
}
if ((mask & XPG_NORM_CODESET) != 0)
{
*cp++ = '.';
cp = stpcpy (cp, normalized_codeset);
}
if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
{
/* This component can be part of both syntaces but has different
leading characters. For CEN we use `+', else `@'. */
*cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@';
cp = stpcpy (cp, modifier);
}
if ((mask & CEN_SPECIAL) != 0)
{
*cp++ = '+';
cp = stpcpy (cp, special);
}
if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0)
{
*cp++ = ',';
if ((mask & CEN_SPONSOR) != 0)
cp = stpcpy (cp, sponsor);
if ((mask & CEN_REVISION) != 0)
{
*cp++ = '_';
cp = stpcpy (cp, revision);
}
}
*cp++ = '/';
stpcpy (cp, filename);
/* Look in list of already loaded domains whether it is already
available. */
last = NULL;
for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
if (retval->filename != NULL)
{
int compare = strcmp (retval->filename, abs_filename);
if (compare == 0)
/* We found it! */
break;
if (compare < 0)
{
/* It's not in the list. */
retval = NULL;
break;
}
last = retval;
}
if (retval != NULL || do_allocate == 0)
{
free (abs_filename);
return retval;
}
retval = (struct loaded_l10nfile *)
malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len)
* (1 << pop (mask))
* sizeof (struct loaded_l10nfile *)));
if (retval == NULL)
return NULL;
retval->filename = abs_filename;
retval->decided = (__argz_count (dirlist, dirlist_len) != 1
|| ((mask & XPG_CODESET) != 0
&& (mask & XPG_NORM_CODESET) != 0));
retval->data = NULL;
if (last == NULL)
{
retval->next = *l10nfile_list;
*l10nfile_list = retval;
}
else
{
retval->next = last->next;
last->next = retval;
}
entries = 0;
/* If the DIRLIST is a real list the RETVAL entry corresponds not to
a real file. So we have to use the DIRLIST separation mechanism
of the inner loop. */
cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask;
for (; cnt >= 0; --cnt)
if ((cnt & ~mask) == 0
&& ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
&& ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
{
/* Iterate over all elements of the DIRLIST. */
char *dir = NULL;
while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
!= NULL)
retval->successor[entries++]
= _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt,
language, territory, codeset,
normalized_codeset, modifier, special,
sponsor, revision, filename, 1);
}
retval->successor[entries] = NULL;
return retval;
}
/* Normalize codeset name. There is no standard for the codeset
names. Normalization allows the user to use any of the common
names. The return value is dynamically allocated and has to be
freed by the caller. */
const char *
_nl_normalize_codeset (codeset, name_len)
const char *codeset;
size_t name_len;
{
int len = 0;
int only_digit = 1;
char *retval;
char *wp;
size_t cnt;
for (cnt = 0; cnt < name_len; ++cnt)
if (isalnum (codeset[cnt]))
{
++len;
if (isalpha (codeset[cnt]))
only_digit = 0;
}
retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1);
if (retval != NULL)
{
if (only_digit)
wp = stpcpy (retval, "iso");
else
wp = retval;
for (cnt = 0; cnt < name_len; ++cnt)
if (isalpha (codeset[cnt]))
*wp++ = tolower (codeset[cnt]);
else if (isdigit (codeset[cnt]))
*wp++ = codeset[cnt];
*wp = '\0';
}
return (const char *) retval;
}
/* @@ begin of epilog @@ */
/* We don't want libintl.a to depend on any other library. So we
avoid the non-standard function stpcpy. In GNU C Library this
function is available, though. Also allow the symbol HAVE_STPCPY
to be defined. */
#if !_LIBC && !HAVE_STPCPY
static char *
stpcpy (dest, src)
char *dest;
const char *src;
{
while ((*dest++ = *src++) != '\0')
/* Do nothing. */ ;
return dest - 1;
}
#endif
-49
View File
@@ -1,49 +0,0 @@
/* Convenience header for conditional use of GNU <libintl.h>.
Copyright (C) 1995-1998, 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 Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library 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 _LIBGETTEXT_H
#define _LIBGETTEXT_H 1
/* NLS can be disabled through the configure --disable-nls option. */
#if ENABLE_NLS
/* Get declarations of GNU message catalog functions. */
# include <libintl.h>
#else
# define gettext(Msgid) (Msgid)
# define dgettext(Domainname, Msgid) (Msgid)
# define dcgettext(Domainname, Msgid, Category) (Msgid)
# define ngettext(Msgid1, Msgid2, N) \
((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
# define dngettext(Domainname, Msgid1, Msgid2, N) \
((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
# define textdomain(Domainname) ((char *) (Domainname))
# define bindtextdomain(Domainname, Dirname) ((char *) (Dirname))
# define bind_textdomain_codeset(Domainname, Codeset) ((char *) (Codeset))
#endif
/* For automatical extraction of messages sometimes no real
translation is needed. Instead the string itself is the result. */
#define gettext_noop(Str) (Str)
#endif /* _LIBGETTEXT_H */
-128
View File
@@ -1,128 +0,0 @@
/* Message catalogs for internationalization.
Copyright (C) 1995-1997, 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 Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library 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 _LIBINTL_H
#define _LIBINTL_H 1
#include <locale.h>
/* The LC_MESSAGES locale category is the category used by the functions
gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
On systems that don't define it, use an arbitrary value instead.
On Solaris, <locale.h> defines __LOCALE_H then includes <libintl.h> (i.e.
this file!) and then only defines LC_MESSAGES. To avoid a redefinition
warning, don't define LC_MESSAGES in this case. */
#if !defined LC_MESSAGES && !defined __LOCALE_H
# define LC_MESSAGES 1729
#endif
/* We define an additional symbol to signal that we use the GNU
implementation of gettext. */
#define __USE_GNU_GETTEXT 1
/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
precedence over _conio_gettext. */
#ifdef __DJGPP__
# undef gettext
# define gettext gettext
#endif
#ifndef PARAMS
# if __STDC__ || defined __cplusplus
# define PARAMS(args) args
# else
# define PARAMS(args) ()
# endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Look up MSGID in the current default message catalog for the current
LC_MESSAGES locale. If not found, returns MSGID itself (the default
text). */
extern char *gettext PARAMS ((const char *__msgid));
/* Look up MSGID in the DOMAINNAME message catalog for the current
LC_MESSAGES locale. */
extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
locale. */
extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
int __category));
/* Similar to `gettext' but select the plural form corresponding to the
number N. */
extern char *ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
unsigned long int __n));
/* Similar to `dgettext' but select the plural form corresponding to the
number N. */
extern char *dngettext PARAMS ((const char *__domainname, const char *__msgid1,
const char *__msgid2, unsigned long int __n));
/* Similar to `dcgettext' but select the plural form corresponding to the
number N. */
extern char *dcngettext PARAMS ((const char *__domainname, const char *__msgid1,
const char *__msgid2, unsigned long int __n,
int __category));
/* Set the current default message catalog to DOMAINNAME.
If DOMAINNAME is null, return the current default.
If DOMAINNAME is "", reset to the default of "messages". */
extern char *textdomain PARAMS ((const char *__domainname));
/* Specify that the DOMAINNAME message catalog will be found
in DIRNAME rather than in the system locale data base. */
extern char *bindtextdomain PARAMS ((const char *__domainname,
const char *__dirname));
/* Specify the character encoding in which the messages from the
DOMAINNAME message catalog will be returned. */
extern char *bind_textdomain_codeset PARAMS ((const char *__domainname,
const char *__codeset));
/* Optimized version of the functions above. */
#if defined __OPTIMIZED
/* These are macros, but could also be inline functions. */
# define gettext(msgid) \
dgettext (NULL, msgid)
# define dgettext(domainname, msgid) \
dcgettext (domainname, msgid, LC_MESSAGES)
# define ngettext(msgid1, msgid2, n) \
dngettext (NULL, msgid1, msgid2, n)
# define dngettext(domainname, msgid1, msgid2, n) \
dcngettext (domainname, msgid1, msgid2, n, LC_MESSAGES)
#endif /* Optimizing. */
#ifdef __cplusplus
}
#endif
#endif /* libintl.h */
-109
View File
@@ -1,109 +0,0 @@
/* Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <[email protected]>, 1996.
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, 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; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */
#ifndef _LOADINFO_H
#define _LOADINFO_H 1
#ifndef PARAMS
# if __STDC__
# define PARAMS(args) args
# else
# define PARAMS(args) ()
# endif
#endif
#ifndef internal_function
# define internal_function
#endif
/* Tell the compiler when a conditional or integer expression is
almost always true or almost always false. */
#ifndef HAVE_BUILTIN_EXPECT
# define __builtin_expect(expr, val) (expr)
#endif
/* Separator in PATH like lists of pathnames. */
#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
/* Win32, OS/2, DOS */
# define PATH_SEPARATOR ';'
#else
/* Unix */
# define PATH_SEPARATOR ':'
#endif
/* Encoding of locale name parts. */
#define CEN_REVISION 1
#define CEN_SPONSOR 2
#define CEN_SPECIAL 4
#define XPG_NORM_CODESET 8
#define XPG_CODESET 16
#define TERRITORY 32
#define CEN_AUDIENCE 64
#define XPG_MODIFIER 128
#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
#define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
struct loaded_l10nfile
{
const char *filename;
int decided;
const void *data;
struct loaded_l10nfile *next;
struct loaded_l10nfile *successor[1];
};
/* Normalize codeset name. There is no standard for the codeset
names. Normalization allows the user to use any of the common
names. The return value is dynamically allocated and has to be
freed by the caller. */
extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
size_t name_len));
extern struct loaded_l10nfile *
_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
const char *dirlist, size_t dirlist_len, int mask,
const char *language, const char *territory,
const char *codeset,
const char *normalized_codeset,
const char *modifier, const char *special,
const char *sponsor, const char *revision,
const char *filename, int do_allocate));
extern const char *_nl_expand_alias PARAMS ((const char *name));
/* normalized_codeset is dynamically allocated and has to be freed by
the caller. */
extern int _nl_explode_name PARAMS ((char *name, const char **language,
const char **modifier,
const char **territory,
const char **codeset,
const char **normalized_codeset,
const char **special,
const char **sponsor,
const char **revision));
extern char *_nl_find_language PARAMS ((const char *name));
#endif /* loadinfo.h */
-567
View File
@@ -1,567 +0,0 @@
/* Load needed message catalogs.
Copyright (C) 1995-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 Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library 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. */
/* Tell glibc's <string.h> to provide a prototype for mempcpy().
This must come before <config.h> because <config.h> may include
<features.h>, and once <features.h> has been included, it's too late. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifdef __GNUC__
# define alloca __builtin_alloca
# define HAVE_ALLOCA 1
#else
# if defined HAVE_ALLOCA_H || defined _LIBC
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca
char *alloca ();
# endif
# endif
# endif
#endif
#include <stdlib.h>
#include <string.h>
#if defined HAVE_UNISTD_H || defined _LIBC
# include <unistd.h>
#endif
#ifdef _LIBC
# include <langinfo.h>
# include <locale.h>
#endif
#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
|| (defined _LIBC && defined _POSIX_MAPPED_FILES)
# include <sys/mman.h>
# undef HAVE_MMAP
# define HAVE_MMAP 1
#else
# undef HAVE_MMAP
#endif
#include "gettext.h"
#include "gettextP.h"
#ifdef _LIBC
# include "../locale/localeinfo.h"
#endif
/* @@ end of prolog @@ */
#ifdef _LIBC
/* Rename the non ISO C functions. This is required by the standard
because some ISO C functions will require linking with this object
file and the name space must not be polluted. */
# define open __open
# define close __close
# define read __read
# define mmap __mmap
# define munmap __munmap
#endif
/* Names for the libintl functions are a problem. They must not clash
with existing names and they should follow ANSI C. But this source
code is also used in GNU C Library where the names have a __
prefix. So we have to make a difference here. */
#ifdef _LIBC
# define PLURAL_PARSE __gettextparse
#else
# define PLURAL_PARSE gettextparse__
#endif
/* For those losing systems which don't have `alloca' we have to add
some additional code emulating it. */
#ifdef HAVE_ALLOCA
# define freea(p) /* nothing */
#else
# define alloca(n) malloc (n)
# define freea(p) free (p)
#endif
/* For systems that distinguish between text and binary I/O.
O_BINARY is usually declared in <fcntl.h>. */
#if !defined O_BINARY && defined _O_BINARY
/* For MSC-compatible compilers. */
# define O_BINARY _O_BINARY
# define O_TEXT _O_TEXT
#endif
#ifdef __BEOS__
/* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
# undef O_BINARY
# undef O_TEXT
#endif
/* On reasonable systems, binary I/O is the default. */
#ifndef O_BINARY
# define O_BINARY 0
#endif
/* We need a sign, whether a new catalog was loaded, which can be associated
with all translations. This is important if the translations are
cached by one of GCC's features. */
int _nl_msg_cat_cntr;
#if (defined __GNUC__ && !defined __APPLE_CC__) \
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
/* These structs are the constant expression for the germanic plural
form determination. It represents the expression "n != 1". */
static const struct expression plvar =
{
.nargs = 0,
.operation = var,
};
static const struct expression plone =
{
.nargs = 0,
.operation = num,
.val =
{
.num = 1
}
};
static struct expression germanic_plural =
{
.nargs = 2,
.operation = not_equal,
.val =
{
.args =
{
[0] = (struct expression *) &plvar,
[1] = (struct expression *) &plone
}
}
};
# define INIT_GERMANIC_PLURAL()
#else
/* For compilers without support for ISO C 99 struct/union initializers:
Initialization at run-time. */
static struct expression plvar;
static struct expression plone;
static struct expression germanic_plural;
static void
init_germanic_plural ()
{
if (plone.val.num == 0)
{
plvar.nargs = 0;
plvar.operation = var;
plone.nargs = 0;
plone.operation = num;
plone.val.num = 1;
germanic_plural.nargs = 2;
germanic_plural.operation = not_equal;
germanic_plural.val.args[0] = &plvar;
germanic_plural.val.args[1] = &plone;
}
}
# define INIT_GERMANIC_PLURAL() init_germanic_plural ()
#endif
/* Initialize the codeset dependent parts of an opened message catalog.
Return the header entry. */
const char *
internal_function
_nl_init_domain_conv (domain_file, domain, domainbinding)
struct loaded_l10nfile *domain_file;
struct loaded_domain *domain;
struct binding *domainbinding;
{
/* Find out about the character set the file is encoded with.
This can be found (in textual form) in the entry "". If this
entry does not exist or if this does not contain the `charset='
information, we will assume the charset matches the one the
current locale and we don't have to perform any conversion. */
char *nullentry;
size_t nullentrylen;
/* Preinitialize fields, to avoid recursion during _nl_find_msg. */
domain->codeset_cntr =
(domainbinding != NULL ? domainbinding->codeset_cntr : 0);
#ifdef _LIBC
domain->conv = (__gconv_t) -1;
#else
# if HAVE_ICONV
domain->conv = (iconv_t) -1;
# endif
#endif
domain->conv_tab = NULL;
/* Get the header entry. */
nullentry = _nl_find_msg (domain_file, domainbinding, "", &nullentrylen);
if (nullentry != NULL)
{
#if defined _LIBC || HAVE_ICONV
const char *charsetstr;
charsetstr = strstr (nullentry, "charset=");
if (charsetstr != NULL)
{
size_t len;
char *charset;
const char *outcharset;
charsetstr += strlen ("charset=");
len = strcspn (charsetstr, " \t\n");
charset = (char *) alloca (len + 1);
# if defined _LIBC || HAVE_MEMPCPY
*((char *) mempcpy (charset, charsetstr, len)) = '\0';
# else
memcpy (charset, charsetstr, len);
charset[len] = '\0';
# endif
/* The output charset should normally be determined by the
locale. But sometimes the locale is not used or not correctly
set up, so we provide a possibility for the user to override
this. Moreover, the value specified through
bind_textdomain_codeset overrides both. */
if (domainbinding != NULL && domainbinding->codeset != NULL)
outcharset = domainbinding->codeset;
else
{
outcharset = getenv ("OUTPUT_CHARSET");
if (outcharset == NULL || outcharset[0] == '\0')
{
# ifdef _LIBC
outcharset = (*_nl_current[LC_CTYPE])->values[_NL_ITEM_INDEX (CODESET)].string;
# else
# if HAVE_ICONV
extern const char *locale_charset (void);
outcharset = locale_charset ();
# endif
# endif
}
}
# ifdef _LIBC
/* We always want to use transliteration. */
outcharset = norm_add_slashes (outcharset, "TRANSLIT");
charset = norm_add_slashes (charset, NULL);
if (__gconv_open (outcharset, charset, &domain->conv,
GCONV_AVOID_NOCONV)
!= __GCONV_OK)
domain->conv = (__gconv_t) -1;
# else
# if HAVE_ICONV
/* When using GNU libiconv, we want to use transliteration. */
# if _LIBICONV_VERSION >= 0x0105
len = strlen (outcharset);
{
char *tmp = (char *) alloca (len + 10 + 1);
memcpy (tmp, outcharset, len);
memcpy (tmp + len, "//TRANSLIT", 10 + 1);
outcharset = tmp;
}
# endif
domain->conv = iconv_open (outcharset, charset);
# if _LIBICONV_VERSION >= 0x0105
freea (outcharset);
# endif
# endif
# endif
freea (charset);
}
#endif /* _LIBC || HAVE_ICONV */
}
return nullentry;
}
/* Frees the codeset dependent parts of an opened message catalog. */
void
internal_function
_nl_free_domain_conv (domain)
struct loaded_domain *domain;
{
if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
free (domain->conv_tab);
#ifdef _LIBC
if (domain->conv != (__gconv_t) -1)
__gconv_close (domain->conv);
#else
# if HAVE_ICONV
if (domain->conv != (iconv_t) -1)
iconv_close (domain->conv);
# endif
#endif
}
/* Load the message catalogs specified by FILENAME. If it is no valid
message catalog do nothing. */
void
internal_function
_nl_load_domain (domain_file, domainbinding)
struct loaded_l10nfile *domain_file;
struct binding *domainbinding;
{
int fd;
size_t size;
#ifdef _LIBC
struct stat64 st;
#else
struct stat st;
#endif
struct mo_file_header *data = (struct mo_file_header *) -1;
int use_mmap = 0;
struct loaded_domain *domain;
const char *nullentry;
domain_file->decided = 1;
domain_file->data = NULL;
/* Note that it would be useless to store domainbinding in domain_file
because domainbinding might be == NULL now but != NULL later (after
a call to bind_textdomain_codeset). */
/* If the record does not represent a valid locale the FILENAME
might be NULL. This can happen when according to the given
specification the locale file name is different for XPG and CEN
syntax. */
if (domain_file->filename == NULL)
return;
/* Try to open the addressed file. */
fd = open (domain_file->filename, O_RDONLY | O_BINARY);
if (fd == -1)
return;
/* We must know about the size of the file. */
if (
#ifdef _LIBC
__builtin_expect (fstat64 (fd, &st) != 0, 0)
#else
__builtin_expect (fstat (fd, &st) != 0, 0)
#endif
|| __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0)
|| __builtin_expect (size < sizeof (struct mo_file_header), 0))
{
/* Something went wrong. */
close (fd);
return;
}
#ifdef HAVE_MMAP
/* Now we are ready to load the file. If mmap() is available we try
this first. If not available or it failed we try to load it. */
data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
MAP_PRIVATE, fd, 0);
if (__builtin_expect (data != (struct mo_file_header *) -1, 1))
{
/* mmap() call was successful. */
close (fd);
use_mmap = 1;
}
#endif
/* If the data is not yet available (i.e. mmap'ed) we try to load
it manually. */
if (data == (struct mo_file_header *) -1)
{
size_t to_read;
char *read_ptr;
data = (struct mo_file_header *) malloc (size);
if (data == NULL)
return;
to_read = size;
read_ptr = (char *) data;
do
{
long int nb = (long int) read (fd, read_ptr, to_read);
if (nb <= 0)
{
#ifdef EINTR
if (nb == -1 && errno == EINTR)
continue;
#endif
close (fd);
return;
}
read_ptr += nb;
to_read -= nb;
}
while (to_read > 0);
close (fd);
}
/* Using the magic number we can test whether it really is a message
catalog file. */
if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED,
0))
{
/* The magic number is wrong: not a message catalog file. */
#ifdef HAVE_MMAP
if (use_mmap)
munmap ((caddr_t) data, size);
else
#endif
free (data);
return;
}
domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
if (domain == NULL)
return;
domain_file->data = domain;
domain->data = (char *) data;
domain->use_mmap = use_mmap;
domain->mmap_size = size;
domain->must_swap = data->magic != _MAGIC;
/* Fill in the information about the available tables. */
switch (W (domain->must_swap, data->revision))
{
case 0:
domain->nstrings = W (domain->must_swap, data->nstrings);
domain->orig_tab = (struct string_desc *)
((char *) data + W (domain->must_swap, data->orig_tab_offset));
domain->trans_tab = (struct string_desc *)
((char *) data + W (domain->must_swap, data->trans_tab_offset));
domain->hash_size = W (domain->must_swap, data->hash_tab_size);
domain->hash_tab = (nls_uint32 *)
((char *) data + W (domain->must_swap, data->hash_tab_offset));
break;
default:
/* This is an invalid revision. */
#ifdef HAVE_MMAP
if (use_mmap)
munmap ((caddr_t) data, size);
else
#endif
free (data);
free (domain);
domain_file->data = NULL;
return;
}
/* Now initialize the character set converter from the character set
the file is encoded with (found in the header entry) to the domain's
specified character set or the locale's character set. */
nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding);
/* Also look for a plural specification. */
if (nullentry != NULL)
{
const char *plural;
const char *nplurals;
plural = strstr (nullentry, "plural=");
nplurals = strstr (nullentry, "nplurals=");
if (plural == NULL || nplurals == NULL)
goto no_plural;
else
{
/* First get the number. */
char *endp;
unsigned long int n;
struct parse_args args;
nplurals += 9;
while (*nplurals != '\0' && isspace (*nplurals))
++nplurals;
#if defined HAVE_STRTOUL || defined _LIBC
n = strtoul (nplurals, &endp, 10);
#else
for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++)
n = n * 10 + (*endp - '0');
#endif
domain->nplurals = n;
if (nplurals == endp)
goto no_plural;
/* Due to the restrictions bison imposes onto the interface of the
scanner function we have to put the input string and the result
passed up from the parser into the same structure which address
is passed down to the parser. */
plural += 7;
args.cp = plural;
if (PLURAL_PARSE (&args) != 0)
goto no_plural;
domain->plural = args.res;
}
}
else
{
/* By default we are using the Germanic form: singular form only
for `one', the plural form otherwise. Yes, this is also what
English is using since English is a Germanic language. */
no_plural:
INIT_GERMANIC_PLURAL ();
domain->plural = &germanic_plural;
domain->nplurals = 2;
}
}
#ifdef _LIBC
void
internal_function
_nl_unload_domain (domain)
struct loaded_domain *domain;
{
if (domain->plural != &germanic_plural)
__gettext_free_exp (domain->plural);
_nl_free_domain_conv (domain);
# ifdef _POSIX_MAPPED_FILES
if (domain->use_mmap)
munmap ((caddr_t) domain->data, domain->mmap_size);
else
# endif /* _POSIX_MAPPED_FILES */
free ((void *) domain->data);
free (domain);
}
#endif
-271
View File
@@ -1,271 +0,0 @@
/* Determine a canonical name for the current locale's character encoding.
Copyright (C) 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 Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library 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 Bruno Haible <[email protected]>. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#if HAVE_STDDEF_H
# include <stddef.h>
#endif
#include <stdio.h>
#if HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
#endif
#if HAVE_STDLIB_H
# include <stdlib.h>
#endif
#if defined _WIN32 || defined __WIN32__
# undef WIN32 /* avoid warning on mingw32 */
# define WIN32
#endif
#ifndef WIN32
# if HAVE_LANGINFO_CODESET
# include <langinfo.h>
# else
# if HAVE_SETLOCALE
# include <locale.h>
# endif
# endif
#else /* WIN32 */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif
#ifndef DIRECTORY_SEPARATOR
# define DIRECTORY_SEPARATOR '/'
#endif
#ifndef ISSLASH
# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
#endif
/* The following static variable is declared 'volatile' to avoid a
possible multithread problem in the function get_charset_aliases. If we
are running in a threaded environment, and if two threads initialize
'charset_aliases' simultaneously, both will produce the same value,
and everything will be ok if the two assignments to 'charset_aliases'
are atomic. But I don't know what will happen if the two assignments mix. */
#if __STDC__ != 1
# define volatile /* empty */
#endif
/* Pointer to the contents of the charset.alias file, if it has already been
read, else NULL. Its format is:
ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
static const char * volatile charset_aliases;
/* Return a pointer to the contents of the charset.alias file. */
static const char *
get_charset_aliases ()
{
const char *cp;
cp = charset_aliases;
if (cp == NULL)
{
#ifndef WIN32
FILE *fp;
const char *dir = LIBDIR;
const char *base = "charset.alias";
char *file_name;
/* Concatenate dir and base into freshly allocated file_name. */
{
size_t dir_len = strlen (dir);
size_t base_len = strlen (base);
int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1]));
file_name = (char *) malloc (dir_len + add_slash + base_len + 1);
if (file_name != NULL)
{
memcpy (file_name, dir, dir_len);
if (add_slash)
file_name[dir_len] = DIRECTORY_SEPARATOR;
memcpy (file_name + dir_len + add_slash, base, base_len + 1);
}
}
if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL)
/* Out of memory or file not found, treat it as empty. */
cp = "";
else
{
/* Parse the file's contents. */
int c;
char buf1[50+1];
char buf2[50+1];
char *res_ptr = NULL;
size_t res_size = 0;
size_t l1, l2;
for (;;)
{
c = getc (fp);
if (c == EOF)
break;
if (c == '\n' || c == ' ' || c == '\t')
continue;
if (c == '#')
{
/* Skip comment, to end of line. */
do
c = getc (fp);
while (!(c == EOF || c == '\n'));
if (c == EOF)
break;
continue;
}
ungetc (c, fp);
if (fscanf(fp, "%50s %50s", buf1, buf2) < 2)
break;
l1 = strlen (buf1);
l2 = strlen (buf2);
if (res_size == 0)
{
res_size = l1 + 1 + l2 + 1;
res_ptr = malloc (res_size + 1);
}
else
{
res_size += l1 + 1 + l2 + 1;
res_ptr = realloc (res_ptr, res_size + 1);
}
if (res_ptr == NULL)
{
/* Out of memory. */
res_size = 0;
break;
}
strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
strcpy (res_ptr + res_size - (l2 + 1), buf2);
}
fclose (fp);
if (res_size == 0)
cp = "";
else
{
*(res_ptr + res_size) = '\0';
cp = res_ptr;
}
}
if (file_name != NULL)
free (file_name);
#else /* WIN32 */
/* To avoid the troubles of installing a separate file in the same
directory as the DLL and of retrieving the DLL's directory at
runtime, simply inline the aliases here. */
cp = "CP936" "\0" "GBK" "\0"
"CP1361" "\0" "JOHAB" "\0";
#endif
charset_aliases = cp;
}
return cp;
}
/* Determine the current locale's character encoding, and canonicalize it
into one of the canonical names listed in config.charset.
The result must not be freed; it is statically allocated.
If the canonical name cannot be determined, the result is a non-canonical
name. */
#ifdef STATIC
STATIC
#endif
const char *
locale_charset ()
{
const char *codeset;
const char *aliases;
#ifndef WIN32
# if HAVE_LANGINFO_CODESET
/* Most systems support nl_langinfo (CODESET) nowadays. */
codeset = nl_langinfo (CODESET);
# else
/* On old systems which lack it, use setlocale or getenv. */
const char *locale = NULL;
/* But most old systems don't have a complete set of locales. Some
(like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
use setlocale here; it would return "C" when it doesn't support the
locale name the user has set. */
# if HAVE_SETLOCALE && 0
locale = setlocale (LC_CTYPE, NULL);
# endif
if (locale == NULL || locale[0] == '\0')
{
locale = getenv ("LC_ALL");
if (locale == NULL || locale[0] == '\0')
{
locale = getenv ("LC_CTYPE");
if (locale == NULL || locale[0] == '\0')
locale = getenv ("LANG");
}
}
/* On some old systems, one used to set locale = "iso8859_1". On others,
you set it to "language_COUNTRY.charset". In any case, we resolve it
through the charset.alias file. */
codeset = locale;
# endif
#else /* WIN32 */
static char buf[2 + 10 + 1];
/* Win32 has a function returning the locale's codepage as a number. */
sprintf (buf, "CP%u", GetACP ());
codeset = buf;
#endif
if (codeset == NULL)
/* The canonical name cannot be determined. */
codeset = "";
/* Resolve alias. */
for (aliases = get_charset_aliases ();
*aliases != '\0';
aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
if (strcmp (codeset, aliases) == 0
|| (aliases[0] == '*' && aliases[1] == '\0'))
{
codeset = aliases + strlen (aliases) + 1;
break;
}
return codeset;
}
-78
View File
@@ -1,78 +0,0 @@
# Locale name alias data base.
# Copyright (C) 1996,1997,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 Library 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
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library 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.
# The format of this file is the same as for the corresponding file of
# the X Window System, which normally can be found in
# /usr/lib/X11/locale/locale.alias
# A single line contains two fields: an alias and a substitution value.
# All entries are case independent.
# Note: This file is far from being complete. If you have a value for
# your own site which you think might be useful for others too, share
# it with the rest of us. Send it using the `glibcbug' script to
# [email protected].
# Packages using this file:
bokmal no_NO.ISO-8859-1
bokmål no_NO.ISO-8859-1
catalan ca_ES.ISO-8859-1
croatian hr_HR.ISO-8859-2
czech cs_CZ.ISO-8859-2
danish da_DK.ISO-8859-1
dansk da_DK.ISO-8859-1
deutsch de_DE.ISO-8859-1
dutch nl_NL.ISO-8859-1
eesti et_EE.ISO-8859-1
estonian et_EE.ISO-8859-1
finnish fi_FI.ISO-8859-1
français fr_FR.ISO-8859-1
french fr_FR.ISO-8859-1
galego gl_ES.ISO-8859-1
galician gl_ES.ISO-8859-1
german de_DE.ISO-8859-1
greek el_GR.ISO-8859-7
hebrew he_IL.ISO-8859-8
hrvatski hr_HR.ISO-8859-2
hungarian hu_HU.ISO-8859-2
icelandic is_IS.ISO-8859-1
italian it_IT.ISO-8859-1
japanese ja_JP.eucJP
japanese.euc ja_JP.eucJP
ja_JP ja_JP.eucJP
ja_JP.ujis ja_JP.eucJP
japanese.sjis ja_JP.SJIS
korean ko_KR.eucKR
korean.euc ko_KR.eucKR
ko_KR ko_KR.eucKR
lithuanian lt_LT.ISO-8859-13
nb_NO no_NO.ISO-8859-1
nb_NO.ISO-8859-1 no_NO.ISO-8859-1
norwegian no_NO.ISO-8859-1
nynorsk nn_NO.ISO-8859-1
polish pl_PL.ISO-8859-2
portuguese pt_PT.ISO-8859-1
romanian ro_RO.ISO-8859-2
russian ru_RU.ISO-8859-5
slovak sk_SK.ISO-8859-2
slovene sl_SI.ISO-8859-2
slovenian sl_SI.ISO-8859-2
spanish es_ES.ISO-8859-1
swedish sv_SE.ISO-8859-1
thai th_TH.TIS-620
turkish tr_TR.ISO-8859-9
-404
View File
@@ -1,404 +0,0 @@
/* Handle aliases for locale names.
Copyright (C) 1995-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 Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library 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. */
/* Tell glibc's <string.h> to provide a prototype for mempcpy().
This must come before <config.h> because <config.h> may include
<features.h>, and once <features.h> has been included, it's too late. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <ctype.h>
#include <stdio.h>
#include <sys/types.h>
#ifdef __GNUC__
# define alloca __builtin_alloca
# define HAVE_ALLOCA 1
#else
# if defined HAVE_ALLOCA_H || defined _LIBC
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca
char *alloca ();
# endif
# endif
# endif
#endif
#include <stdlib.h>
#include <string.h>
#if !HAVE_STRCHR && !defined _LIBC
# ifndef strchr
# define strchr index
# endif
#endif
#include "gettextP.h"
/* @@ end of prolog @@ */
#ifdef _LIBC
/* Rename the non ANSI C functions. This is required by the standard
because some ANSI C functions will require linking with this object
file and the name space must not be polluted. */
# define strcasecmp __strcasecmp
# ifndef mempcpy
# define mempcpy __mempcpy
# endif
# define HAVE_MEMPCPY 1
/* We need locking here since we can be called from different places. */
# include <bits/libc-lock.h>
__libc_lock_define_initialized (static, lock);
#endif
#ifndef internal_function
# define internal_function
#endif
/* For those losing systems which don't have `alloca' we have to add
some additional code emulating it. */
#ifdef HAVE_ALLOCA
# define freea(p) /* nothing */
#else
# define alloca(n) malloc (n)
# define freea(p) free (p)
#endif
#if defined _LIBC_REENTRANT || defined HAVE_FGETS_UNLOCKED
# undef fgets
# define fgets(buf, len, s) fgets_unlocked (buf, len, s)
#endif
#if defined _LIBC_REENTRANT || defined HAVE_FEOF_UNLOCKED
# undef feof
# define feof(s) feof_unlocked (s)
#endif
struct alias_map
{
const char *alias;
const char *value;
};
static char *string_space;
static size_t string_space_act;
static size_t string_space_max;
static struct alias_map *map;
static size_t nmap;
static size_t maxmap;
/* Prototypes for local functions. */
static size_t read_alias_file PARAMS ((const char *fname, int fname_len))
internal_function;
static int extend_alias_table PARAMS ((void));
static int alias_compare PARAMS ((const struct alias_map *map1,
const struct alias_map *map2));
const char *
_nl_expand_alias (name)
const char *name;
{
static const char *locale_alias_path = LOCALE_ALIAS_PATH;
struct alias_map *retval;
const char *result = NULL;
size_t added;
#ifdef _LIBC
__libc_lock_lock (lock);
#endif
do
{
struct alias_map item;
item.alias = name;
if (nmap > 0)
retval = (struct alias_map *) bsearch (&item, map, nmap,
sizeof (struct alias_map),
(int (*) PARAMS ((const void *,
const void *))
) alias_compare);
else
retval = NULL;
/* We really found an alias. Return the value. */
if (retval != NULL)
{
result = retval->value;
break;
}
/* Perhaps we can find another alias file. */
added = 0;
while (added == 0 && locale_alias_path[0] != '\0')
{
const char *start;
while (locale_alias_path[0] == PATH_SEPARATOR)
++locale_alias_path;
start = locale_alias_path;
while (locale_alias_path[0] != '\0'
&& locale_alias_path[0] != PATH_SEPARATOR)
++locale_alias_path;
if (start < locale_alias_path)
added = read_alias_file (start, locale_alias_path - start);
}
}
while (added != 0);
#ifdef _LIBC
__libc_lock_unlock (lock);
#endif
return result;
}
static size_t
internal_function
read_alias_file (fname, fname_len)
const char *fname;
int fname_len;
{
FILE *fp;
char *full_fname;
size_t added;
static const char aliasfile[] = "/locale.alias";
full_fname = (char *) alloca (fname_len + sizeof aliasfile);
#ifdef HAVE_MEMPCPY
mempcpy (mempcpy (full_fname, fname, fname_len),
aliasfile, sizeof aliasfile);
#else
memcpy (full_fname, fname, fname_len);
memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
#endif
fp = fopen (full_fname, "r");
freea (full_fname);
if (fp == NULL)
return 0;
added = 0;
while (!feof (fp))
{
/* It is a reasonable approach to use a fix buffer here because
a) we are only interested in the first two fields
b) these fields must be usable as file names and so must not
be that long
*/
char buf[BUFSIZ];
char *alias;
char *value;
char *cp;
if (fgets (buf, sizeof buf, fp) == NULL)
/* EOF reached. */
break;
/* Possibly not the whole line fits into the buffer. Ignore
the rest of the line. */
if (strchr (buf, '\n') == NULL)
{
char altbuf[BUFSIZ];
do
if (fgets (altbuf, sizeof altbuf, fp) == NULL)
/* Make sure the inner loop will be left. The outer loop
will exit at the `feof' test. */
break;
while (strchr (altbuf, '\n') == NULL);
}
cp = buf;
/* Ignore leading white space. */
while (isspace (cp[0]))
++cp;
/* A leading '#' signals a comment line. */
if (cp[0] != '\0' && cp[0] != '#')
{
alias = cp++;
while (cp[0] != '\0' && !isspace (cp[0]))
++cp;
/* Terminate alias name. */
if (cp[0] != '\0')
*cp++ = '\0';
/* Now look for the beginning of the value. */
while (isspace (cp[0]))
++cp;
if (cp[0] != '\0')
{
size_t alias_len;
size_t value_len;
value = cp++;
while (cp[0] != '\0' && !isspace (cp[0]))
++cp;
/* Terminate value. */
if (cp[0] == '\n')
{
/* This has to be done to make the following test
for the end of line possible. We are looking for
the terminating '\n' which do not overwrite here. */
*cp++ = '\0';
*cp = '\n';
}
else if (cp[0] != '\0')
*cp++ = '\0';
if (nmap >= maxmap)
if (__builtin_expect (extend_alias_table (), 0))
return added;
alias_len = strlen (alias) + 1;
value_len = strlen (value) + 1;
if (string_space_act + alias_len + value_len > string_space_max)
{
/* Increase size of memory pool. */
size_t new_size = (string_space_max
+ (alias_len + value_len > 1024
? alias_len + value_len : 1024));
char *new_pool = (char *) realloc (string_space, new_size);
if (new_pool == NULL)
return added;
if (__builtin_expect (string_space != new_pool, 0))
{
size_t i;
for (i = 0; i < nmap; i++)
{
map[i].alias += new_pool - string_space;
map[i].value += new_pool - string_space;
}
}
string_space = new_pool;
string_space_max = new_size;
}
map[nmap].alias = memcpy (&string_space[string_space_act],
alias, alias_len);
string_space_act += alias_len;
map[nmap].value = memcpy (&string_space[string_space_act],
value, value_len);
string_space_act += value_len;
++nmap;
++added;
}
}
}
/* Should we test for ferror()? I think we have to silently ignore
errors. --drepper */
fclose (fp);
if (added > 0)
qsort (map, nmap, sizeof (struct alias_map),
(int (*) PARAMS ((const void *, const void *))) alias_compare);
return added;
}
static int
extend_alias_table ()
{
size_t new_size;
struct alias_map *new_map;
new_size = maxmap == 0 ? 100 : 2 * maxmap;
new_map = (struct alias_map *) realloc (map, (new_size
* sizeof (struct alias_map)));
if (new_map == NULL)
/* Simply don't extend: we don't have any more core. */
return -1;
map = new_map;
maxmap = new_size;
return 0;
}
#ifdef _LIBC
static void __attribute__ ((unused))
free_mem (void)
{
if (string_space != NULL)
free (string_space);
if (map != NULL)
free (map);
}
text_set_element (__libc_subfreeres, free_mem);
#endif
static int
alias_compare (map1, map2)
const struct alias_map *map1;
const struct alias_map *map2;
{
#if defined _LIBC || defined HAVE_STRCASECMP
return strcasecmp (map1->alias, map2->alias);
#else
const unsigned char *p1 = (const unsigned char *) map1->alias;
const unsigned char *p2 = (const unsigned char *) map2->alias;
unsigned char c1, c2;
if (p1 == p2)
return 0;
do
{
/* I know this seems to be odd but the tolower() function in
some systems libc cannot handle nonalpha characters. */
c1 = isupper (*p1) ? tolower (*p1) : *p1;
c2 = isupper (*p2) ? tolower (*p2) : *p2;
if (c1 == '\0')
break;
++p1;
++p2;
}
while (c1 == c2);
return c1 - c2;
#endif
}
-68
View File
@@ -1,68 +0,0 @@
/* Implementation of ngettext(3) function.
Copyright (C) 1995, 1997, 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 Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library 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. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifdef _LIBC
# define __need_NULL
# include <stddef.h>
#else
# include <stdlib.h> /* Just for NULL. */
#endif
#include "gettextP.h"
#ifdef _LIBC
# include <libintl.h>
#else
# include "libgnuintl.h"
#endif
#include <locale.h>
/* @@ end of prolog @@ */
/* Names for the libintl functions are a problem. They must not clash
with existing names and they should follow ANSI C. But this source
code is also used in GNU C Library where the names have a __
prefix. So we have to make a difference here. */
#ifdef _LIBC
# define NGETTEXT __ngettext
# define DCNGETTEXT __dcngettext
#else
# define NGETTEXT ngettext__
# define DCNGETTEXT dcngettext__
#endif
/* Look up MSGID in the current default message catalog for the current
LC_MESSAGES locale. If not found, returns MSGID itself (the default
text). */
char *
NGETTEXT (msgid1, msgid2, n)
const char *msgid1;
const char *msgid2;
unsigned long int n;
{
return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
}
#ifdef _LIBC
/* Alias for function name in GNU C Library. */
weak_alias (__ngettext, ngettext);
#endif
-1326
View File
File diff suppressed because it is too large Load Diff
-413
View File
@@ -1,413 +0,0 @@
%{
/* Expression parsing for plural form selection.
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
Written by Ulrich Drepper <[email protected]>, 2000.
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, 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; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */
/* The bison generated parser uses alloca. AIX 3 forces us to put this
declaration at the beginning of the file. The declaration in bison's
skeleton file comes too late. This must come before <config.h>
because <config.h> may include arbitrary system headers. */
#if defined _AIX && !defined __GNUC__
#pragma alloca
#endif
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdlib.h>
#include "gettextP.h"
/* Names for the libintl functions are a problem. They must not clash
with existing names and they should follow ANSI C. But this source
code is also used in GNU C Library where the names have a __
prefix. So we have to make a difference here. */
#ifdef _LIBC
# define FREE_EXPRESSION __gettext_free_exp
#else
# define FREE_EXPRESSION gettext_free_exp__
# define __gettextparse gettextparse__
#endif
#define YYLEX_PARAM &((struct parse_args *) arg)->cp
#define YYPARSE_PARAM arg
%}
%pure_parser
%expect 10
%union {
unsigned long int num;
enum operator op;
struct expression *exp;
}
%{
/* Prototypes for local functions. */
static struct expression *new_exp PARAMS ((int nargs, enum operator op,
struct expression * const *args));
static inline struct expression *new_exp_0 PARAMS ((enum operator op));
static inline struct expression *new_exp_1 PARAMS ((enum operator op,
struct expression *right));
static struct expression *new_exp_2 PARAMS ((enum operator op,
struct expression *left,
struct expression *right));
static inline struct expression *new_exp_3 PARAMS ((enum operator op,
struct expression *bexp,
struct expression *tbranch,
struct expression *fbranch));
static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
static void yyerror PARAMS ((const char *str));
/* Allocation of expressions. */
static struct expression *
new_exp (nargs, op, args)
int nargs;
enum operator op;
struct expression * const *args;
{
int i;
struct expression *newp;
/* If any of the argument could not be malloc'ed, just return NULL. */
for (i = nargs - 1; i >= 0; i--)
if (args[i] == NULL)
goto fail;
/* Allocate a new expression. */
newp = (struct expression *) malloc (sizeof (*newp));
if (newp != NULL)
{
newp->nargs = nargs;
newp->operation = op;
for (i = nargs - 1; i >= 0; i--)
newp->val.args[i] = args[i];
return newp;
}
fail:
for (i = nargs - 1; i >= 0; i--)
FREE_EXPRESSION (args[i]);
return NULL;
}
static inline struct expression *
new_exp_0 (op)
enum operator op;
{
return new_exp (0, op, NULL);
}
static inline struct expression *
new_exp_1 (op, right)
enum operator op;
struct expression *right;
{
struct expression *args[1];
args[0] = right;
return new_exp (1, op, args);
}
static struct expression *
new_exp_2 (op, left, right)
enum operator op;
struct expression *left;
struct expression *right;
{
struct expression *args[2];
args[0] = left;
args[1] = right;
return new_exp (2, op, args);
}
static inline struct expression *
new_exp_3 (op, bexp, tbranch, fbranch)
enum operator op;
struct expression *bexp;
struct expression *tbranch;
struct expression *fbranch;
{
struct expression *args[3];
args[0] = bexp;
args[1] = tbranch;
args[2] = fbranch;
return new_exp (3, op, args);
}
%}
/* This declares that all operators have the same associativity and the
precedence order as in C. See [Harbison, Steele: C, A Reference Manual].
There is no unary minus and no bitwise operators.
Operators with the same syntactic behaviour have been merged into a single
token, to save space in the array generated by bison. */
%right '?' /* ? */
%left '|' /* || */
%left '&' /* && */
%left EQUOP2 /* == != */
%left CMPOP2 /* < > <= >= */
%left ADDOP2 /* + - */
%left MULOP2 /* * / % */
%right '!' /* ! */
%token <op> EQUOP2 CMPOP2 ADDOP2 MULOP2
%token <num> NUMBER
%type <exp> exp
%%
start: exp
{
if ($1 == NULL)
YYABORT;
((struct parse_args *) arg)->res = $1;
}
;
exp: exp '?' exp ':' exp
{
$$ = new_exp_3 (qmop, $1, $3, $5);
}
| exp '|' exp
{
$$ = new_exp_2 (lor, $1, $3);
}
| exp '&' exp
{
$$ = new_exp_2 (land, $1, $3);
}
| exp EQUOP2 exp
{
$$ = new_exp_2 ($2, $1, $3);
}
| exp CMPOP2 exp
{
$$ = new_exp_2 ($2, $1, $3);
}
| exp ADDOP2 exp
{
$$ = new_exp_2 ($2, $1, $3);
}
| exp MULOP2 exp
{
$$ = new_exp_2 ($2, $1, $3);
}
| '!' exp
{
$$ = new_exp_1 (lnot, $2);
}
| 'n'
{
$$ = new_exp_0 (var);
}
| NUMBER
{
if (($$ = new_exp_0 (num)) != NULL)
$$->val.num = $1;
}
| '(' exp ')'
{
$$ = $2;
}
;
%%
void
internal_function
FREE_EXPRESSION (exp)
struct expression *exp;
{
if (exp == NULL)
return;
/* Handle the recursive case. */
switch (exp->nargs)
{
case 3:
FREE_EXPRESSION (exp->val.args[2]);
/* FALLTHROUGH */
case 2:
FREE_EXPRESSION (exp->val.args[1]);
/* FALLTHROUGH */
case 1:
FREE_EXPRESSION (exp->val.args[0]);
/* FALLTHROUGH */
default:
break;
}
free (exp);
}
static int
yylex (lval, pexp)
YYSTYPE *lval;
const char **pexp;
{
const char *exp = *pexp;
int result;
while (1)
{
if (exp[0] == '\0')
{
*pexp = exp;
return YYEOF;
}
if (exp[0] != ' ' && exp[0] != '\t')
break;
++exp;
}
result = *exp++;
switch (result)
{
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
{
unsigned long int n = result - '0';
while (exp[0] >= '0' && exp[0] <= '9')
{
n *= 10;
n += exp[0] - '0';
++exp;
}
lval->num = n;
result = NUMBER;
}
break;
case '=':
if (exp[0] == '=')
{
++exp;
lval->op = equal;
result = EQUOP2;
}
else
result = YYERRCODE;
break;
case '!':
if (exp[0] == '=')
{
++exp;
lval->op = not_equal;
result = EQUOP2;
}
break;
case '&':
case '|':
if (exp[0] == result)
++exp;
else
result = YYERRCODE;
break;
case '<':
if (exp[0] == '=')
{
++exp;
lval->op = less_or_equal;
}
else
lval->op = less_than;
result = CMPOP2;
break;
case '>':
if (exp[0] == '=')
{
++exp;
lval->op = greater_or_equal;
}
else
lval->op = greater_than;
result = CMPOP2;
break;
case '*':
lval->op = mult;
result = MULOP2;
break;
case '/':
lval->op = divide;
result = MULOP2;
break;
case '%':
lval->op = module;
result = MULOP2;
break;
case '+':
lval->op = plus;
result = ADDOP2;
break;
case '-':
lval->op = minus;
result = ADDOP2;
break;
case 'n':
case '?':
case ':':
case '(':
case ')':
/* Nothing, just return the character. */
break;
case ';':
case '\n':
case '\0':
/* Be safe and let the user call this function again. */
--exp;
result = YYEOF;
break;
default:
result = YYERRCODE;
#if YYDEBUG != 0
--exp;
#endif
break;
}
*pexp = exp;
return result;
}
static void
yyerror (str)
const char *str;
{
/* Do nothing. We don't print error messages here. */
}
-31
View File
@@ -1,31 +0,0 @@
# Add this package to a list of references stored in a text file.
#
# Copyright (C) 2000 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, 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; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
# USA.
#
# Written by Bruno Haible <[email protected]>.
#
/^# Packages using this file: / {
s/# Packages using this file://
ta
:a
s/ @PACKAGE@ / @PACKAGE@ /
tb
s/ $/ @PACKAGE@ /
:b
s/^/# Packages using this file:/
}
-26
View File
@@ -1,26 +0,0 @@
# Remove this package from a list of references stored in a text file.
#
# Copyright (C) 2000 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, 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; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
# USA.
#
# Written by Bruno Haible <[email protected]>.
#
/^# Packages using this file: / {
s/# Packages using this file://
s/ @PACKAGE@ / /
s/^/# Packages using this file:/
}
-142
View File
@@ -1,142 +0,0 @@
/* Implementation of the textdomain(3) function.
Copyright (C) 1995-1998, 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 Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library 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. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdlib.h>
#include <string.h>
#ifdef _LIBC
# include <libintl.h>
#else
# include "libgnuintl.h"
#endif
#include "gettextP.h"
#ifdef _LIBC
/* We have to handle multi-threaded applications. */
# include <bits/libc-lock.h>
#else
/* Provide dummy implementation if this is outside glibc. */
# define __libc_rwlock_define(CLASS, NAME)
# define __libc_rwlock_wrlock(NAME)
# define __libc_rwlock_unlock(NAME)
#endif
/* The internal variables in the standalone libintl.a must have different
names than the internal variables in GNU libc, otherwise programs
using libintl.a cannot be linked statically. */
#if !defined _LIBC
# define _nl_default_default_domain _nl_default_default_domain__
# define _nl_current_default_domain _nl_current_default_domain__
#endif
/* @@ end of prolog @@ */
/* Name of the default text domain. */
extern const char _nl_default_default_domain[];
/* Default text domain in which entries for gettext(3) are to be found. */
extern const char *_nl_current_default_domain;
/* Names for the libintl functions are a problem. They must not clash
with existing names and they should follow ANSI C. But this source
code is also used in GNU C Library where the names have a __
prefix. So we have to make a difference here. */
#ifdef _LIBC
# define TEXTDOMAIN __textdomain
# ifndef strdup
# define strdup(str) __strdup (str)
# endif
#else
# define TEXTDOMAIN textdomain__
#endif
/* Lock variable to protect the global data in the gettext implementation. */
__libc_rwlock_define (extern, _nl_state_lock)
/* Set the current default message catalog to DOMAINNAME.
If DOMAINNAME is null, return the current default.
If DOMAINNAME is "", reset to the default of "messages". */
char *
TEXTDOMAIN (domainname)
const char *domainname;
{
char *new_domain;
char *old_domain;
/* A NULL pointer requests the current setting. */
if (domainname == NULL)
return (char *) _nl_current_default_domain;
__libc_rwlock_wrlock (_nl_state_lock);
old_domain = (char *) _nl_current_default_domain;
/* If domain name is the null string set to default domain "messages". */
if (domainname[0] == '\0'
|| strcmp (domainname, _nl_default_default_domain) == 0)
{
_nl_current_default_domain = _nl_default_default_domain;
new_domain = (char *) _nl_current_default_domain;
}
else if (strcmp (domainname, old_domain) == 0)
/* This can happen and people will use it to signal that some
environment variable changed. */
new_domain = old_domain;
else
{
/* If the following malloc fails `_nl_current_default_domain'
will be NULL. This value will be returned and so signals we
are out of core. */
#if defined _LIBC || defined HAVE_STRDUP
new_domain = strdup (domainname);
#else
size_t len = strlen (domainname) + 1;
new_domain = (char *) malloc (len);
if (new_domain != NULL)
memcpy (new_domain, domainname, len);
#endif
if (new_domain != NULL)
_nl_current_default_domain = new_domain;
}
/* We use this possibility to signal a change of the loaded catalogs
since this is most likely the case and there is no other easy we
to do it. Do it only when the call was successful. */
if (new_domain != NULL)
{
++_nl_msg_cat_cntr;
if (old_domain != new_domain && old_domain != _nl_default_default_domain)
free (old_domain);
}
__libc_rwlock_unlock (_nl_state_lock);
return new_domain;
}
#ifdef _LIBC
/* Alias for function name in GNU C Library. */
weak_alias (__textdomain, textdomain);
#endif
+2 -1
View File
@@ -1,4 +1,5 @@
*_.c
.deps
Makefile
ansi2knr
ansi2knr ansi2knr.*
Makefile.in
+11 -4
View File
@@ -21,16 +21,23 @@ CFLAGS = @CFLAGS@ $(WARNING_CFLAGS)
noinst_LIBRARIES = libbison.a
INCLUDES = -I.. -I$(srcdir) -I../intl
# libintl.h in is build/intl, libgettext.h in src/intl/,
# config.h in build/., and system.h is in src/src/.
INCLUDES = -I$(top_builddir)/intl \
-I$(top_builddir) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/intl \
-I$(top_srcdir)/lib
# Heck, we are still using an old version of Automake which does not
# understand inner AC_LIBOBJ (i.e., from Autoconf itself, not from
# configure.in).
EXTRA_DIST = malloc.c realloc.c strnlen.c
# understand LIBOBJ additions using $objext...
EXTRA_DIST = malloc.c realloc.c
libbison_a_SOURCES = \
basename.c dirname.h dirname.c \
getopt.h getopt.c getopt1.c \
hash.h hash.c \
quote.h quote.c quotearg.h quotearg.c \
xalloc.h xmalloc.c xstrdup.c xstrndup.c
-425
View File
@@ -1,425 +0,0 @@
# Makefile.in generated by automake 1.5c from Makefile.am.
# @configure_input@
# 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,
# 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_sh_DATA = $(install_sh) -c -m 644
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@
LIB = @LIB@
LIBICONV = @LIBICONV@
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 inner AC_LIBOBJ (i.e., from Autoconf itself, not from
# configure.in).
EXTRA_DIST = malloc.c realloc.c strnlen.c
libbison_a_SOURCES = \
basename.c dirname.h dirname.c \
getopt.h getopt.c getopt1.c \
quote.h quote.c quotearg.h quotearg.c \
xalloc.h xmalloc.c xstrdup.c xstrndup.c
libbison_a_LIBADD = @LIBOBJS@ @ALLOCA@
libbison_a_DEPENDENCIES = $(libbison_a_LIBADD)
subdir = lib
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
LIBRARIES = $(noinst_LIBRARIES)
libbison_a_AR = $(AR) cru
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@
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
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)/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 $@
DIST_SOURCES = $(libbison_a_SOURCES)
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
.SUFFIXES:
.SUFFIXES: .c .o .obj
$(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)/$@ $(am__depfiles_maybe)
AR = ar
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
libbison.a: $(libbison_a_OBJECTS) $(libbison_a_DEPENDENCIES)
-rm -f libbison.a
$(libbison_a_AR) libbison.a $(libbison_a_OBJECTS) $(libbison_a_LIBADD)
$(RANLIB) libbison.a
mostlyclean-compile:
-rm -f *.$(OBJEXT) core *.core
distclean-compile:
-rm -f *.tab.c
ANSI2KNR = @ANSI2KNR@
ansi2knr: ansi2knr.$(OBJEXT)
$(LINK) ansi2knr.$(OBJEXT) $(LIBS)
ansi2knr.$(OBJEXT): $(CONFIG_HEADER)
clean-krextra:
-rm -f ansi2knr
mostlyclean-kr:
-test "$U" = "" || rm -f *_.c
@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)/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)/strchr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strspn.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) ./$(DEPDIR)
.c.o:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
.c.obj:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(COMPILE) -c `cygpath -w $<`
CCDEPMODE = @CCDEPMODE@
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: 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: 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
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) $(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
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
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)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
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 || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir)$$dir \
|| exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(ANSI2KNR) $(LIBRARIES)
installdirs:
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)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
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 clean-krextra clean-noinstLIBRARIES \
mostlyclean-am
distclean: distclean-am
distclean-am: clean-am distclean-compile distclean-depend \
distclean-generic distclean-tags
dvi: dvi-am
dvi-am:
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr
uninstall-am: uninstall-info-am
.PHONY: GTAGS all all-am check check-am clean clean-generic \
clean-krextra clean-noinstLIBRARIES distclean distclean-compile \
distclean-depend distclean-generic distclean-tags 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-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-kr tags uninstall uninstall-am \
uninstall-info-am
# 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:
-36
View File
@@ -1,36 +0,0 @@
.TH ANSI2KNR 1 "19 Jan 1996"
.SH NAME
ansi2knr \- convert ANSI C to Kernighan & Ritchie C
.SH SYNOPSIS
.I ansi2knr
[--varargs] input_file [output_file]
.SH DESCRIPTION
If no output_file is supplied, output goes to stdout.
.br
There are no error messages.
.sp
.I ansi2knr
recognizes function definitions by seeing a non-keyword identifier at the left
margin, followed by a left parenthesis, with a right parenthesis as the last
character on the line, and with a left brace as the first token on the
following line (ignoring possible intervening comments). It will recognize a
multi-line header provided that no intervening line ends with a left or right
brace or a semicolon. These algorithms ignore whitespace and comments, except
that the function name must be the first thing on the line.
.sp
The following constructs will confuse it:
.br
- Any other construct that starts at the left margin and follows the
above syntax (such as a macro or function call).
.br
- Some macros that tinker with the syntax of the function header.
.sp
The --varargs switch is obsolete, and is recognized only for
backwards compatibility. The present version of
.I ansi2knr
will always attempt to convert a ... argument to va_alist and va_dcl.
.SH AUTHOR
L. Peter Deutsch <[email protected]> wrote the original ansi2knr and
continues to maintain the current version; most of the code in the current
version is his work. ansi2knr also includes contributions by Francois
Pinard <[email protected]> and Jim Avera <[email protected]>.
-739
View File
@@ -1,739 +0,0 @@
/* Copyright (C) 1989, 2000 Aladdin Enterprises. All rights reserved. */
/*$Id$*/
/* Convert ANSI C function definitions to K&R ("traditional C") syntax */
/*
ansi2knr is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY. No author or distributor accepts responsibility to anyone for the
consequences of using it or for whether it serves any particular purpose or
works at all, unless he says so in writing. Refer to the GNU General Public
License (the "GPL") for full details.
Everyone is granted permission to copy, modify and redistribute ansi2knr,
but only under the conditions described in the GPL. A copy of this license
is supposed to have been given to you along with ansi2knr so you can know
your rights and responsibilities. It should be in a file named COPYLEFT,
or, if there is no file named COPYLEFT, a file named COPYING. Among other
things, the copyright notice and this notice must be preserved on all
copies.
We explicitly state here what we believe is already implied by the GPL: if
the ansi2knr program is distributed as a separate set of sources and a
separate executable file which are aggregated on a storage medium together
with another program, this in itself does not bring the other program under
the GPL, nor does the mere fact that such a program or the procedures for
constructing it invoke the ansi2knr executable bring any other part of the
program under the GPL.
*/
/*
* Usage:
ansi2knr [--filename FILENAME] [INPUT_FILE [OUTPUT_FILE]]
* --filename provides the file name for the #line directive in the output,
* overriding input_file (if present).
* If no input_file is supplied, input is read from stdin.
* If no output_file is supplied, output goes to stdout.
* There are no error messages.
*
* ansi2knr recognizes function definitions by seeing a non-keyword
* identifier at the left margin, followed by a left parenthesis, with a
* right parenthesis as the last character on the line, and with a left
* brace as the first token on the following line (ignoring possible
* intervening comments and/or preprocessor directives), except that a line
* consisting of only
* identifier1(identifier2)
* will not be considered a function definition unless identifier2 is
* the word "void", and a line consisting of
* identifier1(identifier2, <<arbitrary>>)
* will not be considered a function definition.
* ansi2knr will recognize a multi-line header provided that no intervening
* line ends with a left or right brace or a semicolon. These algorithms
* ignore whitespace, comments, and preprocessor directives, except that
* the function name must be the first thing on the line. The following
* constructs will confuse it:
* - Any other construct that starts at the left margin and
* follows the above syntax (such as a macro or function call).
* - Some macros that tinker with the syntax of function headers.
*/
/*
* The original and principal author of ansi2knr is L. Peter Deutsch
* <ghost@aladdin.com>. Other authors are noted in the change history
* that follows (in reverse chronological order):
lpd 2000-04-12 backs out Eggert's changes because of bugs:
- concatlits didn't declare the type of its bufend argument;
- concatlits didn't't recognize when it was inside a comment;
- scanstring could scan backward past the beginning of the string; when
- the check for \ + newline in scanstring was unnecessary.
2000-03-05 Paul Eggert <eggert@twinsun.com>
Add support for concatenated string literals.
* ansi2knr.c (concatlits): New decl.
(main): Invoke concatlits to concatenate string literals.
(scanstring): Handle backslash-newline correctly. Work with
character constants. Fix bug when scanning backwards through
backslash-quote. Check for unterminated strings.
(convert1): Parse character constants, too.
(appendline, concatlits): New functions.
* ansi2knr.1: Document this.
lpd 1999-08-17 added code to allow preprocessor directives
wherever comments are allowed
lpd 1999-04-12 added minor fixes from Pavel Roskin
<pavel_roskin@geocities.com> for clean compilation with
gcc -W -Wall
lpd 1999-03-22 added hack to recognize lines consisting of
identifier1(identifier2, xxx) as *not* being procedures
lpd 1999-02-03 made indentation of preprocessor commands consistent
lpd 1999-01-28 fixed two bugs: a '/' in an argument list caused an
endless loop; quoted strings within an argument list
confused the parser
lpd 1999-01-24 added a check for write errors on the output,
suggested by Jim Meyering <meyering@ascend.com>
lpd 1998-11-09 added further hack to recognize identifier(void)
as being a procedure
lpd 1998-10-23 added hack to recognize lines consisting of
identifier1(identifier2) as *not* being procedures
lpd 1997-12-08 made input_file optional; only closes input and/or
output file if not stdin or stdout respectively; prints
usage message on stderr rather than stdout; adds
--filename switch (changes suggested by
<ceder@lysator.liu.se>)
lpd 1996-01-21 added code to cope with not HAVE_CONFIG_H and with
compilers that don't understand void, as suggested by
Tom Lane
lpd 1996-01-15 changed to require that the first non-comment token
on the line following a function header be a left brace,
to reduce sensitivity to macros, as suggested by Tom Lane
<tgl@sss.pgh.pa.us>
lpd 1995-06-22 removed #ifndefs whose sole purpose was to define
undefined preprocessor symbols as 0; changed all #ifdefs
for configuration symbols to #ifs
lpd 1995-04-05 changed copyright notice to make it clear that
including ansi2knr in a program does not bring the entire
program under the GPL
lpd 1994-12-18 added conditionals for systems where ctype macros
don't handle 8-bit characters properly, suggested by
Francois Pinard <pinard@iro.umontreal.ca>;
removed --varargs switch (this is now the default)
lpd 1994-10-10 removed CONFIG_BROKETS conditional
lpd 1994-07-16 added some conditionals to help GNU `configure',
suggested by Francois Pinard <pinard@iro.umontreal.ca>;
properly erase prototype args in function parameters,
contributed by Jim Avera <jima@netcom.com>;
correct error in writeblanks (it shouldn't erase EOLs)
lpd 1989-xx-xx original version
*/
/* Most of the conditionals here are to make ansi2knr work with */
/* or without the GNU configure machinery. */
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <ctype.h>
#if HAVE_CONFIG_H
/*
For properly autoconfiguring ansi2knr, use AC_CONFIG_HEADER(config.h).
This will define HAVE_CONFIG_H and so, activate the following lines.
*/
# if STDC_HEADERS || HAVE_STRING_H
# include <string.h>
# else
# include <strings.h>
# endif
#else /* not HAVE_CONFIG_H */
/* Otherwise do it the hard way */
# ifdef BSD
# include <strings.h>
# else
# ifdef VMS
extern int strlen(), strncmp();
# else
# include <string.h>
# endif
# endif
#endif /* not HAVE_CONFIG_H */
#if STDC_HEADERS
# include <stdlib.h>
#else
/*
malloc and free should be declared in stdlib.h,
but if you've got a K&R compiler, they probably aren't.
*/
# ifdef MSDOS
# include <malloc.h>
# else
# ifdef VMS
extern char *malloc();
extern void free();
# else
extern char *malloc();
extern int free();
# endif
# endif
#endif
/* Define NULL (for *very* old compilers). */
#ifndef NULL
# define NULL (0)
#endif
/*
* The ctype macros don't always handle 8-bit characters correctly.
* Compensate for this here.
*/
#ifdef isascii
# undef HAVE_ISASCII /* just in case */
# define HAVE_ISASCII 1
#else
#endif
#if STDC_HEADERS || !HAVE_ISASCII
# define is_ascii(c) 1
#else
# define is_ascii(c) isascii(c)
#endif
#define is_space(c) (is_ascii(c) && isspace(c))
#define is_alpha(c) (is_ascii(c) && isalpha(c))
#define is_alnum(c) (is_ascii(c) && isalnum(c))
/* Scanning macros */
#define isidchar(ch) (is_alnum(ch) || (ch) == '_')
#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_')
/* Forward references */
char *ppdirforward();
char *ppdirbackward();
char *skipspace();
char *scanstring();
int writeblanks();
int test1();
int convert1();
/* The main program */
int
main(argc, argv)
int argc;
char *argv[];
{ FILE *in = stdin;
FILE *out = stdout;
char *filename = 0;
char *program_name = argv[0];
char *output_name = 0;
#define bufsize 5000 /* arbitrary size */
char *buf;
char *line;
char *more;
char *usage =
"Usage: ansi2knr [--filename FILENAME] [INPUT_FILE [OUTPUT_FILE]]\n";
/*
* In previous versions, ansi2knr recognized a --varargs switch.
* If this switch was supplied, ansi2knr would attempt to convert
* a ... argument to va_alist and va_dcl; if this switch was not
* supplied, ansi2knr would simply drop any such arguments.
* Now, ansi2knr always does this conversion, and we only
* check for this switch for backward compatibility.
*/
int convert_varargs = 1;
int output_error;
while ( argc > 1 && argv[1][0] == '-' ) {
if ( !strcmp(argv[1], "--varargs") ) {
convert_varargs = 1;
argc--;
argv++;
continue;
}
if ( !strcmp(argv[1], "--filename") && argc > 2 ) {
filename = argv[2];
argc -= 2;
argv += 2;
continue;
}
fprintf(stderr, "%s: Unrecognized switch: %s\n", program_name,
argv[1]);
fprintf(stderr, usage);
exit(1);
}
switch ( argc )
{
default:
fprintf(stderr, usage);
exit(0);
case 3:
output_name = argv[2];
out = fopen(output_name, "w");
if ( out == NULL ) {
fprintf(stderr, "%s: Cannot open output file %s\n",
program_name, output_name);
exit(1);
}
/* falls through */
case 2:
in = fopen(argv[1], "r");
if ( in == NULL ) {
fprintf(stderr, "%s: Cannot open input file %s\n",
program_name, argv[1]);
exit(1);
}
if ( filename == 0 )
filename = argv[1];
/* falls through */
case 1:
break;
}
if ( filename )
fprintf(out, "#line 1 \"%s\"\n", filename);
buf = malloc(bufsize);
if ( buf == NULL )
{
fprintf(stderr, "Unable to allocate read buffer!\n");
exit(1);
}
line = buf;
while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL )
{
test: line += strlen(line);
switch ( test1(buf) )
{
case 2: /* a function header */
convert1(buf, out, 1, convert_varargs);
break;
case 1: /* a function */
/* Check for a { at the start of the next line. */
more = ++line;
f: if ( line >= buf + (bufsize - 1) ) /* overflow check */
goto wl;
if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL )
goto wl;
switch ( *skipspace(ppdirforward(more), 1) )
{
case '{':
/* Definitely a function header. */
convert1(buf, out, 0, convert_varargs);
fputs(more, out);
break;
case 0:
/* The next line was blank or a comment: */
/* keep scanning for a non-comment. */
line += strlen(line);
goto f;
default:
/* buf isn't a function header, but */
/* more might be. */
fputs(buf, out);
strcpy(buf, more);
line = buf;
goto test;
}
break;
case -1: /* maybe the start of a function */
if ( line != buf + (bufsize - 1) ) /* overflow check */
continue;
/* falls through */
default: /* not a function */
wl: fputs(buf, out);
break;
}
line = buf;
}
if ( line != buf )
fputs(buf, out);
free(buf);
if ( output_name ) {
output_error = ferror(out);
output_error |= fclose(out);
} else { /* out == stdout */
fflush(out);
output_error = ferror(out);
}
if ( output_error ) {
fprintf(stderr, "%s: error writing to %s\n", program_name,
(output_name ? output_name : "stdout"));
exit(1);
}
if ( in != stdin )
fclose(in);
return 0;
}
/*
* Skip forward or backward over one or more preprocessor directives.
*/
char *
ppdirforward(p)
char *p;
{
for (; *p == '#'; ++p) {
for (; *p != '\r' && *p != '\n'; ++p)
if (*p == 0)
return p;
if (*p == '\r' && p[1] == '\n')
++p;
}
return p;
}
char *
ppdirbackward(p, limit)
char *p;
char *limit;
{
char *np = p;
for (;; p = --np) {
if (*np == '\n' && np[-1] == '\r')
--np;
for (; np > limit && np[-1] != '\r' && np[-1] != '\n'; --np)
if (np[-1] == 0)
return np;
if (*np != '#')
return p;
}
}
/*
* Skip over whitespace, comments, and preprocessor directives,
* in either direction.
*/
char *
skipspace(p, dir)
char *p;
int dir; /* 1 for forward, -1 for backward */
{
for ( ; ; ) {
while ( is_space(*p) )
p += dir;
if ( !(*p == '/' && p[dir] == '*') )
break;
p += dir; p += dir;
while ( !(*p == '*' && p[dir] == '/') ) {
if ( *p == 0 )
return p; /* multi-line comment?? */
p += dir;
}
p += dir; p += dir;
}
return p;
}
/* Scan over a quoted string, in either direction. */
char *
scanstring(p, dir)
char *p;
int dir;
{
for (p += dir; ; p += dir)
if (*p == '"' && p[-dir] != '\\')
return p + dir;
}
/*
* Write blanks over part of a string.
* Don't overwrite end-of-line characters.
*/
int
writeblanks(start, end)
char *start;
char *end;
{ char *p;
for ( p = start; p < end; p++ )
if ( *p != '\r' && *p != '\n' )
*p = ' ';
return 0;
}
/*
* Test whether the string in buf is a function definition.
* The string may contain and/or end with a newline.
* Return as follows:
* 0 - definitely not a function definition;
* 1 - definitely a function definition;
* 2 - definitely a function prototype (NOT USED);
* -1 - may be the beginning of a function definition,
* append another line and look again.
* The reason we don't attempt to convert function prototypes is that
* Ghostscript's declaration-generating macros look too much like
* prototypes, and confuse the algorithms.
*/
int
test1(buf)
char *buf;
{ char *p = buf;
char *bend;
char *endfn;
int contin;
if ( !isidfirstchar(*p) )
return 0; /* no name at left margin */
bend = skipspace(ppdirbackward(buf + strlen(buf) - 1, buf), -1);
switch ( *bend )
{
case ';': contin = 0 /*2*/; break;
case ')': contin = 1; break;
case '{': return 0; /* not a function */
case '}': return 0; /* not a function */
default: contin = -1;
}
while ( isidchar(*p) )
p++;
endfn = p;
p = skipspace(p, 1);
if ( *p++ != '(' )
return 0; /* not a function */
p = skipspace(p, 1);
if ( *p == ')' )
return 0; /* no parameters */
/* Check that the apparent function name isn't a keyword. */
/* We only need to check for keywords that could be followed */
/* by a left parenthesis (which, unfortunately, is most of them). */
{ static char *words[] =
{ "asm", "auto", "case", "char", "const", "double",
"extern", "float", "for", "if", "int", "long",
"register", "return", "short", "signed", "sizeof",
"static", "switch", "typedef", "unsigned",
"void", "volatile", "while", 0
};
char **key = words;
char *kp;
unsigned len = endfn - buf;
while ( (kp = *key) != 0 )
{ if ( strlen(kp) == len && !strncmp(kp, buf, len) )
return 0; /* name is a keyword */
key++;
}
}
{
char *id = p;
int len;
/*
* Check for identifier1(identifier2) and not
* identifier1(void), or identifier1(identifier2, xxxx).
*/
while ( isidchar(*p) )
p++;
len = p - id;
p = skipspace(p, 1);
if (*p == ',' ||
(*p == ')' && (len != 4 || strncmp(id, "void", 4)))
)
return 0; /* not a function */
}
/*
* If the last significant character was a ), we need to count
* parentheses, because it might be part of a formal parameter
* that is a procedure.
*/
if (contin > 0) {
int level = 0;
for (p = skipspace(buf, 1); *p; p = skipspace(p + 1, 1))
level += (*p == '(' ? 1 : *p == ')' ? -1 : 0);
if (level > 0)
contin = -1;
}
return contin;
}
/* Convert a recognized function definition or header to K&R syntax. */
int
convert1(buf, out, header, convert_varargs)
char *buf;
FILE *out;
int header; /* Boolean */
int convert_varargs; /* Boolean */
{ char *endfn;
char *p;
/*
* The breaks table contains pointers to the beginning and end
* of each argument.
*/
char **breaks;
unsigned num_breaks = 2; /* for testing */
char **btop;
char **bp;
char **ap;
char *vararg = 0;
/* Pre-ANSI implementations don't agree on whether strchr */
/* is called strchr or index, so we open-code it here. */
for ( endfn = buf; *(endfn++) != '('; )
;
top: p = endfn;
breaks = (char **)malloc(sizeof(char *) * num_breaks * 2);
if ( breaks == NULL )
{ /* Couldn't allocate break table, give up */
fprintf(stderr, "Unable to allocate break table!\n");
fputs(buf, out);
return -1;
}
btop = breaks + num_breaks * 2 - 2;
bp = breaks;
/* Parse the argument list */
do
{ int level = 0;
char *lp = NULL;
char *rp = NULL;
char *end = NULL;
if ( bp >= btop )
{ /* Filled up break table. */
/* Allocate a bigger one and start over. */
free((char *)breaks);
num_breaks <<= 1;
goto top;
}
*bp++ = p;
/* Find the end of the argument */
for ( ; end == NULL; p++ )
{ switch(*p)
{
case ',':
if ( !level ) end = p;
break;
case '(':
if ( !level ) lp = p;
level++;
break;
case ')':
if ( --level < 0 ) end = p;
else rp = p;
break;
case '/':
if (p[1] == '*')
p = skipspace(p, 1) - 1;
break;
case '"':
p = scanstring(p, 1) - 1;
break;
default:
;
}
}
/* Erase any embedded prototype parameters. */
if ( lp && rp )
writeblanks(lp + 1, rp);
p--; /* back up over terminator */
/* Find the name being declared. */
/* This is complicated because of procedure and */
/* array modifiers. */
for ( ; ; )
{ p = skipspace(p - 1, -1);
switch ( *p )
{
case ']': /* skip array dimension(s) */
case ')': /* skip procedure args OR name */
{ int level = 1;
while ( level )
switch ( *--p )
{
case ']': case ')':
level++;
break;
case '[': case '(':
level--;
break;
case '/':
if (p > buf && p[-1] == '*')
p = skipspace(p, -1) + 1;
break;
case '"':
p = scanstring(p, -1) + 1;
break;
default: ;
}
}
if ( *p == '(' && *skipspace(p + 1, 1) == '*' )
{ /* We found the name being declared */
while ( !isidfirstchar(*p) )
p = skipspace(p, 1) + 1;
goto found;
}
break;
default:
goto found;
}
}
found: if ( *p == '.' && p[-1] == '.' && p[-2] == '.' )
{ if ( convert_varargs )
{ *bp++ = "va_alist";
vararg = p-2;
}
else
{ p++;
if ( bp == breaks + 1 ) /* sole argument */
writeblanks(breaks[0], p);
else
writeblanks(bp[-1] - 1, p);
bp--;
}
}
else
{ while ( isidchar(*p) ) p--;
*bp++ = p+1;
}
p = end;
}
while ( *p++ == ',' );
*bp = p;
/* Make a special check for 'void' arglist */
if ( bp == breaks+2 )
{ p = skipspace(breaks[0], 1);
if ( !strncmp(p, "void", 4) )
{ p = skipspace(p+4, 1);
if ( p == breaks[2] - 1 )
{ bp = breaks; /* yup, pretend arglist is empty */
writeblanks(breaks[0], p + 1);
}
}
}
/* Put out the function name and left parenthesis. */
p = buf;
while ( p != endfn ) putc(*p, out), p++;
/* Put out the declaration. */
if ( header )
{ fputs(");", out);
for ( p = breaks[0]; *p; p++ )
if ( *p == '\r' || *p == '\n' )
putc(*p, out);
}
else
{ for ( ap = breaks+1; ap < bp; ap += 2 )
{ p = *ap;
while ( isidchar(*p) )
putc(*p, out), p++;
if ( ap < bp - 1 )
fputs(", ", out);
}
fputs(") ", out);
/* Put out the argument declarations */
for ( ap = breaks+2; ap <= bp; ap += 2 )
(*ap)[-1] = ';';
if ( vararg != 0 )
{ *vararg = 0;
fputs(breaks[0], out); /* any prior args */
fputs("va_dcl", out); /* the final arg */
fputs(bp[0], out);
}
else
fputs(breaks[0], out);
}
free((char *)breaks);
return 0;
}
+1009
View File
File diff suppressed because it is too large Load Diff
+120
View File
@@ -0,0 +1,120 @@
/* hash - hashing table processing.
Copyright (C) 1998, 1999 Free Software Foundation, Inc.
Written by Jim Meyering <meyering@ascend.com>, 1998.
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. */
/* A generic hash table package. */
/* Make sure USE_OBSTACK is defined to 1 if you want the allocator to use
obstacks instead of malloc, and recompile `hash.c' with same setting. */
#ifndef PARAMS
# if PROTOTYPES || __STDC__
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
#endif
typedef unsigned (*Hash_hasher) PARAMS ((const void *, unsigned));
typedef bool (*Hash_comparator) PARAMS ((const void *, const void *));
typedef void (*Hash_data_freer) PARAMS ((void *));
typedef bool (*Hash_processor) PARAMS ((void *, void *));
struct hash_entry
{
void *data;
struct hash_entry *next;
};
struct hash_tuning
{
/* This structure is mainly used for `hash_initialize', see the block
documentation of `hash_reset_tuning' for more complete comments. */
float shrink_threshold; /* ratio of used buckets to trigger a shrink */
float shrink_factor; /* ratio of new smaller size to original size */
float growth_threshold; /* ratio of used buckets to trigger a growth */
float growth_factor; /* ratio of new bigger size to original size */
bool is_n_buckets; /* if CANDIDATE really means table size */
};
typedef struct hash_tuning Hash_tuning;
struct hash_table
{
/* The array of buckets starts at BUCKET and extends to BUCKET_LIMIT-1,
for a possibility of N_BUCKETS. Among those, N_BUCKETS_USED buckets
are not empty, there are N_ENTRIES active entries in the table. */
struct hash_entry *bucket;
struct hash_entry *bucket_limit;
unsigned n_buckets;
unsigned n_buckets_used;
unsigned n_entries;
/* Tuning arguments, kept in a physicaly separate structure. */
const Hash_tuning *tuning;
/* Three functions are given to `hash_initialize', see the documentation
block for this function. In a word, HASHER randomizes a user entry
into a number up from 0 up to some maximum minus 1; COMPARATOR returns
true if two user entries compare equally; and DATA_FREER is the cleanup
function for a user entry. */
Hash_hasher hasher;
Hash_comparator comparator;
Hash_data_freer data_freer;
/* A linked list of freed struct hash_entry structs. */
struct hash_entry *free_entry_list;
#if USE_OBSTACK
/* Whenever obstacks are used, it is possible to allocate all overflowed
entries into a single stack, so they all can be freed in a single
operation. It is not clear if the speedup is worth the trouble. */
struct obstack entry_stack;
#endif
};
typedef struct hash_table Hash_table;
/* Information and lookup. */
unsigned hash_get_n_buckets PARAMS ((const Hash_table *));
unsigned hash_get_n_buckets_used PARAMS ((const Hash_table *));
unsigned hash_get_n_entries PARAMS ((const Hash_table *));
unsigned hash_get_max_bucket_length PARAMS ((const Hash_table *));
bool hash_table_ok PARAMS ((const Hash_table *));
void hash_print_statistics PARAMS ((const Hash_table *, FILE *));
void *hash_lookup PARAMS ((const Hash_table *, const void *));
/* Walking. */
void *hash_get_first PARAMS ((const Hash_table *));
void *hash_get_next PARAMS ((const Hash_table *, const void *));
unsigned hash_get_entries PARAMS ((const Hash_table *, void **, unsigned));
unsigned hash_do_for_each PARAMS ((const Hash_table *, Hash_processor, void *));
/* Allocation and clean-up. */
unsigned hash_string PARAMS ((const char *, unsigned));
void hash_reset_tuning PARAMS ((Hash_tuning *));
Hash_table *hash_initialize PARAMS ((unsigned, const Hash_tuning *,
Hash_hasher, Hash_comparator,
Hash_data_freer));
void hash_clear PARAMS ((Hash_table *));
void hash_free PARAMS ((Hash_table *));
/* Insertion and deletion. */
bool hash_rehash PARAMS ((Hash_table *, unsigned));
void *hash_insert PARAMS ((Hash_table *, const void *));
void *hash_delete PARAMS ((Hash_table *, const void *));
+1
View File
@@ -1 +1,2 @@
Makefile
Makefile.in
-242
View File
@@ -1,242 +0,0 @@
# Makefile.in generated by automake 1.5c from Makefile.am.
# @configure_input@
# 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,
# 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_sh_DATA = $(install_sh) -c -m 644
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@
LIB = @LIB@
LIBICONV = @LIBICONV@
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 \
dmalloc.m4 \
error.m4 \
gettext.m4 \
glibc21.m4 \
iconv.m4 \
isc-posix.m4 \
lcmessage.m4 \
malloc.m4 \
mbrtowc.m4 \
mbstate_t.m4 \
prereq.m4 \
progtest.m4 \
realloc.m4 \
strerror_r.m4 \
warning.m4
subdir = m4
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
all: all-am
.SUFFIXES:
$(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)/$@ $(am__depfiles_maybe)
uninstall-info-am:
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 || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir)$$dir \
|| exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
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)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
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:
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic 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-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
# 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:
+3 -1
View File
@@ -1,6 +1,8 @@
ChangeLog
Makefile Makefile.in
Makefile
Makefile.in
POTFILES
bison.pot
stamp-cat-id
*.gmo
Makefile.in
+11 -1
View File
@@ -1,6 +1,16 @@
2002-01-21 gettextize <[email protected]>
2001-10-10 gettextize <[email protected]>
* Makefile.in.in: Upgrade to gettext-0.10.40.
* cat-id-tbl.c: Remove file.
2001-10-08 gettextize <[email protected]>
* Makefile.in.in: Upgrade to gettext-0.10.40.
2001-10-04 gettextize <[email protected]>
* Makefile.in.in: Upgrade to gettext-0.10.40.
* cat-id-tbl.c: Remove file.
2001-09-27 gettextize <[email protected]>
+1
View File
@@ -5,6 +5,7 @@ src/files.c
src/getargs.c
src/lalr.c
src/lex.c
src/main.c
src/output.c
src/print.c
src/print_graph.c
+447 -352
View File
File diff suppressed because it is too large Load Diff
+252 -268
View File
File diff suppressed because it is too large Load Diff
+265 -219
View File
@@ -4,17 +4,16 @@
#
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 16:27+0200\n"
"Project-Id-Version: bison 1.28d\n"
"POT-Creation-Date: 2002-01-29 17:17+0100\n"
"PO-Revision-Date: 2001-08-29 17:06+02:00\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:189
#: src/LR0.c:194
#, c-format
msgid "too many states (max %d)"
msgstr "liiga palju olekuid (maks %d)"
@@ -31,119 +30,93 @@ msgstr "hoiatus: "
msgid "fatal error: "
msgstr "fataalne viga: "
#: src/conflicts.c:44
#: src/conflicts.c:46
#, 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:94 src/conflicts.c:119
#: src/conflicts.c:111 src/conflicts.c:133
msgid "reduce"
msgstr "redutseerimine"
#: src/conflicts.c:101 src/conflicts.c:115
#: src/conflicts.c:116 src/conflicts.c:128
msgid "shift"
msgstr "nihutamine"
#: src/conflicts.c:123
#: src/conflicts.c:138
msgid "an error"
msgstr "viga"
#: src/conflicts.c:302
#, c-format
#: src/conflicts.c:291
#, fuzzy, c-format
msgid "%d shift/reduce conflict"
msgid_plural "%d shift/reduce conflicts"
msgstr[0] "%d nihutamine/redutseerimine konflikt"
msgstr[1] "%d nihutamine/redutseerimine konflikti"
msgstr[0] " %d nihutamine/redutseerimine konflikti"
#: src/conflicts.c:309
#: src/conflicts.c:298
#, fuzzy
msgid "and"
msgstr "ja"
msgstr " ja"
#: src/conflicts.c:315
#, c-format
#: src/conflicts.c:304
#, fuzzy, c-format
msgid "%d reduce/reduce conflict"
msgid_plural "%d reduce/reduce conflicts"
msgstr[0] "%d redutseerimine/redutseerimine konflikt"
msgstr[1] "%d redutseerimine/redutseerimine konflikti"
msgstr[0] " %d redutseerimine/redutseerimine konflikti"
#: src/conflicts.c:340
#, c-format
#: src/conflicts.c:329
#, fuzzy, c-format
msgid "State %d contains "
msgstr "Olek %d sisaldab "
msgstr "Olek %d sisaldab"
#. If invoked with `--yacc', use the output format specified by
#. POSIX.
#: src/conflicts.c:387
#: src/conflicts.c:376
msgid "conflicts: "
msgstr "konfliktid: "
#: src/conflicts.c:389
#: src/conflicts.c:378
#, c-format
msgid " %d shift/reduce"
msgstr " %d nihutamine/redutseerimine"
#: src/conflicts.c:393
#: src/conflicts.c:382
#, c-format
msgid " %d reduce/reduce"
msgstr " %d redutseerimine/redutseerimine"
#: src/conflicts.c:398 src/reduce.c:508
#: src/conflicts.c:387 src/reduce.c:499
#, c-format
msgid "%s contains "
msgstr "%s sisaldab "
#: src/conflicts.c:412
#, c-format
#: src/conflicts.c:394
#, fuzzy, 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"
msgstr[0] " %d nihutamine/redutseerimine konflikti"
#: 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:467 src/print.c:154
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
"\n"
msgstr ""
" $default\tredutseerin kasutades reeglit %d (%s)\n"
"\n"
#: 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:550
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\tredutseerin kasutades reeglit %d (%s)\n"
#: src/files.c:151
#: src/files.c:159
#, c-format
msgid "cannot open file `%s'"
msgstr "faili `%s' ei saa avada"
#: src/files.c:170
#: src/files.c:178
msgid "cannot close file"
msgstr "faili ei õnnestu sulgeda"
#. Some efforts were made to ease the translators' task, please
#. continue.
#: src/getargs.c:84
#: src/getargs.c:55
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
msgstr "GNU bison genereerib parsereid LALR(1) grammatikatele.\n"
#: src/getargs.c:88
#: src/getargs.c:59
#, c-format
msgid "Usage: %s [OPTION]... FILE\n"
msgstr "Kasuta: %s [VÕTI]...FAIL\n"
#: src/getargs.c:92
#: src/getargs.c:63
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"
@@ -151,7 +124,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:98
#: src/getargs.c:69
msgid ""
"Operation modes:\n"
" -h, --help display this help and exit\n"
@@ -163,7 +136,7 @@ msgstr ""
" -V, --version esita versiooniinfo ja lõpeta töö\n"
" -y, --yacc emuleeri POSIX yacc\n"
#: src/getargs.c:105
#: src/getargs.c:76
msgid ""
"Parser:\n"
" -S, --skeleton=FILE specify the skeleton to use\n"
@@ -183,7 +156,8 @@ msgstr ""
" -n, --no-parser genereeri ainult tabelid\n"
" -k, --token-table lisa ka sümbolite nimede tabel\n"
#: src/getargs.c:117
#: src/getargs.c:88
#, fuzzy
msgid ""
"Output:\n"
" -d, --defines also produce a header file\n"
@@ -200,26 +174,25 @@ msgstr ""
" -o, --output-file=FAIL jäta väljund FAILi\n"
" -g, --graph loo automaadi kirjeldus VCG graafina\n"
#: src/getargs.c:127
#: src/getargs.c:98
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:141
#: src/getargs.c:112
#, c-format
msgid "bison (GNU Bison) %s"
msgstr "bison (GNU Bison) %s"
#: src/getargs.c:146
#: src/getargs.c:117
msgid ""
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
"Free Software Foundation, Inc.\n"
"Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"
msgstr ""
"Autoriõigus 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
"Free Software Foundation, Inc.\n"
"Autoriõigus 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, "
"Inc.\n"
#: src/getargs.c:151
#: src/getargs.c:121
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"
@@ -227,456 +200,451 @@ 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:230 src/lex.c:705
#: src/getargs.c:200 src/lex.c:599
#, c-format
msgid "`%s' is no longer supported"
msgstr "`%s' ei ole enam toetatud"
#: src/getargs.c:254
#: src/getargs.c:224
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "Lisainfo saamiseks proovige `%s --help'.\n"
#: src/getargs.c:261
#: src/getargs.c:233
#, c-format
msgid "%s: no grammar file given\n"
msgstr "%s: puudub grammatikafail\n"
#: src/getargs.c:265
#: src/getargs.c:237
#, c-format
msgid "%s: extra arguments ignored after `%s'\n"
msgstr "%s: ignoreerin lisaargumente peale `%s'\n"
#: src/lalr.c:256
#: src/lalr.c:175
#, c-format
msgid "too many gotos (max %d)"
msgstr "liiga palju gotosid (maks %d)"
#: src/lex.c:76
#: src/lex.c:77
msgid "unexpected `/' found and ignored"
msgstr "leidsin ja ignoreerin ootamatu `/'"
#: src/lex.c:105 src/reader.c:280
#: src/lex.c:106 src/reader.c:302
msgid "unterminated comment"
msgstr "lõpetamata kommentaar"
#: src/lex.c:137
#: src/lex.c:138
msgid "unexpected end of file"
msgstr "ootamatu faililõpp"
#: src/lex.c:166
#: src/lex.c:157
msgid "unescaped newline in constant"
msgstr "paojadata reavahetus konstandis"
#: src/lex.c:208
#: src/lex.c:196
#, c-format
msgid "octal value outside range 0...255: `\\%o'"
msgstr "kaheksandväärtus väljaspool piire 0...255: `\\%o'"
#: src/lex.c:233
#: src/lex.c:221
#, c-format
msgid "hexadecimal value above 255: `\\x%x'"
msgstr "kuueteistkümnendväärtus suurem, kui above 255: `\\x%x'"
#: src/lex.c:245
#: src/lex.c:233
#, c-format
msgid "unknown escape sequence: `\\' followed by `%s'"
msgstr "tundmatu paojada: `\\' järgneb `%s'"
#: src/lex.c:342
#: src/lex.c:264
msgid "unterminated type name at end of file"
msgstr "lõpetamata tüübinimi faili lõpus"
#: src/lex.c:345
#: src/lex.c:267
msgid "unterminated type name"
msgstr "lõpetamata tüübinimi"
#: src/lex.c:438
#: src/lex.c:359
msgid "use \"...\" for multi-character literal tokens"
msgstr "kasuta mitmesümboliliste literaalidega \"...\" konstruktsiooni"
#: src/lex.c:678
#: src/lex.c:571
#, c-format
msgid "`%s' supports no argument: %s"
msgstr "`%s' ei toeta argumente: %s"
msgstr ""
#: src/lex.c:694
#, c-format
#: src/lex.c:588
#, fuzzy, c-format
msgid "`%s' requires an argument"
msgstr "võti `%s' nõuab argumenti"
msgstr "%s: võti `%s' nõuab argumenti\n"
#: src/output.c:951
#: src/output.c:804
#, c-format
msgid "maximum table size (%d) exceeded"
msgstr "ületati maksimaalset tabelisuurust (%d)"
#: src/print.c:39
#: src/print.c:44
#, c-format
msgid " type %d is %s\n"
msgstr " tüüp %d on %s\n"
#: src/print.c:88
#: src/print.c:106
#, c-format
msgid " (rule %d)"
msgstr " (reegel %d)"
#: src/print.c:108
msgid " $default\taccept\n"
msgstr " $default\taktsepteerin\n"
#: src/print.c:110
msgid " NO ACTIONS\n"
msgstr " TEGEVUSI POLE\n"
#: src/print.c:124
#, c-format
msgid " $ \tgo to state %d\n"
msgstr " $ \tliigu olekule %d\n"
#: 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:142
#: src/print.c:144
#, c-format
msgid " %-4s\terror (nonassociative)\n"
msgstr " %-4s\tviga (mitteassotsiatiivne)\n"
#: src/print.c:169
#: src/print.c:168
#, c-format
msgid " %-4s\tgo to state %d\n"
msgstr " %-4s\tliigu olekule %d\n"
#: src/print.c:180
#: src/print.c:192 src/print.c:228
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
"\n"
msgstr ""
" $default\tredutseerin kasutades reeglit %d (%s)\n"
"\n"
#: src/print.c:224 src/print.c:301
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[redutseerin, kasutades reeglit %d (%s)]\n"
#: src/print.c:282 src/print.c:295
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\tredutseerin kasutades reeglit %d (%s)\n"
#: src/print.c:311
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\tredutseerin kasutades reeglit %d (%s)\n"
#: src/print.c:327
msgid " $default\taccept\n"
msgstr " $default\taktsepteerin\n"
#: src/print.c:329
msgid " NO ACTIONS\n"
msgstr " TEGEVUSI POLE\n"
#: src/print.c:342
#, c-format
msgid "state %d"
msgstr "olek %d"
#. rule # : LHS -> RHS
#: src/print.c:211
#: src/print.c:373
msgid "Grammar"
msgstr "Grammatika"
#: src/print.c:212
#: src/print.c:374
msgid "Number, Line, Rule"
msgstr "Number, rida, reegel"
msgstr ""
#: src/print.c:217
#, c-format
#: src/print.c:379
#, fuzzy, c-format
msgid " %3d %3d %s ->"
msgstr " %3d %3d %s ->"
msgstr "reegel %-4d %s ->"
#: src/print.c:224
#: src/print.c:386
msgid "empty"
msgstr "tühi"
msgstr ""
#. TERMINAL (type #) : rule #s terminal is on RHS
#: src/print.c:231
#: src/print.c:393
msgid "Terminals, with rules where they appear"
msgstr "Terminalid, koos reeglitega, kus nad ilmuvad"
#: src/print.c:256
#: src/print.c:416
msgid "Nonterminals, with rules where they appear"
msgstr "Mitteterminalid, koos reeglitega, kus nad ilmuvad"
#: src/print.c:282
#: src/print.c:442
msgid " on left:"
msgstr " vasakul:"
#: src/print.c:297
#: src/print.c:457
msgid " on right:"
msgstr " paremal:"
#. 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)"
#.
#. 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:89
#: src/reader.c:100
msgid " Skipping to next \\n"
msgstr " Liigun järgmisele \\n"
#: src/reader.c:91
#: src/reader.c:102
#, c-format
msgid " Skipping to next %c"
msgstr " Liigun järgmisele %c"
#: src/reader.c:142 src/reader.c:154
#: src/reader.c:153 src/reader.c:165
msgid "invalid $ value"
msgstr "vigane $ väärtus"
#: src/reader.c:180 src/reader.c:195
#: src/reader.c:192 src/reader.c:207
msgid "unterminated string at end of file"
msgstr "lõpetamata sõne faili lõpus"
#: src/reader.c:183
#: src/reader.c:195
msgid "unterminated string"
msgstr "lõpetamata sõne"
#: src/reader.c:339
msgid "invalid @ value"
msgstr "vigane @ väärtus"
#: src/reader.c:337 src/reader.c:401
#, fuzzy, c-format
msgid "invalid value: %s%d"
msgstr "vigane $ väärtus"
#: src/reader.c:352 src/reader.c:416
#: src/reader.c:351 src/reader.c:423
#, c-format
msgid "%s is invalid"
msgstr "%s on vigane"
#: src/reader.c:392
#: src/reader.c:391
#, c-format
msgid "$$ of `%s' has no declared type"
msgstr "`%s' $$ ei oma deklareeritud tüüpi"
#: src/reader.c:409
#: src/reader.c:415
#, c-format
msgid "$%d of `%s' has no declared type"
msgstr "$%d `%s' ei oma deklareeritud tüüpi"
#: src/reader.c:463
#: src/reader.c:473
msgid "unterminated `%{' definition"
msgstr "lõpetamata `%{' definitsioon"
#: src/reader.c:508 src/reader.c:623 src/reader.c:673
#: src/reader.c:518 src/reader.c:636 src/reader.c:686 src/reader.c:933
#, c-format
msgid "Premature EOF after %s"
msgstr "Enneaegne EOF peale %s"
#: src/reader.c:525
#: src/reader.c:535
#, 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:528
#: src/reader.c:538
#, 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:549 src/reader.c:692
#: src/reader.c:559 src/reader.c:705
#, c-format
msgid "symbol %s redefined"
msgstr "sümbol %s on uuesti defineeritud"
#: src/reader.c:559 src/reader.c:638 src/reader.c:699 src/reader.c:1314
#: src/reader.c:569 src/reader.c:651 src/reader.c:712
#, c-format
msgid "type redeclaration for %s"
msgstr "%s tüübi uuesti deklareerimine"
#: src/reader.c:568
#: src/reader.c:581
#, c-format
msgid "`%s' is invalid in %s"
msgstr "`%s' ei ole %s sees lubatud"
#: src/reader.c:586 src/reader.c:751
#: src/reader.c:599 src/reader.c:758
#, c-format
msgid "multiple %s declarations"
msgstr "korduvad %s deklaratsioonid"
#: src/reader.c:588 src/reader.c:930 src/reader.c:955 src/reader.c:1292
#: src/reader.c:601 src/reader.c:913 src/reader.c:928 src/reader.c:961
#: src/reader.c:975 src/reader.c:1178
#, c-format
msgid "invalid %s declaration"
msgstr "vigane %s deklaratsioon"
#: src/reader.c:608
#: src/reader.c:621
msgid "%type declaration has no <typename>"
msgstr "%type deklaratsioonis puudub <tüübinimi>"
#: src/reader.c:643
#: src/reader.c:656
#, c-format
msgid "invalid %%type declaration due to item: %s"
msgstr "vigane %%type deklaratsioon, element: %s"
#: src/reader.c:688
#: src/reader.c:701
#, c-format
msgid "redefining precedence of %s"
msgstr "%s prioriteedi uus definitsioon"
#: src/reader.c:711
#: src/reader.c:724
#, c-format
msgid "invalid text (%s) - number should be after identifier"
msgstr "vigane tekst (%s) - number peab olema peale identifikaatorit"
#: src/reader.c:721
#: src/reader.c:734
#, c-format
msgid "unexpected item: %s"
msgstr "ootamatu element: %s"
#: src/reader.c:794 src/reader.c:1126 src/reader.c:1203
#: src/reader.c:790 src/reader.c:1149
#, c-format
msgid "unmatched %s"
msgstr "puudub %s"
#: src/reader.c:826
#: src/reader.c:819
#, c-format
msgid "argument of %%expect is not an integer"
msgstr "%%expect argument ei ole täisarv"
#: src/reader.c:872
#: src/reader.c:865
#, c-format
msgid "unrecognized item %s, expected an identifier"
msgstr "tundmatu element %s, eeldasin identifikaatorit"
#: src/reader.c:894
#: src/reader.c:887
#, c-format
msgid "expected string constant instead of %s"
msgstr "eeldasin %s asemel sõnekonstanti"
#: src/reader.c:1042
#: src/reader.c:1080
#, c-format
msgid "unrecognized: %s"
msgstr "tundmatu: %s"
#: src/reader.c:1047
#: src/reader.c:1085
msgid "no input grammar"
msgstr "sisendgrammatikat pole"
#: src/reader.c:1052
#: src/reader.c:1090
#, c-format
msgid "unknown character: %s"
msgstr "tundmatu sümbol: %s"
#: src/reader.c:1226
#, c-format
msgid "unterminated %guard clause"
msgstr "lõpetamata %guard klausel"
#: src/reader.c:1379
#: src/reader.c:1265
msgid "ill-formed rule: initial symbol not followed by colon"
msgstr "vigaselt formeeritud reegel: algsümbolile ei järgne koolonit"
#: src/reader.c:1386
#: src/reader.c:1272
msgid "grammar starts with vertical bar"
msgstr "grammatika algab püstkriipsuga"
#: src/reader.c:1414
#: src/reader.c:1300
#, 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:1444 src/reader.c:1556
msgid "previous rule lacks an ending `;'"
msgstr "eelmisel reeglil puudub lõpetav `;'"
#: src/reader.c:1517
#: src/reader.c:1405
msgid "two @prec's in a row"
msgstr "kaks @prec ühel real"
#: src/reader.c:1525
#: src/reader.c:1414
#, c-format
msgid "%%guard present but %%semantic_parser not specified"
msgstr "%%guard on määratud, aga %%semantic_parser ei ole"
#: src/reader.c:1534
#: src/reader.c:1424
msgid "two actions at end of one rule"
msgstr "kaks tegevust ühe reegli lõpus"
#: src/reader.c:1548
#: src/reader.c:1438
#, c-format
msgid "type clash (`%s' `%s') on default action"
msgstr "vaikimisi tegevuse tüübikonflikt (`%s' `%s')"
#: src/reader.c:1554
#: src/reader.c:1444
msgid "empty rule for typed nonterminal, and no action"
msgstr "tüübiga mitteterminalil on tühi reegel ja puudub tegevus"
#: src/reader.c:1600
#: src/reader.c:1450
#, c-format
msgid "invalid input: %s"
msgstr "vigane sisend: %s"
#: 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:1611
#: src/reader.c:1457
msgid "no rules in the input grammar"
msgstr "sisendgrammatikas pole reegleid"
#: src/reader.c:1635
#: src/reader.c:1465
#, 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:1770
#: src/reader.c:1487
#, 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:1551
#, 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:1823
#: src/reader.c:1601
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "%s ja %s omavad konfliktseid prioriteete"
#: src/reader.c:1835
#: src/reader.c:1613
#, c-format
msgid "conflicting assoc values for %s and %s"
msgstr "%s ja %s omavad konfliktseid assotsiatiivseid väärtuseid"
#: src/reader.c:1874
#: src/reader.c:1650
#, c-format
msgid "the start symbol %s is undefined"
msgstr "stardisümbol %s ei ole defineeritud"
#: src/reader.c:1876
#: src/reader.c:1652
#, c-format
msgid "the start symbol %s is a token"
msgstr "stardisümbol %s on märk"
#: src/reduce.c:409
#: src/reader.c:1672
#, fuzzy, c-format
msgid "too many items (max %d)"
msgstr "liiga palju olekuid (maks %d)"
#: src/reduce.c:398
msgid "Useless nonterminals:"
msgstr "Kasutamata mitteterminalid:"
#: src/reduce.c:422
#: src/reduce.c:411
msgid "Terminals which are not used:"
msgstr "Terminalid, mida ei kasutatud:"
#: src/reduce.c:433
#: src/reduce.c:422
msgid "Useless rules:"
msgstr "Kasutamata reeglid:"
#: src/reduce.c:503
#, c-format
#: src/reduce.c:494
#, fuzzy, c-format
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"
msgstr[0] "%d reeglit ei redutseeritud\n"
#: src/reduce.c:511
#, c-format
#: src/reduce.c:502
#, fuzzy, c-format
msgid "%d useless nonterminal"
msgid_plural "%d useless nonterminals"
msgstr[0] "%d kasutamata mitteterminal"
msgstr[1] "%d kasutamata mitteterminali"
msgstr[0] "%d kasutamata mitteterminali%s"
#: src/reduce.c:517
#: src/reduce.c:508
msgid " and "
msgstr " ja "
#: src/reduce.c:520
#, c-format
#: src/reduce.c:511
#, fuzzy, c-format
msgid "%d useless rule"
msgid_plural "%d useless rules"
msgstr[0] "%d kasutamata reegel"
msgstr[1] "%d kasutamata reeglit"
msgstr[0] "%d kasutamata reeglit%s"
#: src/reduce.c:551
#: src/reduce.c:542
#, c-format
msgid "Start symbol %s does not derive any sentence"
msgstr "Stardisümbolist %s ei tuletata ühtegi lauset"
@@ -767,3 +735,81 @@ msgstr "`"
#: lib/quotearg.c:275
msgid "'"
msgstr "'"
#~ msgid "%-4s\terror (nonassociative)"
#~ msgstr "%-4s\tviga (mitteassotsiatiivne)"
#~ msgid "$default\treduce using rule %d (%s)"
#~ msgstr "$default\tredutseerin kasutades reeglit %d (%s)"
#~ msgid "unterminated %guard clause"
#~ msgstr "lõpetamata %guard klausel"
#~ msgid " $ \tgo to state %d\n"
#~ msgstr " $ \tliigu olekule %d\n"
#~ msgid "%s: internal error: %s\n"
#~ msgstr "%s: sisemine viga: %s\n"
#~ msgid ""
#~ "Variables\n"
#~ "---------\n"
#~ "\n"
#~ msgstr ""
#~ "Muutujad\n"
#~ "--------\n"
#~ "\n"
#~ msgid "Value Sprec Sassoc Tag\n"
#~ msgstr "Value Sprec Sassoc Tag\n"
#~ msgid ""
#~ "Rules\n"
#~ "-----\n"
#~ "\n"
#~ msgstr ""
#~ "Reeglid\n"
#~ "-------\n"
#~ "\n"
#~ msgid ""
#~ "Rules interpreted\n"
#~ "-----------------\n"
#~ "\n"
#~ msgstr ""
#~ "Interpreteeritud reeglid\n"
#~ "------------------------\n"
#~ "\n"
#~ msgid " 1 shift/reduce conflict"
#~ msgstr " 1 nihutamine/redutseerimine konflikt"
#~ msgid " 1 reduce/reduce conflict"
#~ msgstr " 1 redutseerimine/redutseerimine konflikt"
#~ msgid "%s contains"
#~ msgstr "%s sisaldab"
#~ msgid "DERIVES"
#~ msgstr "DERIVES"
#~ msgid "%s derives"
#~ msgstr "%s derives"
#~ msgid "Entering set_nullable"
#~ msgstr "Entering set_nullable"
#~ 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"
#~ msgid "\t\t/* empty */"
#~ msgstr "\t\t/* tühi */"
#~ msgid "multiple %%header_extension declarations"
#~ msgstr "korduvad %%header_extension eklaratsioonid"
#~ msgid "multiple %%source_extension declarations"
#~ msgstr "korduvad %%source_extension deklaratsioonid"
+233 -254
View File
@@ -5,17 +5,16 @@
#
msgid ""
msgstr ""
"Project-Id-Version: GNU bison 1.33b\n"
"POT-Creation-Date: 2002-03-04 19:13+0100\n"
"PO-Revision-Date: 2002-03-12 16:49+0100\n"
"Project-Id-Version: GNU bison 1.28d\n"
"POT-Creation-Date: 2002-01-29 17:17+0100\n"
"PO-Revision-Date: 2001-08-29 20:00-0500\n"
"Last-Translator: Michel Robitaille <[email protected]>\n"
"Language-Team: French <[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
#: src/LR0.c:194
#, c-format
msgid "too many states (max %d)"
msgstr "nombre trop grand d'états (max %d)"
@@ -32,129 +31,103 @@ msgstr "AVERTISSEMENT: "
msgid "fatal error: "
msgstr "erreur fatale: "
#: src/conflicts.c:44
#: src/conflicts.c:46
#, c-format
msgid "Conflict in state %d between rule %d and token %s resolved as %s.\n"
msgstr ""
"Conflit à l'état %d entre la règle %d et le terminal %s résolu par %s.\n"
#: src/conflicts.c:94 src/conflicts.c:119
#: src/conflicts.c:111 src/conflicts.c:133
msgid "reduce"
msgstr "réduction"
#: src/conflicts.c:101 src/conflicts.c:115
#: src/conflicts.c:116 src/conflicts.c:128
msgid "shift"
msgstr "décalage"
#: src/conflicts.c:123
#: src/conflicts.c:138
msgid "an error"
msgstr "une erreur"
#: src/conflicts.c:302
#, c-format
#: src/conflicts.c:291
#, fuzzy, c-format
msgid "%d shift/reduce conflict"
msgid_plural "%d shift/reduce conflicts"
msgstr[0] "%d conflit par décalage/réduction"
msgstr[1] "%d conflits par décalage/réduction"
msgstr[0] " %d conflits décalage/réduction"
#: src/conflicts.c:309
#: src/conflicts.c:298
#, fuzzy
msgid "and"
msgstr "et"
msgstr " et"
#: src/conflicts.c:315
#, c-format
#: src/conflicts.c:304
#, fuzzy, c-format
msgid "%d reduce/reduce conflict"
msgid_plural "%d reduce/reduce conflicts"
msgstr[0] "%d conflit par réduction/réduction"
msgstr[1] "%d conflits par réduction/réduction"
msgstr[0] " %d conflits réduction/réduction"
#: src/conflicts.c:340
#, c-format
#: src/conflicts.c:329
#, fuzzy, c-format
msgid "State %d contains "
msgstr "L'état %d contient "
msgstr "L'état %d contient"
#. If invoked with `--yacc', use the output format specified by
#. POSIX.
#: src/conflicts.c:387
#: src/conflicts.c:376
msgid "conflicts: "
msgstr "conflits: "
#: src/conflicts.c:389
#: src/conflicts.c:378
#, c-format
msgid " %d shift/reduce"
msgstr " %d décalage/réduction"
#: src/conflicts.c:393
#: src/conflicts.c:382
#, c-format
msgid " %d reduce/reduce"
msgstr " %d réduction/réduction"
#: src/conflicts.c:398 src/reduce.c:508
#: src/conflicts.c:387 src/reduce.c:499
#, c-format
msgid "%s contains "
msgstr "%s contient "
#: src/conflicts.c:412
#, c-format
#: src/conflicts.c:394
#, fuzzy, c-format
msgid "expected %d shift/reduce conflict\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] "attendait %d conflit par décalage/réduction\n"
msgstr[1] "attendait %d conflits par décalage/réduction\n"
msgstr[0] " %d conflits décalage/réduction"
#: src/conflicts.c:463 src/conflicts.c:540
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[réduction par la règle %d (%s)]\n"
#: src/conflicts.c:467 src/print.c:154
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
"\n"
msgstr ""
" $défaut\tréduction par la règle %d (%s)\n"
"\n"
#: src/conflicts.c:521 src/conflicts.c:534
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\tréduction par la règle %d (%s)\n"
#: src/conflicts.c:550
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $défaut\tréduction par la règle %d (%s)\n"
#: src/files.c:151
#: src/files.c:159
#, c-format
msgid "cannot open file `%s'"
msgstr "ne peut ouvrir le fichier «%s»"
msgstr "ne peut ouvrir le fichier `%s'"
#: src/files.c:170
#: src/files.c:178
msgid "cannot close file"
msgstr "ne peut fermer le fichier"
#. Some efforts were made to ease the translators' task, please
#. continue.
#: src/getargs.c:84
#: src/getargs.c:55
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
msgstr "GNU bison génère des analyseurs pour les grammaires de type LALR(1).\n"
#: src/getargs.c:88
#: src/getargs.c:59
#, c-format
msgid "Usage: %s [OPTION]... FILE\n"
msgstr "Usage: %s [OPTION]... FICHIER\n"
#: src/getargs.c:92
#: src/getargs.c:63
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 ""
"Si une option de forme longue montre un arguement comme étant obligatoire,\n"
"Si une option de forme longue montre un paramètre comme étant obligatoire,\n"
"il est alors obligatoire également pour une option de forme courte.\n"
"Il en est de même pour les arguments optionnels.\n"
"Il en est de même pour les paramètres optionnels.\n"
#: src/getargs.c:98
#: src/getargs.c:69
msgid ""
"Operation modes:\n"
" -h, --help display this help and exit\n"
@@ -166,7 +139,7 @@ msgstr ""
" -V, --version afficher le nom et la version du logiciel\n"
" -y, --yacc émuler yacc en mode POSIX\n"
#: src/getargs.c:105
#: src/getargs.c:76
msgid ""
"Parser:\n"
" -S, --skeleton=FILE specify the skeleton to use\n"
@@ -183,12 +156,13 @@ msgstr ""
" de l'analyseur\n"
" --locations permettre le calcul des localisations\n"
" -p, --name-prefix=PREFIXE accoler le PREFIXE aux symboles externes\n"
" -l, --no-lines ne pas générer les directives «#line»\n"
" -l, --no-lines ne pas générer les directives `#line'\n"
" -n, --no-parser générer les tables seulement\n"
" -r, --raw compter les jetons à partir de 3\n"
" -k, --token-table inclure la table des noms de jetons\n"
#: src/getargs.c:117
#: src/getargs.c:88
#, fuzzy
msgid ""
"Output:\n"
" -d, --defines also produce a header file\n"
@@ -202,30 +176,28 @@ msgstr ""
" -d, --defines produire un fichier d'en-tête\n"
" -v, --verbose produire une explication de l'automate\n"
" -b, --file-prefix=PREFIXE utiliser le PREFIXE pour le fichier de sortie\n"
" -o, --output=FICHIER produire la sortie dans le FICHIER\n"
" -o, --output-file=FICHIER produire la sortie dans le FICHIER\n"
" -g, --graph produire aussi la description du graphe VCG de "
"l'automate\n"
#: src/getargs.c:127
#: src/getargs.c:98
msgid "Report bugs to <[email protected]>.\n"
msgstr "Rapporter toutes anomalies à <[email protected]>.\n"
#. Some efforts were made to ease the translators' task, please
#. continue.
#: src/getargs.c:141
#: src/getargs.c:112
#, c-format
msgid "bison (GNU Bison) %s"
msgstr "bison (GNU Bison) %s"
#: src/getargs.c:146
#: src/getargs.c:117
msgid ""
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
"Free Software Foundation, Inc.\n"
"Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"
msgstr ""
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002 Free Software Foundation, "
"Inc.\n"
"Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"
#: src/getargs.c:151
#: src/getargs.c:121
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"
@@ -234,457 +206,452 @@ msgstr ""
"reproduction. AUCUNE garantie n'est donnée; tant pour des raisons\n"
"COMMERCIALES que pour RÉPONDRE À UN BESOIN PARTICULIER.\n"
#: src/getargs.c:230 src/lex.c:705
#: src/getargs.c:200 src/lex.c:599
#, c-format
msgid "`%s' is no longer supported"
msgstr "«%s» n'est plus supporté"
msgstr "`%s' n'est plus supporté"
#: src/getargs.c:254
#: src/getargs.c:224
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "Pour en savoir davantage, faites: «%s --help'.\n"
msgstr "Pour en savoir davantage, faites: `%s --help'.\n"
#: src/getargs.c:261
#: src/getargs.c:233
#, c-format
msgid "%s: no grammar file given\n"
msgstr "%s: grammaire manquante\n"
#: src/getargs.c:265
#: src/getargs.c:237
#, c-format
msgid "%s: extra arguments ignored after `%s'\n"
msgstr "%s: arguments supplémentaires ignorés après «%s»\n"
msgstr "%s: paramètres supplémentaires ignorés après `%s'\n"
#: src/lalr.c:256
#: src/lalr.c:175
#, c-format
msgid "too many gotos (max %d)"
msgstr "nombre trop grand de «goto» (Max %d)"
msgstr "nombre trop grand de \"goto\" (Max %d)"
#: src/lex.c:76
#: src/lex.c:77
msgid "unexpected `/' found and ignored"
msgstr "«/» inattendu et ignoré"
msgstr "`/' inattendu et ignoré"
#: src/lex.c:105 src/reader.c:280
#: src/lex.c:106 src/reader.c:302
msgid "unterminated comment"
msgstr "le commentaire ne se termine pas"
#: src/lex.c:137
#: src/lex.c:138
msgid "unexpected end of file"
msgstr "Fin de fichier inattendue"
#: src/lex.c:166
#: src/lex.c:157
msgid "unescaped newline in constant"
msgstr "retour de chariot sans échappement dans une constante"
#: src/lex.c:208
#: src/lex.c:196
#, c-format
msgid "octal value outside range 0...255: `\\%o'"
msgstr "valeur octale à l'extérieur de l'intervalle 0...255: \\%o"
#: src/lex.c:233
#: src/lex.c:221
#, c-format
msgid "hexadecimal value above 255: `\\x%x'"
msgstr "valeur hexadécimale supérieure à 255: \\x%x"
#: src/lex.c:245
#: src/lex.c:233
#, c-format
msgid "unknown escape sequence: `\\' followed by `%s'"
msgstr "séquence d'échappement inconnue: «\\» suivie de «%s»"
msgstr "séquence d'échappement inconnue: `\\' suivie de `%s'"
#: src/lex.c:342
#: src/lex.c:264
msgid "unterminated type name at end of file"
msgstr "le nom de type ne se termine pas avant la fin de fichier"
#: src/lex.c:345
#: src/lex.c:267
msgid "unterminated type name"
msgstr "le nom de type ne se termine pas"
#: src/lex.c:438
#: src/lex.c:359
msgid "use \"...\" for multi-character literal tokens"
msgstr "utilisez \"...\" pour les terminaux litéraux de plusieurs caractères"
#: src/lex.c:678
#: src/lex.c:571
#, c-format
msgid "`%s' supports no argument: %s"
msgstr "«%s» ne supporte aucun argument: %s"
msgstr ""
#: src/lex.c:694
#, c-format
#: src/lex.c:588
#, fuzzy, c-format
msgid "`%s' requires an argument"
msgstr "«%s»: requiert un argument"
msgstr "%s: l'option %s requiert un paramètre\n"
#: src/output.c:951
#: src/output.c:804
#, c-format
msgid "maximum table size (%d) exceeded"
msgstr "taille maximale de la table (%d) dépassée"
#: src/print.c:39
#: src/print.c:44
#, c-format
msgid " type %d is %s\n"
msgstr " le type %d est %s\n"
#: src/print.c:88
#: src/print.c:106
#, c-format
msgid " (rule %d)"
msgstr " (règle %d)"
#: src/print.c:108
msgid " $default\taccept\n"
msgstr " $défaut\taccepter\n"
#: src/print.c:110
msgid " NO ACTIONS\n"
msgstr " PAS D'ACTION\n"
#: src/print.c:124
#, c-format
msgid " $ \tgo to state %d\n"
msgstr " $ \taller à l'état %d\n"
#: src/print.c:127
#, c-format
msgid " %-4s\tshift, and go to state %d\n"
msgstr " %-4s\tdécalage et aller à l'état %d\n"
#: src/print.c:142
#: src/print.c:144
#, c-format
msgid " %-4s\terror (nonassociative)\n"
msgstr " %-4s\terreur (non-associatif)\n"
#: src/print.c:169
#: src/print.c:168
#, c-format
msgid " %-4s\tgo to state %d\n"
msgstr " %-4s\taller à l'état %d\n"
#: src/print.c:180
#: src/print.c:192 src/print.c:228
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
"\n"
msgstr ""
" $défaut\tréduction par la règle %d (%s)\n"
"\n"
#: src/print.c:224 src/print.c:301
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[réduction par la règle %d (%s)\n"
#: src/print.c:282 src/print.c:295
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\tréduction par la règle %d (%s)\n"
#: src/print.c:311
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $défaut\tréduction par la règle %d (%s)\n"
#: src/print.c:327
msgid " $default\taccept\n"
msgstr " $défaut\taccepter\n"
#: src/print.c:329
msgid " NO ACTIONS\n"
msgstr " PAS D'ACTION\n"
#: src/print.c:342
#, c-format
msgid "state %d"
msgstr "état %d"
#. rule # : LHS -> RHS
#: src/print.c:211
#: src/print.c:373
msgid "Grammar"
msgstr "Grammaire"
#: src/print.c:212
#: src/print.c:374
msgid "Number, Line, Rule"
msgstr "Nombre, ligne, règle"
msgstr ""
#: src/print.c:217
#, c-format
#: src/print.c:379
#, fuzzy, c-format
msgid " %3d %3d %s ->"
msgstr " %3d %3d %s ->"
msgstr "règle %-4d %s ->"
#: src/print.c:224
#: src/print.c:386
msgid "empty"
msgstr "vide"
msgstr ""
#. TERMINAL (type #) : rule #s terminal is on RHS
#: src/print.c:231
#: src/print.c:393
msgid "Terminals, with rules where they appear"
msgstr "Terminaux, suivis des règles où ils apparaissent"
#: src/print.c:256
#: src/print.c:416
msgid "Nonterminals, with rules where they appear"
msgstr "Non-terminaux, suivis des règles où ils apparaissent"
#: src/print.c:282
#: src/print.c:442
msgid " on left:"
msgstr " à gauche:"
#: src/print.c:297
#: src/print.c:457
msgid " on right:"
msgstr " à droite:"
#. 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\terreur (non-associatif)"
#.
#. 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 "$défaut\tréduction par la règle %d (%s)"
#: src/reader.c:89
#: src/reader.c:100
msgid " Skipping to next \\n"
msgstr " Saut jusqu'au prochain \\n"
#: src/reader.c:91
#: src/reader.c:102
#, c-format
msgid " Skipping to next %c"
msgstr " Saut jusqu'au prochain %c"
#: src/reader.c:142 src/reader.c:154
#: src/reader.c:153 src/reader.c:165
msgid "invalid $ value"
msgstr "la valeur de symbole $ n'est pas valide"
#: src/reader.c:180 src/reader.c:195
#: src/reader.c:192 src/reader.c:207
msgid "unterminated string at end of file"
msgstr "chaîne de caractères non terminée en fin de fichier"
#: src/reader.c:183
#: src/reader.c:195
msgid "unterminated string"
msgstr "chaîne de caractère non terminée"
#: src/reader.c:339
msgid "invalid @ value"
msgstr "valeur @ invalide"
#: src/reader.c:337 src/reader.c:401
#, fuzzy, c-format
msgid "invalid value: %s%d"
msgstr "la valeur de symbole $ n'est pas valide"
#: src/reader.c:352 src/reader.c:416
#: src/reader.c:351 src/reader.c:423
#, c-format
msgid "%s is invalid"
msgstr "%s n'est pas valide"
#: src/reader.c:392
#: src/reader.c:391
#, c-format
msgid "$$ of `%s' has no declared type"
msgstr "$$ de «%s» n'a pas son type déclaré"
msgstr "$$ de `%s' n'a pas son type déclaré"
#: src/reader.c:409
#: src/reader.c:415
#, c-format
msgid "$%d of `%s' has no declared type"
msgstr "$%d de «%s» n'a pas de type déclaré"
msgstr "$%d de `%s' n'a pas de type déclaré"
#: src/reader.c:463
#: src/reader.c:473
msgid "unterminated `%{' definition"
msgstr "La section de définition (%{) ne termine pas avant la fin du fichier"
#: src/reader.c:508 src/reader.c:623 src/reader.c:673
#: src/reader.c:518 src/reader.c:636 src/reader.c:686 src/reader.c:933
#, c-format
msgid "Premature EOF after %s"
msgstr "Fin de fichier prématutée après %s"
#: src/reader.c:525
#: src/reader.c:535
#, c-format
msgid "symbol `%s' used more than once as a literal string"
msgstr "symbole «%s» utilisé plus d'une fois dans une chaîne litérale"
msgstr "symbole `%s' utilisé plus d'une fois dans une chaîne litérale"
#: src/reader.c:528
#: src/reader.c:538
#, c-format
msgid "symbol `%s' given more than one literal string"
msgstr "symbole «%s» présent dans plus d'une chaîne litérale"
msgstr "symbole `%s' présent dans plus d'une chaîne litérale"
#: src/reader.c:549 src/reader.c:692
#: src/reader.c:559 src/reader.c:705
#, c-format
msgid "symbol %s redefined"
msgstr "symbole %s redéfini"
#: src/reader.c:559 src/reader.c:638 src/reader.c:699 src/reader.c:1314
#: src/reader.c:569 src/reader.c:651 src/reader.c:712
#, c-format
msgid "type redeclaration for %s"
msgstr "redéclaration du type de %s"
#: src/reader.c:568
#: src/reader.c:581
#, c-format
msgid "`%s' is invalid in %s"
msgstr "«%s» n'est pas valide dans %s"
msgstr "`%s' n'est pas valide dans %s"
#: src/reader.c:586 src/reader.c:751
#: src/reader.c:599 src/reader.c:758
#, c-format
msgid "multiple %s declarations"
msgstr "multiples déclarations %s"
#: src/reader.c:588 src/reader.c:930 src/reader.c:955 src/reader.c:1292
#: src/reader.c:601 src/reader.c:913 src/reader.c:928 src/reader.c:961
#: src/reader.c:975 src/reader.c:1178
#, c-format
msgid "invalid %s declaration"
msgstr "la déclaration %s n'est pas valide"
#: src/reader.c:608
#: src/reader.c:621
msgid "%type declaration has no <typename>"
msgstr "la déclaration %type n'a pas de <nom_de_type>"
#: src/reader.c:643
#: src/reader.c:656
#, c-format
msgid "invalid %%type declaration due to item: %s"
msgstr "la déclaration %%type n'est pas valide en raison de l'item: %s"
#: src/reader.c:688
#: src/reader.c:701
#, c-format
msgid "redefining precedence of %s"
msgstr "redéfinition du niveau de priorité de %s"
#: src/reader.c:711
#: src/reader.c:724
#, c-format
msgid "invalid text (%s) - number should be after identifier"
msgstr ""
"le texte n'est pas valide (%s) - le nombre devrait suivre l'identificateur"
#: src/reader.c:721
#: src/reader.c:734
#, c-format
msgid "unexpected item: %s"
msgstr "item inattendu: %s"
#: src/reader.c:794 src/reader.c:1126 src/reader.c:1203
#: src/reader.c:790 src/reader.c:1149
#, c-format
msgid "unmatched %s"
msgstr "non appariement de %s"
#: src/reader.c:826
#: src/reader.c:819
#, c-format
msgid "argument of %%expect is not an integer"
msgstr "l'argument de %%expect n'est pas un entier"
msgstr "le paramètre de %%expect n'est pas un entier"
#: src/reader.c:872
#: src/reader.c:865
#, c-format
msgid "unrecognized item %s, expected an identifier"
msgstr "item %s non reconnu, un identificateur est attendu"
#: src/reader.c:894
#: src/reader.c:887
#, c-format
msgid "expected string constant instead of %s"
msgstr "chaîne de caractères constante attendue plutôt que %s"
#: src/reader.c:1042
#: src/reader.c:1080
#, c-format
msgid "unrecognized: %s"
msgstr "non reconnu: %s"
#: src/reader.c:1047
#: src/reader.c:1085
msgid "no input grammar"
msgstr "aucune grammaire en entrée"
#: src/reader.c:1052
#: src/reader.c:1090
#, c-format
msgid "unknown character: %s"
msgstr "caractère inconnu: %s"
#: src/reader.c:1226
#, c-format
msgid "unterminated %guard clause"
msgstr "clause %guard non terminée"
#: src/reader.c:1379
#: src/reader.c:1265
msgid "ill-formed rule: initial symbol not followed by colon"
msgstr "règle mal formée: le symbole initial n'est pas suivi de «:»"
msgstr "règle mal formée: le symbole initial n'est pas suivi de `:'"
#: src/reader.c:1386
#: src/reader.c:1272
msgid "grammar starts with vertical bar"
msgstr "la grammaire débute par une barre verticale"
#: src/reader.c:1414
#: src/reader.c:1300
#, c-format
msgid "rule given for %s, which is a token"
msgstr "la règle pour %s, qui est un terminal"
#: src/reader.c:1444 src/reader.c:1556
msgid "previous rule lacks an ending `;'"
msgstr "règle précédente manque une terminaison «;»"
#: src/reader.c:1517
#: src/reader.c:1405
msgid "two @prec's in a row"
msgstr "deux @prec de suite"
#: src/reader.c:1525
#: src/reader.c:1414
#, c-format
msgid "%%guard present but %%semantic_parser not specified"
msgstr "%%guard est présent mais %%semantic_parser n'est pas spécifié"
#: src/reader.c:1534
#: src/reader.c:1424
msgid "two actions at end of one rule"
msgstr "deux actions à la fin d'une même règle"
#: src/reader.c:1548
#: src/reader.c:1438
#, c-format
msgid "type clash (`%s' `%s') on default action"
msgstr "conflit de type («%s» «%s») pour l'action par défaut"
msgstr "conflit de type (`%s' `%s') pour l'action par défaut"
#: src/reader.c:1554
#: src/reader.c:1444
msgid "empty rule for typed nonterminal, and no action"
msgstr "règle vide pour une catégorie typée et aucune action"
#: src/reader.c:1600
#: src/reader.c:1450
#, c-format
msgid "invalid input: %s"
msgstr "entrée non valide: %s"
#: src/reader.c:1608
#, c-format
msgid "too many symbols (tokens plus nonterminals); maximum %d"
msgstr "trop de symboles (jeton plus non terminaux); maximum %d"
#: src/reader.c:1611
#: src/reader.c:1457
msgid "no rules in the input grammar"
msgstr "la grammaire n'a pas de règles"
#: src/reader.c:1635
#: src/reader.c:1465
#, c-format
msgid "symbol %s is used, but is not defined as a token and has no rules"
msgstr ""
"le symbole %s est utilisé mais ce n'est pas un terminal et il ne possède pas "
"de règle"
#: src/reader.c:1770
#: src/reader.c:1487
#, c-format
msgid "too many symbols (tokens plus nonterminals); maximum %d"
msgstr "trop de symboles (jeton plus non terminaux); maximum %d"
#: src/reader.c:1551
#, c-format
msgid "tokens %s and %s both assigned number %d"
msgstr "les jetons %s et %s se sont vus assigner le nombre %d"
#: src/reader.c:1823
#: src/reader.c:1601
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "les priorités pour %s et %s entrent en conflit"
#: src/reader.c:1835
#: src/reader.c:1613
#, c-format
msgid "conflicting assoc values for %s and %s"
msgstr "les valeurs d'association de %s et %s entrent en conflit"
#: src/reader.c:1874
#: src/reader.c:1650
#, c-format
msgid "the start symbol %s is undefined"
msgstr "le symbole de départ %s n'est pas défini"
#: src/reader.c:1876
#: src/reader.c:1652
#, c-format
msgid "the start symbol %s is a token"
msgstr "le symbole de départ %s est un terminal"
#: src/reduce.c:409
#: src/reader.c:1672
#, fuzzy, c-format
msgid "too many items (max %d)"
msgstr "nombre trop grand d'états (max %d)"
#: src/reduce.c:398
msgid "Useless nonterminals:"
msgstr "Non-terminaux inutiles:"
#: src/reduce.c:422
#: src/reduce.c:411
msgid "Terminals which are not used:"
msgstr "Terminaux non utilisés:"
#: src/reduce.c:433
#: src/reduce.c:422
msgid "Useless rules:"
msgstr "Règles inutiles:"
#: src/reduce.c:503
#, c-format
#: src/reduce.c:494
#, fuzzy, c-format
msgid "%d rule never reduced\n"
msgid_plural "%d rules never reduced\n"
msgstr[0] "%d règle n'a jamais été réduite\n"
msgstr[1] "%d règles n'ont jamais été réduites\n"
msgstr[0] "%d règles jamais réduites\n"
#: src/reduce.c:511
#, c-format
#: src/reduce.c:502
#, fuzzy, c-format
msgid "%d useless nonterminal"
msgid_plural "%d useless nonterminals"
msgstr[0] "%d nonterminal inutilisable"
msgstr[1] "%d nonterminals inutilisables"
msgstr[0] "%d catégories non productives%s"
#: src/reduce.c:517
#: src/reduce.c:508
msgid " and "
msgstr " et "
#: src/reduce.c:520
#, c-format
#: src/reduce.c:511
#, fuzzy, c-format
msgid "%d useless rule"
msgid_plural "%d useless rules"
msgstr[0] "%d règle inutilisable"
msgstr[1] "%d règles inutilisables"
msgstr[0] "%d règle(s) non productive(s)%s"
#: src/reduce.c:551
#: src/reduce.c:542
#, c-format
msgid "Start symbol %s does not derive any sentence"
msgstr "Aucune phrase ne peut être dérivée du symbole de départ %s"
@@ -697,17 +664,17 @@ msgstr "%s: l'option %s est ambig
#: lib/getopt.c:719
#, c-format
msgid "%s: option `--%s' doesn't allow an argument\n"
msgstr "%s: l'option --%s n'admet pas d'argument\n"
msgstr "%s: l'option --%s n'admet pas de paramètre\n"
#: lib/getopt.c:724
#, c-format
msgid "%s: option `%c%s' doesn't allow an argument\n"
msgstr "%s: l'option %c%s n'admet pas d'argument\n"
msgstr "%s: l'option %c%s n'admet pas de paramètre\n"
#: lib/getopt.c:742 lib/getopt.c:915
#, c-format
msgid "%s: option `%s' requires an argument\n"
msgstr "%s: l'option %s requiert un argument\n"
msgstr "%s: l'option %s requiert un paramètre\n"
#. --option
#: lib/getopt.c:771
@@ -736,17 +703,17 @@ msgstr "%s: option non valide -- %c\n"
#: lib/getopt.c:834 lib/getopt.c:964
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr "%s: l'option requiert un argument -- %c\n"
msgstr "%s: l'option requiert un paramètre -- %c\n"
#: lib/getopt.c:881
#, c-format
msgid "%s: option `-W %s' is ambiguous\n"
msgstr "%s: l'option «-W %s» est ambiguë\n"
msgstr "%s: l'option `-W %s' est ambiguë\n"
#: lib/getopt.c:899
#, c-format
msgid "%s: option `-W %s' doesn't allow an argument\n"
msgstr "%s: l'option «-W %s» n'admet pas d'argument\n"
msgstr "%s: l'option `-W %s' n'admet pas de paramètre\n"
#. If XALLOC_FAIL_FUNC is NULL, or does return, display this message
#. before exiting when memory is exhausted. Goes through gettext.
@@ -776,6 +743,18 @@ msgstr "`"
msgid "'"
msgstr "'"
#~ msgid "%-4s\terror (nonassociative)"
#~ msgstr "%-4s\terreur (non-associatif)"
#~ msgid "$default\treduce using rule %d (%s)"
#~ msgstr "$défaut\tréduction par la règle %d (%s)"
#~ msgid "unterminated %guard clause"
#~ msgstr "clause %guard non terminée"
#~ msgid " $ \tgo to state %d\n"
#~ msgstr " $ \taller à l'état %d\n"
#~ msgid "%s: internal error: %s\n"
#~ msgstr "%s: erreur interne: %s\n"
@@ -809,6 +788,15 @@ msgstr "'"
#~ "-------------------\n"
#~ "\n"
#~ msgid " 1 shift/reduce conflict"
#~ msgstr " 1 conflit décalage/réduction"
#~ msgid " 1 reduce/reduce conflict"
#~ msgstr "1 conflit réduction/réduction"
#~ msgid "%s contains"
#~ msgstr "%s contient"
#~ msgid "DERIVES"
#~ msgstr "DÉRIVES"
@@ -824,15 +812,6 @@ msgstr "'"
#~ "la réduction de %s définit %d terminal%s, %d catégorie%s et %d production%"
#~ "s.\n"
#~ msgid " 1 shift/reduce conflict"
#~ msgstr " 1 conflit décalage/réduction"
#~ msgid " 1 reduce/reduce conflict"
#~ msgstr "1 conflit réduction/réduction"
#~ msgid "%s contains"
#~ msgstr "%s contient"
#~ msgid "\t\t/* empty */"
#~ msgstr "\t\t/* epsilon */"
@@ -973,4 +952,4 @@ msgstr "'"
#~ msgstr "le commentaire ne se termine pas dans la section de définition (%{)"
#~ msgid "invalid @-construct"
#~ msgstr "la construction «@» n'est pas valide"
#~ msgstr "la construction `@' n'est pas valide"
+171 -194
View File
@@ -5,8 +5,8 @@
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"
"POT-Creation-Date: 2002-01-29 17:17+0100\n"
"PO-Revision-Date: 2002-01-18 12:40 CET\n"
"Last-Translator: Paolo Bonzini <[email protected]>\n"
"Language-Team: Italian <[email protected]>\n"
"MIME-Version: 1.0\n"
@@ -14,7 +14,7 @@ msgstr ""
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/LR0.c:189
#: src/LR0.c:194
#, c-format
msgid "too many states (max %d)"
msgstr "troppi stati (massimo %d)"
@@ -31,120 +31,96 @@ msgstr "attenzione: "
msgid "fatal error: "
msgstr "errore fatale: "
#: src/conflicts.c:44
#: src/conflicts.c:46
#, 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
#: src/conflicts.c:111 src/conflicts.c:133
msgid "reduce"
msgstr "riduzione"
#: src/conflicts.c:101 src/conflicts.c:115
#: src/conflicts.c:116 src/conflicts.c:128
msgid "shift"
msgstr "shift"
#: src/conflicts.c:123
#: src/conflicts.c:138
msgid "an error"
msgstr "un errore"
#: src/conflicts.c:302
#: src/conflicts.c:291
#, 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
#: src/conflicts.c:298
msgid "and"
msgstr "e"
#: src/conflicts.c:315
#: src/conflicts.c:304
#, 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
#: src/conflicts.c:329
#, 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
#: src/conflicts.c:376
msgid "conflicts: "
msgstr "conflitti: "
#: src/conflicts.c:389
#: src/conflicts.c:378
#, c-format
msgid " %d shift/reduce"
msgstr " %d shift/riduzione"
#: src/conflicts.c:393
#: src/conflicts.c:382
#, c-format
msgid " %d reduce/reduce"
msgstr " %d riduzione/riduzione"
#: src/conflicts.c:398 src/reduce.c:508
#: src/conflicts.c:387 src/reduce.c:499
#, c-format
msgid "%s contains "
msgstr "%s contiene "
#: src/conflicts.c:412
#: src/conflicts.c:394
#, 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
#: src/files.c:159
#, c-format
msgid "cannot open file `%s'"
msgstr "impossibile aprire il file `%s'"
#: src/files.c:170
#: src/files.c:178
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
#: src/getargs.c:55
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
msgstr "GNU bison genera parser per grammatiche LALR(1).\n"
#: src/getargs.c:88
#: src/getargs.c:59
#, c-format
msgid "Usage: %s [OPTION]... FILE\n"
msgstr "Utilizzo: %s [OPZIONE]... FILE\n"
#: src/getargs.c:92
#: src/getargs.c:63
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"
@@ -153,7 +129,7 @@ msgstr ""
"è obbligatorio anche per l'equivalente opzione corta. Analogamente per\n"
"gli argomenti opzionali.\n"
#: src/getargs.c:98
#: src/getargs.c:69
msgid ""
"Operation modes:\n"
" -h, --help display this help and exit\n"
@@ -165,7 +141,7 @@ msgstr ""
" -V, --version mostra informazioni sulla versione ed esce\n"
" -y, --yacc emula il comportamento di POSIX yacc\n"
#: src/getargs.c:105
#: src/getargs.c:76
msgid ""
"Parser:\n"
" -S, --skeleton=FILE specify the skeleton to use\n"
@@ -184,7 +160,7 @@ msgstr ""
" -n, --no-parser genera le sole tabelle\n"
" -k, --token-table include una tabella di nomi dei token\n"
#: src/getargs.c:117
#: src/getargs.c:88
msgid ""
"Output:\n"
" -d, --defines also produce a header file\n"
@@ -201,26 +177,24 @@ msgstr ""
" -o, --output=FILE lascia l'output in FILE\n"
" -g, --graph produce anche una descrizione VCG dell'automa\n"
#: src/getargs.c:127
#: src/getargs.c:98
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
#: src/getargs.c:112
#, c-format
msgid "bison (GNU Bison) %s"
msgstr "bison (GNU Bison) %s"
#: src/getargs.c:146
#: src/getargs.c:117
msgid ""
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
"Free Software Foundation, Inc.\n"
"Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"
msgstr ""
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
"Free Software Foundation, Inc.\n"
"Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"
#: src/getargs.c:151
#: src/getargs.c:121
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"
@@ -229,456 +203,453 @@ msgstr ""
"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
#: src/getargs.c:200 src/lex.c:599
#, c-format
msgid "`%s' is no longer supported"
msgstr "`%s' non è più supportato"
#: src/getargs.c:254
#: src/getargs.c:224
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "Provare `%s --help' per ulteriori informazioni.\n"
#: src/getargs.c:261
#: src/getargs.c:233
#, c-format
msgid "%s: no grammar file given\n"
msgstr "%s: nessun file grammatica specificato\n"
#: src/getargs.c:265
#: src/getargs.c:237
#, c-format
msgid "%s: extra arguments ignored after `%s'\n"
msgstr "%s: ignorati gli argomenti successivi a `%s'\n"
#: src/lalr.c:256
#: src/lalr.c:175
#, c-format
msgid "too many gotos (max %d)"
msgstr "troppi goto (max %d)"
#: src/lex.c:76
#: src/lex.c:77
msgid "unexpected `/' found and ignored"
msgstr "`/' inatteso, trovato e ignorato"
#: src/lex.c:105 src/reader.c:280
#: src/lex.c:106 src/reader.c:302
msgid "unterminated comment"
msgstr "commento non terminato"
#: src/lex.c:137
#: src/lex.c:138
msgid "unexpected end of file"
msgstr "fine del file inattesa"
# Oder soll man den Begriff "Escapezeichen" verwenden?
#: src/lex.c:166
#: src/lex.c:157
msgid "unescaped newline in constant"
msgstr "fine di linea non preceduta da `\\' in una costante"
#: src/lex.c:208
#: src/lex.c:196
#, c-format
msgid "octal value outside range 0...255: `\\%o'"
msgstr "valore ottale fuori dall'intervallo 0...255: `\\%o'"
#: src/lex.c:233
#: src/lex.c:221
#, c-format
msgid "hexadecimal value above 255: `\\x%x'"
msgstr "valore esadecimale superiore a 255: `\\x%x'"
#: src/lex.c:245
#: src/lex.c:233
#, c-format
msgid "unknown escape sequence: `\\' followed by `%s'"
msgstr "sequenza di escape sconosciuta: `\\' seguito da `%s'"
#: src/lex.c:342
#: src/lex.c:264
msgid "unterminated type name at end of file"
msgstr "nome di tipo non terminato a fine file"
#: src/lex.c:345
#: src/lex.c:267
msgid "unterminated type name"
msgstr "nome di tipo non terminato"
#: src/lex.c:438
#: src/lex.c:359
msgid "use \"...\" for multi-character literal tokens"
msgstr "usa \"...\" per token letterali di più caratteri"
#: src/lex.c:678
#: src/lex.c:571
#, c-format
msgid "`%s' supports no argument: %s"
msgstr "`%s' non supporta argomenti: %s"
#: src/lex.c:694
#: src/lex.c:588
#, c-format
msgid "`%s' requires an argument"
msgstr "`%s' richiede un argomento"
#: src/output.c:951
#: src/output.c:804
#, c-format
msgid "maximum table size (%d) exceeded"
msgstr "ecceduta la dimensione massima di una tabella (%d)"
#: src/print.c:39
#: src/print.c:44
#, c-format
msgid " type %d is %s\n"
msgstr " il tipo %d è %s\n"
#: src/print.c:88
#: src/print.c:106
#, 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
#: src/print.c:144
#, c-format
msgid " %-4s\terror (nonassociative)\n"
msgstr " %-4s\terrore (non associativo)\n"
#: src/print.c:169
#: src/print.c:168
#, c-format
msgid " %-4s\tgo to state %d\n"
msgstr " %-4s\tprosecuzione allo stato %d\n"
#: src/print.c:180
#: src/print.c:192 src/print.c:228
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
"\n"
msgstr ""
" $default\triduzione con la regola %d (%s)\n"
"\n"
#: src/print.c:224 src/print.c:301
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[riduzione con la regole %d (%s)]\n"
#: src/print.c:282 src/print.c:295
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\triduzione con la regola %d (%s)\n"
#: src/print.c:311
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\triduzione con la regola %d (%s)\n"
#: src/print.c:327
msgid " $default\taccept\n"
msgstr " $default\taccetta\n"
#: src/print.c:329
msgid " NO ACTIONS\n"
msgstr " NESSUNA AZIONE\n"
#: src/print.c:342
#, c-format
msgid "state %d"
msgstr "stato %d"
#. rule # : LHS -> RHS
#: src/print.c:211
#: src/print.c:373
msgid "Grammar"
msgstr "Grammatica"
#: src/print.c:212
#: src/print.c:374
msgid "Number, Line, Rule"
msgstr "Numero, Linea, Regola"
#: src/print.c:217
#: src/print.c:379
#, c-format
msgid " %3d %3d %s ->"
msgstr " %3d %3d %s ->"
#: src/print.c:224
#: src/print.c:386
msgid "empty"
msgstr "vuoto"
#. TERMINAL (type #) : rule #s terminal is on RHS
#: src/print.c:231
#: src/print.c:393
msgid "Terminals, with rules where they appear"
msgstr "Simboli terminali e regole in cui appaiono"
#: src/print.c:256
#: src/print.c:416
msgid "Nonterminals, with rules where they appear"
msgstr "Simboli nonterminali e regole in cui appaiono"
#: src/print.c:282
#: src/print.c:442
msgid " on left:"
msgstr " nel primo membro:"
#: src/print.c:297
#: src/print.c:457
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
#: src/reader.c:100
msgid " Skipping to next \\n"
msgstr " Passo al successivo \\n"
#: src/reader.c:91
#: src/reader.c:102
#, c-format
msgid " Skipping to next %c"
msgstr " Passo al successivo %c"
#: src/reader.c:142 src/reader.c:154
#: src/reader.c:153 src/reader.c:165
msgid "invalid $ value"
msgstr "valore $ non valido"
#: src/reader.c:180 src/reader.c:195
#: src/reader.c:192 src/reader.c:207
msgid "unterminated string at end of file"
msgstr "stringa non terminata alla fine del file"
#: src/reader.c:183
#: src/reader.c:195
msgid "unterminated string"
msgstr "stringa non terminata"
#: src/reader.c:339
#, fuzzy
msgid "invalid @ value"
msgstr "valore $ non valido"
#: src/reader.c:337 src/reader.c:401
#, c-format
msgid "invalid value: %s%d"
msgstr "valore non valido: %s%d"
#: src/reader.c:352 src/reader.c:416
#: src/reader.c:351 src/reader.c:423
#, c-format
msgid "%s is invalid"
msgstr "%s non è valido"
#: src/reader.c:392
#: src/reader.c:391
#, c-format
msgid "$$ of `%s' has no declared type"
msgstr "Manca una dichiarazione di tipo per $$ di `%s'"
#: src/reader.c:409
#: src/reader.c:415
#, c-format
msgid "$%d of `%s' has no declared type"
msgstr "Manca una dichiarazione di tipo per $%d di `%s'"
#: src/reader.c:463
#: src/reader.c:473
msgid "unterminated `%{' definition"
msgstr "definizione `%{' non terminata"
#: src/reader.c:508 src/reader.c:623 src/reader.c:673
#: src/reader.c:518 src/reader.c:636 src/reader.c:686 src/reader.c:933
#, c-format
msgid "Premature EOF after %s"
msgstr "Fine di file prematura dopo %s"
#: src/reader.c:525
#: src/reader.c:535
#, 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
#: src/reader.c:538
#, 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
#: src/reader.c:559 src/reader.c:705
#, 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
#: src/reader.c:569 src/reader.c:651 src/reader.c:712
#, c-format
msgid "type redeclaration for %s"
msgstr "tipo dichiarato due volte per %s"
#: src/reader.c:568
#: src/reader.c:581
#, c-format
msgid "`%s' is invalid in %s"
msgstr "`%s' non è valido in %s"
#: src/reader.c:586 src/reader.c:751
#: src/reader.c:599 src/reader.c:758
#, 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
#: src/reader.c:601 src/reader.c:913 src/reader.c:928 src/reader.c:961
#: src/reader.c:975 src/reader.c:1178
#, c-format
msgid "invalid %s declaration"
msgstr "dichiarazione %s non valida"
#: src/reader.c:608
#: src/reader.c:621
msgid "%type declaration has no <typename>"
msgstr "dichiarazione %type senza <nome di tipo>"
#: src/reader.c:643
#: src/reader.c:656
#, c-format
msgid "invalid %%type declaration due to item: %s"
msgstr "dichiarazione %%type non valida per la presenza di `%s'"
#: src/reader.c:688
#: src/reader.c:701
#, c-format
msgid "redefining precedence of %s"
msgstr "precedenza di `%s' definita due volte"
#: src/reader.c:711
#: src/reader.c:724
#, 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
#: src/reader.c:734
#, c-format
msgid "unexpected item: %s"
msgstr "elemento inatteso: %s"
#: src/reader.c:794 src/reader.c:1126 src/reader.c:1203
#: src/reader.c:790 src/reader.c:1149
#, c-format
msgid "unmatched %s"
msgstr "%s non bilanciato"
#: src/reader.c:826
#: src/reader.c:819
#, c-format
msgid "argument of %%expect is not an integer"
msgstr "L'argomento di %%expect non è un intero"
#: src/reader.c:872
#: src/reader.c:865
#, c-format
msgid "unrecognized item %s, expected an identifier"
msgstr "elemento %s non riconosciuto, atteso un identificatore"
#: src/reader.c:894
#: src/reader.c:887
#, c-format
msgid "expected string constant instead of %s"
msgstr "attesa una costante stringa invece di %s"
#: src/reader.c:1042
#: src/reader.c:1080
#, c-format
msgid "unrecognized: %s"
msgstr "non riconosciuto: %s"
#: src/reader.c:1047
#: src/reader.c:1085
msgid "no input grammar"
msgstr "nessuna grammatica di input"
#: src/reader.c:1052
#: src/reader.c:1090
#, 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
#: src/reader.c:1265
msgid "ill-formed rule: initial symbol not followed by colon"
msgstr "regola malformata: simbolo iniziale non seguito da `:'"
#: src/reader.c:1386
#: src/reader.c:1272
msgid "grammar starts with vertical bar"
msgstr "la grammatica comincia con un `|'"
#: src/reader.c:1414
#: src/reader.c:1300
#, 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
#: src/reader.c:1405
msgid "two @prec's in a row"
msgstr "due @prec di seguito"
#: src/reader.c:1525
#: src/reader.c:1414
#, c-format
msgid "%%guard present but %%semantic_parser not specified"
msgstr "trovato %%guard senza che sia specificato %%semantic_parser"
#: src/reader.c:1534
#: src/reader.c:1424
msgid "two actions at end of one rule"
msgstr "due azioni alla fine di una regola"
#: src/reader.c:1548
#: src/reader.c:1438
#, 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
#: src/reader.c:1444
msgid "empty rule for typed nonterminal, and no action"
msgstr "regola vuota e nessuna azione per un nonterminale con tipo"
#: src/reader.c:1600
#: src/reader.c:1450
#, 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
#: src/reader.c:1457
msgid "no rules in the input grammar"
msgstr "nessuna regola nella grammatica di input"
#: src/reader.c:1635
#: src/reader.c:1465
#, 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
#: src/reader.c:1487
#, c-format
msgid "too many symbols (tokens plus nonterminals); maximum %d"
msgstr "troppi simboli (token e nonterminali); il massimo è %d"
#: src/reader.c:1551
#, 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
#: src/reader.c:1601
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "precedenze in conflitto per %s und %s"
#: src/reader.c:1835
#: src/reader.c:1613
#, c-format
msgid "conflicting assoc values for %s and %s"
msgstr "associatività in conflitto per %s e %s"
#: src/reader.c:1874
#: src/reader.c:1650
#, c-format
msgid "the start symbol %s is undefined"
msgstr "simbolo iniziale %s non definito"
#: src/reader.c:1876
#: src/reader.c:1652
#, c-format
msgid "the start symbol %s is a token"
msgstr "specificato il token %s come simbolo iniziale"
#: src/reduce.c:409
#: src/reader.c:1672
#, c-format
msgid "too many items (max %d)"
msgstr "troppi elementi (max %d)"
#: src/reduce.c:398
msgid "Useless nonterminals:"
msgstr "Simboli nonterminali inutili:"
#: src/reduce.c:422
#: src/reduce.c:411
msgid "Terminals which are not used:"
msgstr "Simboli terminali inutilizzati:"
#: src/reduce.c:433
#: src/reduce.c:422
msgid "Useless rules:"
msgstr "Regole inutili:"
#: src/reduce.c:503
#: src/reduce.c:494
#, 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
#: src/reduce.c:502
#, 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
#: src/reduce.c:508
msgid " and "
msgstr " e "
#: src/reduce.c:520
#: src/reduce.c:511
#, 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
#: src/reduce.c:542
#, c-format
msgid "Start symbol %s does not derive any sentence"
msgstr "dal simbolo iniziale %s non deriva alcuna frase"
@@ -770,8 +741,14 @@ msgstr "`"
msgid "'"
msgstr "'"
#~ msgid "invalid value: %s%d"
#~ msgstr "valore non valido: %s%d"
#~ msgid " $ \tgo to state %d\n"
#~ msgstr " $ \tprosecuzione allo stato %d\n"
#~ msgid "too many items (max %d)"
#~ msgstr "troppi elementi (max %d)"
#~ msgid "%-4s\terror (nonassociative)"
#~ msgstr "%-4s\terrore (non associativo)"
#~ msgid "$default\treduce using rule %d (%s)"
#~ msgstr "$default\triduzione con la regola %d (%s)"
#~ msgid "unterminated %guard clause"
#~ msgstr "clausola %guard non terminata"
+354 -366
View File
File diff suppressed because it is too large Load Diff
+495 -365
View File
File diff suppressed because it is too large Load Diff
+222 -249
View File
@@ -1,19 +1,19 @@
# ðÅÒÅ×ÏÄ ÓÏÏÂÝÅÎÉÊ bison.
# Copyright (C) 1999 Free Software Foundation, Inc.
# Dmitry S. Sivachenko <[email protected]>, 1999,2000,2001,2002.
# Dmitry S. Sivachenko <[email protected]>, 1999,2000,2001.
#
msgid ""
msgstr ""
"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"
"Project-Id-Version: bison 1.29\n"
"POT-Creation-Date: 2002-01-29 17:17+0100\n"
"PO-Revision-Date: 2001-09-09 13:49+04:00\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:189
#: src/LR0.c:194
#, c-format
msgid "too many states (max %d)"
msgstr "ÓÌÉÛËÏÍ ÍÎÏÇÏ ÓÏÓÔÏÑÎÉÊ (ÍÁËÓÉÍÁÌØÎÏ %d)"
@@ -30,123 +30,94 @@ msgstr "
msgid "fatal error: "
msgstr "ÆÁÔÁÌØÎÁÑ ÏÛÉÂËÁ: "
#: src/conflicts.c:44
#: src/conflicts.c:46
#, 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:94 src/conflicts.c:119
#: src/conflicts.c:111 src/conflicts.c:133
msgid "reduce"
msgstr "×Ù×ÏÄ"
#: src/conflicts.c:101 src/conflicts.c:115
#: src/conflicts.c:116 src/conflicts.c:128
msgid "shift"
msgstr "ÓÄ×ÉÇ"
#: src/conflicts.c:123
#: src/conflicts.c:138
msgid "an error"
msgstr "ÏÛÉÂËÁ"
#: src/conflicts.c:302
#, c-format
#: src/conflicts.c:291
#, fuzzy, c-format
msgid "%d shift/reduce conflict"
msgid_plural "%d shift/reduce conflicts"
msgstr[0] "%d ËÏÎÆÌÉËÔ ÓÄ×ÉÇÁ/×Ù×ÏÄÁ"
msgstr[1] "%d ËÏÎÆÌÉËÔÁ ÓÄ×ÉÇÁ/×Ù×ÏÄÁ"
msgstr[2] "%d ËÏÎÆÌÉËÔÏ× ÓÄ×ÉÇÁ/×Ù×ÏÄÁ"
msgstr[0] " %d ËÏÎÆÌÉËÔÏ× ÓÄ×ÉÇÁ/×Ù×ÏÄÁ"
#: src/conflicts.c:309
#: src/conflicts.c:298
#, fuzzy
msgid "and"
msgstr "É"
msgstr " É"
#: src/conflicts.c:315
#, c-format
#: src/conflicts.c:304
#, fuzzy, c-format
msgid "%d reduce/reduce conflict"
msgid_plural "%d reduce/reduce conflicts"
msgstr[0] "%d ËÏÎÆÌÉËÔ ×Ù×ÏÄÁ/×Ù×ÏÄÁ"
msgstr[1] "%d ËÏÎÆÌÉËÔÁ ×Ù×ÏÄÁ/×Ù×ÏÄÁ"
msgstr[2] "%d ËÏÎÆÌÉËÔÏ× ×Ù×ÏÄÁ/×Ù×ÏÄÁ"
msgstr[0] " %d ËÏÎÆÌÉËÔÏ× ×Ù×ÏÄÁ/×Ù×ÏÄÁ"
#: src/conflicts.c:340
#, c-format
#: src/conflicts.c:329
#, fuzzy, c-format
msgid "State %d contains "
msgstr "óÏÓÔÏÑÎÉÅ %d ÓÏÄÅÒÖÉÔ "
msgstr "óÏÓÔÏÑÎÉÅ %d ÓÏÄÅÒÖÉÔ"
#. If invoked with `--yacc', use the output format specified by
#. POSIX.
#: src/conflicts.c:387
#: src/conflicts.c:376
msgid "conflicts: "
msgstr "ËÏÎÆÌÉËÔÙ: "
#: src/conflicts.c:389
#: src/conflicts.c:378
#, c-format
msgid " %d shift/reduce"
msgstr " %d ÓÄ×ÉÇ/×Ù×ÏÄ"
#: src/conflicts.c:393
#: src/conflicts.c:382
#, c-format
msgid " %d reduce/reduce"
msgstr " %d ×Ù×ÏÄ/×Ù×ÏÄ"
#: src/conflicts.c:398 src/reduce.c:508
#: src/conflicts.c:387 src/reduce.c:499
#, c-format
msgid "%s contains "
msgstr "%s ÓÏÄÅÒÖÉÔ "
#: src/conflicts.c:412
#, c-format
#: src/conflicts.c:394
#, fuzzy, 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"
msgstr[0] " %d ËÏÎÆÌÉËÔÏ× ÓÄ×ÉÇÁ/×Ù×ÏÄÁ"
#: 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:467 src/print.c:154
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
"\n"
msgstr ""
" $default\t×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)\n"
"\n"
#: 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:550
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\t×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)\n"
#: src/files.c:151
#: src/files.c:159
#, c-format
msgid "cannot open file `%s'"
msgstr "ÎÅ ÕÄÁÅÔÓÑ ÏÔËÒÙÔØ ÆÁÊÌ `%s'"
#: src/files.c:170
#: src/files.c:178
msgid "cannot close file"
msgstr "ÎÅ ÕÄÁÅÔÓÑ ÚÁËÒÙÔØ ÆÁÊÌ"
#. Some efforts were made to ease the translators' task, please
#. continue.
#: src/getargs.c:84
#: src/getargs.c:55
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
msgstr "GNU bison ÇÅÎÅÒÉÒÕÅÔ ÁÎÁÌÉÚÁÔÏÒÙ ÄÌÑ ÇÒÁÍÍÁÔÉË LALR(1).\n"
#: src/getargs.c:88
#: src/getargs.c:59
#, c-format
msgid "Usage: %s [OPTION]... FILE\n"
msgstr "éÓÐÏÌØÚÏ×ÁÎÉÅ: %s [ëìàþé]... æáêì\n"
#: src/getargs.c:92
#: src/getargs.c:63
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"
@@ -155,7 +126,7 @@ msgstr ""
"Ñ×ÌÑÅÔÓÑ ÏÂÑÚÁÔÅÌØÎÙÍ ÄÌÑ ËÏÒÏÔËÏÊ ÆÏÒÍÙ. ôÏ ÖÅ ËÁÓÁÅÔÓÑ ÎÅÏÂÑÚÁÔÅÌØÎÙÈ\n"
"ÁÒÇÕÍÅÎÔÏ×.\n"
#: src/getargs.c:98
#: src/getargs.c:69
msgid ""
"Operation modes:\n"
" -h, --help display this help and exit\n"
@@ -167,7 +138,7 @@ msgstr ""
" -V, --version ×Ù×ÅÓÔÉ ÉÎÆÏÒÍÁÃÉÀ Ï ×ÅÒÓÉÉ É ×ÙÊÔÉ\n"
" -y, --yacc ÜÍÕÌÉÒÏ×ÁÔØ POSIX yacc\n"
#: src/getargs.c:105
#: src/getargs.c:76
msgid ""
"Parser:\n"
" -S, --skeleton=FILE specify the skeleton to use\n"
@@ -187,7 +158,8 @@ msgstr ""
" -n, --no-parser ÇÅÎÅÒÉÒÏ×ÁÔØ ÔÏÌØËÏ ÔÁÂÌÉÃÙ\n"
" -k, --token-table ×ËÌÀÞÉÔØ ÔÁÂÌÉÃÕ ÉÍÅÎ ÌÅËÓÅÍ\n"
#: src/getargs.c:117
#: src/getargs.c:88
#, fuzzy
msgid ""
"Output:\n"
" -d, --defines also produce a header file\n"
@@ -201,30 +173,28 @@ msgstr ""
" -d, --defines ÓÏÚÄÁÔØ ÔÁËÖÅ ÆÁÊÌ ÚÁÇÏÌÏ×ËÏ×\n"
" -v, --verbose ÓÏÚÄÁÔØ ÔÁËÖÅ ÐÏÑÓÎÅÎÉÑ × Á×ÔÏÍÁÔÕ\n"
" -b, --file-prefix=ðòåæéëó ÕËÁÚÁÔØ ðòåæéëó ÄÌÑ ×ÙÈÏÄÎÙÈ ÆÁÊÌÏ×\n"
" -o, --output=æáêì ÐÏÍÅÓÔÉÔØ ÒÅÚÕÌØÔÁÔ × æáêì\n"
" -o, --output-file=æáêì ÐÏÍÅÓÔÉÔØ ÒÅÚÕÌØÔÁÔ × æáêì\n"
" -g, --graph ÓÏÚÄÁÔØ ÔÁËÖÅ ÐÏÑÓÎÅÎÉÑ Ë Á×ÔÏÍÁÔÕ × ×ÉÄÅ \n"
"VCG-ÇÒÁÆÁ\n"
#: src/getargs.c:127
#: src/getargs.c:98
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:141
#: src/getargs.c:112
#, c-format
msgid "bison (GNU Bison) %s"
msgstr "bison (GNU Bison) %s"
#: src/getargs.c:146
#: src/getargs.c:117
msgid ""
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
"Free Software Foundation, Inc.\n"
"Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"
msgstr ""
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
"Free Software Foundation, Inc.\n"
"Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"
#: src/getargs.c:151
#: src/getargs.c:121
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"
@@ -235,459 +205,450 @@ msgstr ""
"ðòéçïäîïóôé\n"
"äìñ ïðòåäåìåîîïê ãåìé.\n"
#: src/getargs.c:230 src/lex.c:705
#: src/getargs.c:200 src/lex.c:599
#, c-format
msgid "`%s' is no longer supported"
msgstr "`%s' ÂÏÌØÛÅ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ"
#: src/getargs.c:254
#: src/getargs.c:224
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "éÓÐÏÌØÚÕÊÔÅ `%s --help' ÄÌÑ ÄÏÐÏÌÎÉÔÅÌØÎÏÊ ÉÎÆÏÒÍÁÃÉÉ.\n"
#: src/getargs.c:261
#: src/getargs.c:233
#, c-format
msgid "%s: no grammar file given\n"
msgstr "%s: ÎÅ ÚÁÄÁÎ ÆÁÊÌ Ó ÇÒÁÍÍÁÔÉËÏÊ\n"
#: src/getargs.c:265
#: src/getargs.c:237
#, c-format
msgid "%s: extra arguments ignored after `%s'\n"
msgstr "%s: ÌÉÛÎÉÅ ÁÒÇÕÍÅÎÔÙ ÐÏÓÌÅ `%s' ÉÇÎÏÒÉÒÏ×ÁÎÙ\n"
#: src/lalr.c:256
#: src/lalr.c:175
#, c-format
msgid "too many gotos (max %d)"
msgstr "ÓÌÉÛËÏÍ ÍÎÏÇÏ goto (ÍÁËÓÉÍÁÌØÎÏ %d)"
#: src/lex.c:76
#: src/lex.c:77
msgid "unexpected `/' found and ignored"
msgstr "×ÓÔÒÅÞÅÎ É ÐÒÏÉÇÎÏÒÉÒÏ×ÁÎ ÎÅÏÖÉÄÁÎÎÙÊ ÓÉÍ×ÏÌ `/'"
#: src/lex.c:105 src/reader.c:280
#: src/lex.c:106 src/reader.c:302
msgid "unterminated comment"
msgstr "ÎÅÚÁËÏÎÞÅÎÎÙÊ ËÏÍÍÅÎÔÁÒÉÊ"
#: src/lex.c:137
#: src/lex.c:138
msgid "unexpected end of file"
msgstr "ÎÅÏÖÉÄÁÎÎÙÊ ËÏÎÅÃ ÆÁÊÌÁ"
#: src/lex.c:166
#: src/lex.c:157
msgid "unescaped newline in constant"
msgstr "ÎÅÜËÒÁÎÉÒÏ×ÁÎÎÙÊ ÐÅÒÅ×ÏÄ ÓÔÒÏËÉ × ËÏÎÓÔÁÎÔÅ"
#: src/lex.c:208
#: src/lex.c:196
#, c-format
msgid "octal value outside range 0...255: `\\%o'"
msgstr "×ÏÓØÍÅÒÉÞÎÁÑ ×ÅÌÉÞÉÎÁ ÚÁ ÐÒÅÄÅÌÁÍÉ ÄÉÁÐÁÚÏÎÁ 0...255: `\\%o'"
#: src/lex.c:233
#: src/lex.c:221
#, c-format
msgid "hexadecimal value above 255: `\\x%x'"
msgstr "ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÁÑ ×ÅÌÉÞÉÎÁ ÐÒÅ×ÙÛÁÅÔ 255: `\\x%x'"
#: src/lex.c:245
#: src/lex.c:233
#, c-format
msgid "unknown escape sequence: `\\' followed by `%s'"
msgstr "ÎÅÉÚ×ÅÓÔÎÁÑ escape-ÐÏÓÌÅÄÏ×ÁÔÅÌØÎÏÓÔØ: `%s' ÐÏÓÌÅ `\\'"
#: src/lex.c:342
#: src/lex.c:264
msgid "unterminated type name at end of file"
msgstr "ÎÅÚÁËÏÎÞÅÎÎÏÅ ÉÍÑ ÔÉÐÁ × ËÏÎÃÅ ÆÁÊÌÁ"
#: src/lex.c:345
#: src/lex.c:267
msgid "unterminated type name"
msgstr "ÎÅÚÁËÏÎÞÅÎÎÏÅ ÉÍÑ ÔÉÐÁ"
#: src/lex.c:438
#: src/lex.c:359
msgid "use \"...\" for multi-character literal tokens"
msgstr "ÉÓÐÏÌØÚÕÊÔÅ \"...\" ÄÌÑ ÍÎÏÇÏÓÉÍ×ÏÌØÎÙÈ ÌÉÔÅÒÁÌØÎÙÈ ÌÅËÓÅÍ"
#: src/lex.c:678
#: src/lex.c:571
#, c-format
msgid "`%s' supports no argument: %s"
msgstr "`%s' ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ ÁÒÇÕÍÅÎÔÁ %s"
msgstr ""
#: src/lex.c:694
#, c-format
#: src/lex.c:588
#, fuzzy, c-format
msgid "`%s' requires an argument"
msgstr "ËÌÀÞ `%s' ÄÏÌÖÅÎ ÉÓÐÏÌØÚÏ×ÁÔØÓÑ Ó ÁÒÇÕÍÅÎÔÏÍ"
msgstr "%s: ËÌÀÞ `%s' ÄÏÌÖÅÎ ÉÓÐÏÌØÚÏ×ÁÔØÓÑ Ó ÁÒÇÕÍÅÎÔÏÍ\n"
#: src/output.c:951
#: src/output.c:804
#, c-format
msgid "maximum table size (%d) exceeded"
msgstr "ÐÒÅ×ÙÛÅÎ ÍÁËÓÉÍÁÌØÎÙÊ ÒÁÚÍÅÒ ÔÁÂÌÉÃÙ (%d)"
#: src/print.c:39
#: src/print.c:44
#, c-format
msgid " type %d is %s\n"
msgstr " ÔÉÐ %d Ñ×ÌÑÅÔÓÑ %s\n"
#: src/print.c:88
#: src/print.c:106
#, c-format
msgid " (rule %d)"
msgstr " (ÐÒÁ×ÉÌÏ %d)"
#: src/print.c:108
msgid " $default\taccept\n"
msgstr " $default\tÐÒÉÎÑÔÉÅ\n"
#: src/print.c:110
msgid " NO ACTIONS\n"
msgstr " îåô äåêóô÷éê\n"
#: src/print.c:124
#, c-format
msgid " $ \tgo to state %d\n"
msgstr " $ \tÐÅÒÅÈÏÄ × ÓÏÓÔÏÑÎÉÅ %d\n"
#: src/print.c:127
#, c-format
msgid " %-4s\tshift, and go to state %d\n"
msgstr " %-4s\tÓÄ×ÉÇ, É ÐÅÒÅÈÏÄ × ÓÏÓÔÏÑÎÉÅ %d\n"
#: src/print.c:142
#: src/print.c:144
#, c-format
msgid " %-4s\terror (nonassociative)\n"
msgstr " %-4s\tÏÛÉÂËÁ (ÎÅÁÓÓÏÃÉÁÔÉ×ÎÁÑ)\n"
#: src/print.c:169
#: src/print.c:168
#, c-format
msgid " %-4s\tgo to state %d\n"
msgstr " %-4s\tÐÅÒÅÈÏÄ × ÓÏÓÔÏÑÎÉÅ %d\n"
#: src/print.c:180
#: src/print.c:192 src/print.c:228
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
"\n"
msgstr ""
" $default\t×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)\n"
"\n"
#: src/print.c:224 src/print.c:301
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)]\n"
#: src/print.c:282 src/print.c:295
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\t×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)\n"
#: src/print.c:311
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\t×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)\n"
#: src/print.c:327
msgid " $default\taccept\n"
msgstr " $default\tÐÒÉÎÑÔÉÅ\n"
#: src/print.c:329
msgid " NO ACTIONS\n"
msgstr " îåô äåêóô÷éê\n"
#: src/print.c:342
#, c-format
msgid "state %d"
msgstr "ÓÏÓÔÏÑÎÉÅ %d"
#. rule # : LHS -> RHS
#: src/print.c:211
#: src/print.c:373
msgid "Grammar"
msgstr "çÒÁÍÍÁÔÉËÁ"
#: src/print.c:212
#: src/print.c:374
msgid "Number, Line, Rule"
msgstr "îÏÍÅÒ, óÔÒÏËÁ, ðÒÁ×ÉÌÏ"
msgstr ""
#: src/print.c:217
#, c-format
#: src/print.c:379
#, fuzzy, c-format
msgid " %3d %3d %s ->"
msgstr " %3d %3d %s ->"
msgstr "ÐÒÁ×ÉÌÏ %-4d %s ->"
#: src/print.c:224
#: src/print.c:386
msgid "empty"
msgstr "ÐÕÓÔÏ"
msgstr ""
#. TERMINAL (type #) : rule #s terminal is on RHS
#: src/print.c:231
#: src/print.c:393
msgid "Terminals, with rules where they appear"
msgstr "ôÅÒÍÉÎÁÌØÎÙÅ ÓÉÍ×ÏÌÙ Ó ÐÒÁ×ÉÌÁÍÉ, × ËÏÔÏÒÙÈ ÏÎÉ ÐÏÑ×ÌÑÀÔÓÑ"
#: src/print.c:256
#: src/print.c:416
msgid "Nonterminals, with rules where they appear"
msgstr "îÅÔÅÒÍÉÎÁÌØÎÙÅ ÓÉÍ×ÏÌÙ Ó ÐÒÁ×ÉÌÁÍÉ, × ËÏÔÏÒÙÈ ÏÎÉ ÐÏÑ×ÌÑÀÔÓÑ"
#: src/print.c:282
#: src/print.c:442
msgid " on left:"
msgstr " ÎÁÌÅ×Ï:"
#: src/print.c:297
#: src/print.c:457
msgid " on right:"
msgstr " ÎÁÐÒÁ×Ï:"
#. 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ÏÛÉÂËÁ (ÎÅÁÓÓÏÃÉÁÔÉ×ÎÁÑ)"
#.
#. 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:89
#: src/reader.c:100
msgid " Skipping to next \\n"
msgstr " ðÒÏÐÕÓË ÄÏ ÓÌÅÄÕÀÝÅÇÏ \\n"
#: src/reader.c:91
#: src/reader.c:102
#, c-format
msgid " Skipping to next %c"
msgstr " ðÒÏÐÕÓË ÄÏ ÓÌÅÄÕÀÝÅÇÏ %c"
#: src/reader.c:142 src/reader.c:154
#: src/reader.c:153 src/reader.c:165
msgid "invalid $ value"
msgstr "ÎÅ×ÅÒÎÏÅ $ ÚÎÁÞÅÎÉÅ"
#: src/reader.c:180 src/reader.c:195
#: src/reader.c:192 src/reader.c:207
msgid "unterminated string at end of file"
msgstr "ÎÅÚÁËÏÎÞÅÎÎÁÑ ÓÔÒÏËÁ × ËÏÎÃÅ ÆÁÊÌÁ"
#: src/reader.c:183
#: src/reader.c:195
msgid "unterminated string"
msgstr "ÎÅÚÁËÏÎÞÅÎÎÁÑ ÓÔÒÏËÁ"
#: src/reader.c:339
#, fuzzy
msgid "invalid @ value"
#: src/reader.c:337 src/reader.c:401
#, fuzzy, c-format
msgid "invalid value: %s%d"
msgstr "ÎÅ×ÅÒÎÏÅ $ ÚÎÁÞÅÎÉÅ"
#: src/reader.c:352 src/reader.c:416
#: src/reader.c:351 src/reader.c:423
#, c-format
msgid "%s is invalid"
msgstr "ÎÅ×ÅÒÎÙÊ ÚÎÁË %s"
#: src/reader.c:392
#: src/reader.c:391
#, c-format
msgid "$$ of `%s' has no declared type"
msgstr "$$ × `%s' ÎÅ ÉÍÅÅÔ ÏÐÉÓÁÎÎÏÇÏ ÔÉÐÁ"
#: src/reader.c:409
#: src/reader.c:415
#, c-format
msgid "$%d of `%s' has no declared type"
msgstr "$%d ÉÚ `%s' ÎÅ ÉÍÅÅÔ ÏÐÉÓÁÎÎÏÇÏ ÔÉÐÁ"
#: src/reader.c:463
#: src/reader.c:473
msgid "unterminated `%{' definition"
msgstr "ÎÅÚÁËÏÎÞÅÎÎÏÅ ÏÐÒÅÄÅÌÅÎÉÅ `%{'"
#: src/reader.c:508 src/reader.c:623 src/reader.c:673
#: src/reader.c:518 src/reader.c:636 src/reader.c:686 src/reader.c:933
#, c-format
msgid "Premature EOF after %s"
msgstr "ðÒÅÖÄÅ×ÒÅÍÅÎÎÙÊ ËÏÎÅà ÆÁÊÌÁ ÐÏÓÌÅ %s"
#: src/reader.c:525
#: src/reader.c:535
#, c-format
msgid "symbol `%s' used more than once as a literal string"
msgstr ""
#: src/reader.c:528
#: src/reader.c:538
#, c-format
msgid "symbol `%s' given more than one literal string"
msgstr ""
#: src/reader.c:549 src/reader.c:692
#: src/reader.c:559 src/reader.c:705
#, c-format
msgid "symbol %s redefined"
msgstr "ÐÏ×ÔÏÒÎÏÅ ÏÐÒÅÄÅÌÅÎÉÅ ÓÉÍ×ÏÌÁ %s"
#: src/reader.c:559 src/reader.c:638 src/reader.c:699 src/reader.c:1314
#: src/reader.c:569 src/reader.c:651 src/reader.c:712
#, c-format
msgid "type redeclaration for %s"
msgstr "ÐÏ×ÔÏÒÎÏÅ ÏÐÉÓÁÎÉÅ ÔÉÐÁ ÄÌÑ %s"
#: src/reader.c:568
#: src/reader.c:581
#, c-format
msgid "`%s' is invalid in %s"
msgstr "`%s' ÎÅ×ÅÒÎÏ × %s"
#: src/reader.c:586 src/reader.c:751
#: src/reader.c:599 src/reader.c:758
#, c-format
msgid "multiple %s declarations"
msgstr "ÍÎÏÖÅÓÔ×ÅÎÎÏÅ ÏÐÉÓÁÎÉÅ %s"
#: src/reader.c:588 src/reader.c:930 src/reader.c:955 src/reader.c:1292
#: src/reader.c:601 src/reader.c:913 src/reader.c:928 src/reader.c:961
#: src/reader.c:975 src/reader.c:1178
#, c-format
msgid "invalid %s declaration"
msgstr "ÎÅ×ÅÒÎÏÅ ÏÐÉÓÁÎÉÅ %s"
#: src/reader.c:608
#: src/reader.c:621
msgid "%type declaration has no <typename>"
msgstr "ÏÐÉÓÁÎÉÅ %type ÎÅ ÉÍÅÅÔ <ÉÍÑ_ÔÉÐÁ>"
#: src/reader.c:643
#: src/reader.c:656
#, c-format
msgid "invalid %%type declaration due to item: %s"
msgstr "ÎÅ×ÅÒÎÏÅ ÏÐÉÓÁÎÉÅ %%type ÉÚ-ÚÁ ÜÌÅÍÅÎÔÁ: %s"
#: src/reader.c:688
#: src/reader.c:701
#, c-format
msgid "redefining precedence of %s"
msgstr "ÐÅÒÅÏÐÒÅÄÅÌÅÎÉÅ ÐÒÉÏÒÉÔÅÔÁ ÄÌÑ %s"
#: src/reader.c:711
#: src/reader.c:724
#, c-format
msgid "invalid text (%s) - number should be after identifier"
msgstr "ÎÅ×ÅÒÎÙÊ ÔÅËÓÔ (%s) - ÞÉÓÌÏ ÄÏÌÖÎÏ ÓÌÅÄÏ×ÁÔØ ÚÁ ÉÄÅÎÔÉÆÉËÁÔÏÒÏÍ"
#: src/reader.c:721
#: src/reader.c:734
#, c-format
msgid "unexpected item: %s"
msgstr "ÎÅÏÖÉÄÁÎÎÙÊ ÜÌÅÍÅÎÔ: %s"
#: src/reader.c:794 src/reader.c:1126 src/reader.c:1203
#: src/reader.c:790 src/reader.c:1149
#, c-format
msgid "unmatched %s"
msgstr "ÎÅÐÁÒÎÁÑ %s"
#: src/reader.c:826
#: src/reader.c:819
#, c-format
msgid "argument of %%expect is not an integer"
msgstr "ÁÒÇÕÍÅÎÔ %%expect ÎÅ Ñ×ÌÑÅÔÓÑ ÃÅÌÙÍ ÞÉÓÌÏÍ"
#: src/reader.c:872
#: src/reader.c:865
#, c-format
msgid "unrecognized item %s, expected an identifier"
msgstr "ÎÅÒÁÓÐÏÚÎÁÎÎÙÊ ÜÌÅÍÅÎÔ %s, ÏÖÉÄÁÌÓÑ ÉÄÅÎÔÉÆÉËÁÔÏÒ"
#: src/reader.c:894
#: src/reader.c:887
#, c-format
msgid "expected string constant instead of %s"
msgstr "×ÍÅÓÔÏ %s ÏÖÉÄÁÌÁÓØ ÓÔÒÏËÏ×ÁÑ ÐÏÓÔÏÑÎÎÁÑ"
#: src/reader.c:1042
#: src/reader.c:1080
#, c-format
msgid "unrecognized: %s"
msgstr "ÎÅÒÁÓÐÏÚÎÁÎÏ: %s"
#: src/reader.c:1047
#: src/reader.c:1085
msgid "no input grammar"
msgstr "ÎÅÔ ×ÈÏÄÎÏÊ ÇÒÁÍÍÁÔÉËÉ"
#: src/reader.c:1052
#: src/reader.c:1090
#, c-format
msgid "unknown character: %s"
msgstr "ÎÅÉÚ×ÅÓÔÎÙÊ ÓÉÍ×ÏÌ: %s"
#: src/reader.c:1226
#, c-format
msgid "unterminated %guard clause"
msgstr "ÎÅÚÁËÏÎÞÅÎÎÙÊ ÏÐÅÒÁÔÏÒ %guard"
#: src/reader.c:1379
#: src/reader.c:1265
msgid "ill-formed rule: initial symbol not followed by colon"
msgstr "ÎÅ×ÅÒÎÏÅ ÐÒÁ×ÉÌÏ: Ä×ÏÅÔÏÞÉÅ ÎÅ ÓÌÅÄÕÅÔ ÚÁ ÎÁÞÁÌØÎÙÍ ÓÉÍ×ÏÌÏÍ"
#: src/reader.c:1386
#: src/reader.c:1272
msgid "grammar starts with vertical bar"
msgstr "ÇÒÁÍÍÁÔÉËÁ ÎÁÞÉÎÁÅÔÓÑ Ó ×ÅÒÔÉËÁÌØÎÏÊ ÞÅÒÔÙ"
#: src/reader.c:1414
#: src/reader.c:1300
#, c-format
msgid "rule given for %s, which is a token"
msgstr "ÐÒÁ×ÉÌÏ ÚÁÄÁÎÏ ÄÌÑ %s, ËÏÔÏÒÙÊ Ñ×ÌÑÅÔÓÑ ÌÅËÓÅÍÏÊ"
#: src/reader.c:1444 src/reader.c:1556
msgid "previous rule lacks an ending `;'"
msgstr ""
#: src/reader.c:1517
#: src/reader.c:1405
msgid "two @prec's in a row"
msgstr "Ä×Á @prec ÐÏÄÒÑÄ"
#: src/reader.c:1525
#: src/reader.c:1414
#, c-format
msgid "%%guard present but %%semantic_parser not specified"
msgstr "%%guard ÐÒÉÓÕÔÓÔ×ÕÅÔ, Á %%semantic_parser ÎÅ ÚÁÄÁÎ"
#: src/reader.c:1534
#: src/reader.c:1424
msgid "two actions at end of one rule"
msgstr "Ä×Á ÄÅÊÓÔ×ÉÑ × ËÏÎÃÅ ÏÄÎÏÇÏ ÐÒÁ×ÉÌÁ"
#: src/reader.c:1548
#: src/reader.c:1438
#, c-format
msgid "type clash (`%s' `%s') on default action"
msgstr "ËÏÎÆÌÉËÔ ÔÉÐÏ× (`%s' `%s') ÎÁ ÄÅÊÓÔ×ÉÉ ÐÏ ÕÍÏÌÞÁÎÉÀ"
#: src/reader.c:1554
#: src/reader.c:1444
msgid "empty rule for typed nonterminal, and no action"
msgstr ""
"ÐÕÓÔÏÅ ÐÒÁ×ÉÌÏ ÄÌÑ ÔÉÐÉÚÉÒÏ×ÁÎÎÏÇÏ ÎÅÔÅÒÍÉÎÁÌØÎÏÇÏ ÓÉÍ×ÏÌÁ, É ÎÅÔ ÄÅÊÓÔ×ÉÑ"
#: src/reader.c:1600
#: src/reader.c:1450
#, c-format
msgid "invalid input: %s"
msgstr "ÎÅ×ÅÒÎÙÅ ×ÈÏÄÎÙÅ ÄÁÎÎÙÅ: %s"
#: src/reader.c:1608
#, c-format
msgid "too many symbols (tokens plus nonterminals); maximum %d"
msgstr "ÓÌÉÛËÏÍ ÍÎÏÇÏ ÓÉÍ×ÏÌÏ× (ÌÅËÓÅÍÙ ÐÌÀÓ ÎÅÔÅÒÍÉÎÁÌÙ); ÍÁËÓÉÍÁÌØÎÏ %d"
#: src/reader.c:1611
#: src/reader.c:1457
msgid "no rules in the input grammar"
msgstr "ÏÔÓÕÔÓÔ×ÕÀÔ ÐÒÁ×ÉÌÁ ×Ï ×ÈÏÄÎÏÊ ÇÒÁÍÍÁÔÉËÅ"
#: src/reader.c:1635
#: src/reader.c:1465
#, c-format
msgid "symbol %s is used, but is not defined as a token and has no rules"
msgstr "ÓÉÍ×ÏÌ %s ÉÓÐÏÌØÚÕÅÔÓÑ, ÎÏ ÎÅ ÏÐÒÅÄÅÌÅÎ ËÁË ÌÅËÓÅÍÁ É ÎÅ ÉÍÅÅÔ ÐÒÁ×ÉÌ"
#: src/reader.c:1770
#: src/reader.c:1487
#, c-format
msgid "too many symbols (tokens plus nonterminals); maximum %d"
msgstr "ÓÌÉÛËÏÍ ÍÎÏÇÏ ÓÉÍ×ÏÌÏ× (ÌÅËÓÅÍÙ ÐÌÀÓ ÎÅÔÅÒÍÉÎÁÌÙ); ÍÁËÓÉÍÁÌØÎÏ %d"
#: src/reader.c:1551
#, c-format
msgid "tokens %s and %s both assigned number %d"
msgstr "ÏÂÅÉÍ ÌÅËÓÅÍÁÍ %s É %s ÐÒÉÓ×ÏÅÎ ÎÏÍÅÒ %d"
#: src/reader.c:1823
#: src/reader.c:1601
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "ÐÒÏÔÉ×ÏÒÅÞÉ×ÙÅ ÐÒÉÏÒÉÔÅÔÙ ÄÌÑ %s É %s"
#: src/reader.c:1835
#: src/reader.c:1613
#, c-format
msgid "conflicting assoc values for %s and %s"
msgstr "ÐÒÏÔÉ×ÏÒÅÞÉ×ÙÅ ÚÎÁÞÅÎÉÑ ÁÓÓÏÃÉÁÔÉ×ÎÏÓÔÉ ÄÌÑ %s É %s"
#: src/reader.c:1874
#: src/reader.c:1650
#, c-format
msgid "the start symbol %s is undefined"
msgstr "ÎÁÞÁÌØÎÙÊ ÓÉÍ×ÏÌ %s ÎÅÏÐÒÅÄÅÌÅÎ"
#: src/reader.c:1876
#: src/reader.c:1652
#, c-format
msgid "the start symbol %s is a token"
msgstr "ÎÁÞÁÌØÎÙÊ ÓÉÍ×ÏÌ %s Ñ×ÌÑÅÔÓÑ ÌÅËÓÅÍÏÊ"
#: src/reduce.c:409
#: src/reader.c:1672
#, fuzzy, c-format
msgid "too many items (max %d)"
msgstr "ÓÌÉÛËÏÍ ÍÎÏÇÏ ÓÏÓÔÏÑÎÉÊ (ÍÁËÓÉÍÁÌØÎÏ %d)"
#: src/reduce.c:398
msgid "Useless nonterminals:"
msgstr "âÅÓÐÏÌÅÚÎÙÅ ÎÅÔÅÒÍÉÎÁÌÙ:"
#: src/reduce.c:422
#: src/reduce.c:411
msgid "Terminals which are not used:"
msgstr "îÅÉÓÐÏÌØÚÏ×ÁÎÎÙÅ ÔÅÒÍÉÎÁÌÙ:"
#: src/reduce.c:433
#: src/reduce.c:422
msgid "Useless rules:"
msgstr "âÅÓÐÏÌÅÚÎÙÅ ÐÒÁ×ÉÌÁ:"
#: src/reduce.c:503
#, c-format
#: src/reduce.c:494
#, fuzzy, c-format
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"
msgstr[0] "%d ÐÒÁ×ÉÌ ÎÅ Ó×ÅÄÅÎÏ\n"
#: src/reduce.c:511
#, c-format
#: src/reduce.c:502
#, fuzzy, c-format
msgid "%d useless nonterminal"
msgid_plural "%d useless nonterminals"
msgstr[0] "%d ÂÅÓÐÏÌÅÚÎÙÊ ÎÅÔÅÒÍÉÎÁÌ"
msgstr[1] "%d ÂÅÓÐÏÌÅÚÎÙÈ ÎÅÔÅÒÍÉÎÁÌÁ"
msgstr[2] "%d ÂÅÓÐÏÌÅÚÎÙÈ ÎÅÔÅÒÍÉÎÁÌÏ×"
msgstr[0] "%d ÂÅÓÐÏÌÅÚÎÙÈ ÎÅÔÅÒÍÉÎÁÌÏ×%s"
#: src/reduce.c:517
#: src/reduce.c:508
msgid " and "
msgstr " É "
#: src/reduce.c:520
#, c-format
#: src/reduce.c:511
#, fuzzy, c-format
msgid "%d useless rule"
msgid_plural "%d useless rules"
msgstr[0] "%d ÂÅÓÐÏÌÅÚÎÏÅ ÐÒÁ×ÉÌÏ"
msgstr[1] "%d ÂÅÓÐÏÌÅÚÎÙÈ ÐÒÁ×ÉÌÁ"
msgstr[2] "%d ÂÅÓÐÏÌÅÚÎÙÈ ÐÒÁ×ÉÌ"
msgstr[0] "%d ÂÅÓÐÏÌÅÚÎÙÈ ÐÒÁ×ÉÌ%s"
#: src/reduce.c:551
#: src/reduce.c:542
#, c-format
msgid "Start symbol %s does not derive any sentence"
msgstr "îÁÞÁÌØÎÙÊ ÓÉÍ×ÏÌ %s ÎÅ ×Ù×ÏÄÉÔ ÎÉ ÏÄÎÏÇÏ ÐÒÅÄÌÏÖÅÎÉÑ"
@@ -779,36 +740,21 @@ msgstr "`"
msgid "'"
msgstr "'"
#~ msgid " 1 shift/reduce conflict"
#~ msgstr " 1 ËÏÎÆÌÉËÔ ÓÄ×ÉÇÁ/×Ù×ÏÄÁ"
#~ msgid "%-4s\terror (nonassociative)"
#~ msgstr "%-4s\tÏÛÉÂËÁ (ÎÅÁÓÓÏÃÉÁÔÉ×ÎÁÑ)"
#~ msgid " 1 reduce/reduce conflict"
#~ msgstr " 1 ËÏÎÆÌÉËÔ ×Ù×ÏÄÁ/×Ù×ÏÄÁ"
#~ msgid "$default\treduce using rule %d (%s)"
#~ msgstr "$default\t×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)"
#~ msgid "%s contains"
#~ msgstr "%s ÓÏÄÅÒÖÉÔ"
#~ msgid "unterminated %guard clause"
#~ msgstr "ÎÅÚÁËÏÎÞÅÎÎÙÊ ÏÐÅÒÁÔÏÒ %guard"
#~ msgid "DERIVES"
#~ msgstr "DERIVES"
#~ msgid "%s derives"
#~ msgstr "%s ×Ù×ÏÄÉÔ"
#~ msgid " $ \tgo to state %d\n"
#~ msgstr " $ \tÐÅÒÅÈÏÄ × ÓÏÓÔÏÑÎÉÅ %d\n"
#~ msgid "%s: internal error: %s\n"
#~ msgstr "%s: ×ÎÕÔÒÅÎÎÑÑ ÏÛÉÂËÁ: %s\n"
#~ msgid "Entering set_nullable"
#~ msgstr "÷ÈÏÄ × set_nullable"
#~ msgid "\t\t/* empty */"
#~ msgstr "\t\t/* ÐÕÓÔÏ */"
#~ msgid "multiple %%header_extension declarations"
#~ msgstr "ÍÎÏÖÅÓÔ×ÅÎÎÙÅ ÏÐÉÓÁÎÉÑ %%header_extension"
#~ msgid "multiple %%source_extension declarations"
#~ msgstr "ÍÎÏÖÅÓÔ×ÅÎÎÙÅ ÏÐÉÓÁÎÉÑ %%source_extension"
#~ msgid ""
#~ "Variables\n"
#~ "---------\n"
@@ -839,11 +785,38 @@ msgstr "'"
#~ "--------------------------\n"
#~ "\n"
#~ 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 "Entering set_nullable"
#~ msgstr "÷ÈÏÄ × set_nullable"
#~ 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 "\t\t/* empty */"
#~ msgstr "\t\t/* ÐÕÓÔÏ */"
#~ msgid "multiple %%header_extension declarations"
#~ msgstr "ÍÎÏÖÅÓÔ×ÅÎÎÙÅ ÏÐÉÓÁÎÉÑ %%header_extension"
#~ msgid "multiple %%source_extension declarations"
#~ msgstr "ÍÎÏÖÅÓÔ×ÅÎÎÙÅ ÏÐÉÓÁÎÉÑ %%source_extension"
#~ msgid "@%s is invalid"
#~ msgstr "ÎÅ×ÅÒÎÙÊ ÚÎÁË @%s"
+240 -208
View File
@@ -1,13 +1,13 @@
# Swedish messages for bison.
# Copyright © 2001, 2002 Free Software Foundation, Inc.
# Göran Uddeborg <[email protected]>, 2001, 2002.
# Copyright © 2001 Free Software Foundation, Inc.
# Göran Uddeborg <[email protected]>, 2001.
# $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"
"Project-Id-Version: bison 1.30c\n"
"POT-Creation-Date: 2002-01-29 17:17+0100\n"
"PO-Revision-Date: 2001-11-18 15:17+0100\n"
"Last-Translator: Göran Uddeborg <[email protected]>\n"
"Language-Team: Swedish <[email protected]>\n"
"MIME-Version: 1.0\n"
@@ -15,7 +15,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/LR0.c:189
#: src/LR0.c:194
#, c-format
msgid "too many states (max %d)"
msgstr "för många tillstånd (max %d)"
@@ -32,120 +32,96 @@ msgstr "varning: "
msgid "fatal error: "
msgstr "ödesdigert fel: "
#: src/conflicts.c:44
#: src/conflicts.c:46
#, 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
#: src/conflicts.c:111 src/conflicts.c:133
msgid "reduce"
msgstr "reducera"
#: src/conflicts.c:101 src/conflicts.c:115
#: src/conflicts.c:116 src/conflicts.c:128
msgid "shift"
msgstr "skifta"
#: src/conflicts.c:123
#: src/conflicts.c:138
msgid "an error"
msgstr "ett fel"
#: src/conflicts.c:302
#: src/conflicts.c:291
#, 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
#: src/conflicts.c:298
msgid "and"
msgstr "och"
#: src/conflicts.c:315
#: src/conflicts.c:304
#, 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
#: src/conflicts.c:329
#, 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
#: src/conflicts.c:376
msgid "conflicts: "
msgstr "konflikter: "
#: src/conflicts.c:389
#: src/conflicts.c:378
#, c-format
msgid " %d shift/reduce"
msgstr " %d skifta/reducera"
#: src/conflicts.c:393
#: src/conflicts.c:382
#, c-format
msgid " %d reduce/reduce"
msgstr " %d reducera/reducera"
#: src/conflicts.c:398 src/reduce.c:508
#: src/conflicts.c:387 src/reduce.c:499
#, c-format
msgid "%s contains "
msgstr "%s innehåller "
#: src/conflicts.c:412
#, c-format
#: src/conflicts.c:394
#, fuzzy, 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"
msgstr[0] "förväntade %d skifta/reducerakonflikt"
msgstr[1] "förväntade %d skifta/reducerakonflikter"
#: 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
#: src/files.c:159
#, c-format
msgid "cannot open file `%s'"
msgstr "kan inte öppna filen \"%s\""
#: src/files.c:170
#: src/files.c:178
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
#: src/getargs.c:55
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
#: src/getargs.c:59
#, c-format
msgid "Usage: %s [OPTION]... FILE\n"
msgstr "Användning: %s [FLAGGA]... FIL\n"
#: src/getargs.c:92
#: src/getargs.c:63
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"
@@ -154,7 +130,7 @@ msgstr ""
"obligatoriskt för den motsvarande korta flaggan också. Motsvarande\n"
"för valfria argument.\n"
#: src/getargs.c:98
#: src/getargs.c:69
msgid ""
"Operation modes:\n"
" -h, --help display this help and exit\n"
@@ -166,7 +142,7 @@ msgstr ""
" -V, --version visa versionsinformation och avsluta\n"
" -y, --yacc emulera POSIX-yacc\n"
#: src/getargs.c:105
#: src/getargs.c:76
msgid ""
"Parser:\n"
" -S, --skeleton=FILE specify the skeleton to use\n"
@@ -186,7 +162,7 @@ msgstr ""
" -n, --no-parser generera endast tabellerna\n"
" -k, --token-table inkludera en tabell över elementnamn\n"
#: src/getargs.c:117
#: src/getargs.c:88
msgid ""
"Output:\n"
" -d, --defines also produce a header file\n"
@@ -203,28 +179,26 @@ msgstr ""
" -o, --output=FIL lägg utdata i FIL\n"
" -g, --graph skapa också en VCG-beskrivning av automaten\n"
#: src/getargs.c:127
#: src/getargs.c:98
msgid "Report bugs to <[email protected]>.\n"
msgstr ""
"Rapportera fel till <[email protected]>.\n"
"Rapportera synpunkter på översättningen till <[email protected]>.\n"
"Rapportera anmärkningar på översättningen till <[email protected]>.\n"
#. Some efforts were made to ease the translators' task, please
#. continue.
#: src/getargs.c:141
#: src/getargs.c:112
#, c-format
msgid "bison (GNU Bison) %s"
msgstr "bison (GNU Bison) %s"
#: src/getargs.c:146
#: src/getargs.c:117
msgid ""
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
"Free Software Foundation, Inc.\n"
"Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"
msgstr ""
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
"Free Software Foundation, Inc.\n"
"Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"
#: src/getargs.c:151
#: src/getargs.c:121
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"
@@ -233,456 +207,454 @@ msgstr ""
"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
#: src/getargs.c:200 src/lex.c:599
#, c-format
msgid "`%s' is no longer supported"
msgstr "\"%s\" stöds inte längre"
#: src/getargs.c:254
#: src/getargs.c:224
#, 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
#: src/getargs.c:233
#, c-format
msgid "%s: no grammar file given\n"
msgstr "%s: ingen grammatikfil angiven\n"
#: src/getargs.c:265
#: src/getargs.c:237
#, c-format
msgid "%s: extra arguments ignored after `%s'\n"
msgstr "%s: extra argument ignorerade efter \"%s\"\n"
#: src/lalr.c:256
#: src/lalr.c:175
#, c-format
msgid "too many gotos (max %d)"
msgstr "för många goto (max %d)"
#: src/lex.c:76
#: src/lex.c:77
msgid "unexpected `/' found and ignored"
msgstr "oväntat \"/\" hittat och ignorerat"
#: src/lex.c:105 src/reader.c:280
#: src/lex.c:106 src/reader.c:302
msgid "unterminated comment"
msgstr "oavslutad kommentar"
#: src/lex.c:137
#: src/lex.c:138
msgid "unexpected end of file"
msgstr "oväntat filslut"
#: src/lex.c:166
#: src/lex.c:157
msgid "unescaped newline in constant"
msgstr "oskyddat nyradstecken i konstant"
#: src/lex.c:208
#: src/lex.c:196
#, c-format
msgid "octal value outside range 0...255: `\\%o'"
msgstr "oktalt värde utanför intervallet 0-255: \"\\%o\""
#: src/lex.c:233
#: src/lex.c:221
#, c-format
msgid "hexadecimal value above 255: `\\x%x'"
msgstr "hexadecimalt värde över 255: \"\\x%x\""
#: src/lex.c:245
#: src/lex.c:233
#, c-format
msgid "unknown escape sequence: `\\' followed by `%s'"
msgstr "okänd specialsekvens: \"\\\" följt av \"%s\""
#: src/lex.c:342
#: src/lex.c:264
msgid "unterminated type name at end of file"
msgstr "oavslutat typnamn vid filslut"
#: src/lex.c:345
#: src/lex.c:267
msgid "unterminated type name"
msgstr "oavslutat typnamn"
#: src/lex.c:438
#: src/lex.c:359
msgid "use \"...\" for multi-character literal tokens"
msgstr "använd \"...\" för bokstavliga element med mer än ett tecken"
#: src/lex.c:678
#: src/lex.c:571
#, c-format
msgid "`%s' supports no argument: %s"
msgstr "\"%s\" stödjer inga argument: %s"
#: src/lex.c:694
#: src/lex.c:588
#, c-format
msgid "`%s' requires an argument"
msgstr "\"%s\" behöver ett argument"
#: src/output.c:951
#: src/output.c:804
#, c-format
msgid "maximum table size (%d) exceeded"
msgstr "maximal tabellstorlek (%d) överskriden"
#: src/print.c:39
#: src/print.c:44
#, c-format
msgid " type %d is %s\n"
msgstr " typ %d är %s\n"
#: src/print.c:88
#: src/print.c:106
#, 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
#: src/print.c:144
#, c-format
msgid " %-4s\terror (nonassociative)\n"
msgstr " %-4s\tfel (ickeassociativ)\n"
#: src/print.c:169
#: src/print.c:168
#, c-format
msgid " %-4s\tgo to state %d\n"
msgstr " %-4s\tgå till tillstånd %d\n"
#: src/print.c:180
#: src/print.c:192 src/print.c:228
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
"\n"
msgstr ""
" $standard\treducera med regel %d (%s)\n"
"\n"
#: src/print.c:224 src/print.c:301
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[reducera med regel %d (%s)]\n"
#: src/print.c:282 src/print.c:295
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\treducera med regel %d (%s)\n"
#: src/print.c:311
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $standard\treducera med regel %d (%s)\n"
#: src/print.c:327
msgid " $default\taccept\n"
msgstr " $standard\tacceptera\n"
#: src/print.c:329
msgid " NO ACTIONS\n"
msgstr " INGA ÅTGÄRDER\n"
#: src/print.c:342
#, c-format
msgid "state %d"
msgstr "tillstånd %d"
#. rule # : LHS -> RHS
#: src/print.c:211
#: src/print.c:373
msgid "Grammar"
msgstr "Grammatik"
#: src/print.c:212
#: src/print.c:374
msgid "Number, Line, Rule"
msgstr "Nummer, Rad, Regel"
msgstr ""
#: src/print.c:217
#, c-format
#: src/print.c:379
#, fuzzy, c-format
msgid " %3d %3d %s ->"
msgstr " %3d %3d %s ->"
msgstr "regel %-4d %s ->"
#: src/print.c:224
#: src/print.c:386
msgid "empty"
msgstr "tom"
#. TERMINAL (type #) : rule #s terminal is on RHS
#: src/print.c:231
#: src/print.c:393
msgid "Terminals, with rules where they appear"
msgstr "Terminaler, med regler där de förekommer"
#: src/print.c:256
#: src/print.c:416
msgid "Nonterminals, with rules where they appear"
msgstr "Icketerminaler, med regler där de förekommer"
#: src/print.c:282
#: src/print.c:442
msgid " on left:"
msgstr " till vänster:"
#: src/print.c:297
#: src/print.c:457
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
#: src/reader.c:100
msgid " Skipping to next \\n"
msgstr " Hoppar över till nästa \\n"
#: src/reader.c:91
#: src/reader.c:102
#, c-format
msgid " Skipping to next %c"
msgstr " Hoppar över till nästa %c"
#: src/reader.c:142 src/reader.c:154
#: src/reader.c:153 src/reader.c:165
msgid "invalid $ value"
msgstr "felaktigt $-värde"
#: src/reader.c:180 src/reader.c:195
#: src/reader.c:192 src/reader.c:207
msgid "unterminated string at end of file"
msgstr "oavslutad sträng vid filslut"
#: src/reader.c:183
#: src/reader.c:195
msgid "unterminated string"
msgstr "oavslutad sträng"
#: src/reader.c:339
msgid "invalid @ value"
msgstr "felaktigt @-värde"
#: src/reader.c:337 src/reader.c:401
#, fuzzy, c-format
msgid "invalid value: %s%d"
msgstr "felaktigt $-värde"
#: src/reader.c:352 src/reader.c:416
#: src/reader.c:351 src/reader.c:423
#, c-format
msgid "%s is invalid"
msgstr "%s är felaktigt"
#: src/reader.c:392
#: src/reader.c:391
#, c-format
msgid "$$ of `%s' has no declared type"
msgstr "$$ för \"%s\" har ingen deklarerad typ"
#: src/reader.c:409
#: src/reader.c:415
#, c-format
msgid "$%d of `%s' has no declared type"
msgstr "$%d för \"%s\" har ingen deklarerad typ"
#: src/reader.c:463
#: src/reader.c:473
msgid "unterminated `%{' definition"
msgstr "oavslutad \"%{\"-definition"
#: src/reader.c:508 src/reader.c:623 src/reader.c:673
#: src/reader.c:518 src/reader.c:636 src/reader.c:686 src/reader.c:933
#, c-format
msgid "Premature EOF after %s"
msgstr "Förtida filslut efter %s"
#: src/reader.c:525
#: src/reader.c:535
#, 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
#: src/reader.c:538
#, 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
#: src/reader.c:559 src/reader.c:705
#, 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
#: src/reader.c:569 src/reader.c:651 src/reader.c:712
#, c-format
msgid "type redeclaration for %s"
msgstr "typen omdeklarerad för %s"
#: src/reader.c:568
#: src/reader.c:581
#, c-format
msgid "`%s' is invalid in %s"
msgstr "\"%s\" är felaktig i %s"
#: src/reader.c:586 src/reader.c:751
#: src/reader.c:599 src/reader.c:758
#, 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
#: src/reader.c:601 src/reader.c:913 src/reader.c:928 src/reader.c:961
#: src/reader.c:975 src/reader.c:1178
#, c-format
msgid "invalid %s declaration"
msgstr "felaktig %s-deklaration"
#: src/reader.c:608
#: src/reader.c:621
msgid "%type declaration has no <typename>"
msgstr "%type-deklaration har inget <typnamn>"
#: src/reader.c:643
#: src/reader.c:656
#, c-format
msgid "invalid %%type declaration due to item: %s"
msgstr "felaktig %%type-deklaration på grund av objekt: %s"
#: src/reader.c:688
#: src/reader.c:701
#, c-format
msgid "redefining precedence of %s"
msgstr "omdefinition av precedens för %s"
#: src/reader.c:711
#: src/reader.c:724
#, 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
#: src/reader.c:734
#, c-format
msgid "unexpected item: %s"
msgstr "oväntat objekt: %s"
#: src/reader.c:794 src/reader.c:1126 src/reader.c:1203
#: src/reader.c:790 src/reader.c:1149
#, c-format
msgid "unmatched %s"
msgstr "ensam %s"
#: src/reader.c:826
#: src/reader.c:819
#, c-format
msgid "argument of %%expect is not an integer"
msgstr "argument till %%expect är inte ett heltal"
#: src/reader.c:872
#: src/reader.c:865
#, c-format
msgid "unrecognized item %s, expected an identifier"
msgstr "oväntat objekt %s, förväntade en identifierare"
#: src/reader.c:894
#: src/reader.c:887
#, c-format
msgid "expected string constant instead of %s"
msgstr "förväntade strängkonstant istället för %s"
#: src/reader.c:1042
#: src/reader.c:1080
#, c-format
msgid "unrecognized: %s"
msgstr "okänt: %s"
#: src/reader.c:1047
#: src/reader.c:1085
msgid "no input grammar"
msgstr "ingen ingrammatik"
#: src/reader.c:1052
#: src/reader.c:1090
#, 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
#: src/reader.c:1265
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
#: src/reader.c:1272
msgid "grammar starts with vertical bar"
msgstr "grammatiken startar med ett vertikalt streck"
#: src/reader.c:1414
#: src/reader.c:1300
#, 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
#: src/reader.c:1405
msgid "two @prec's in a row"
msgstr "två @prec i rad"
#: src/reader.c:1525
#: src/reader.c:1414
#, c-format
msgid "%%guard present but %%semantic_parser not specified"
msgstr "%%guard finns men %%semantic_parser är inte angiven"
#: src/reader.c:1534
#: src/reader.c:1424
msgid "two actions at end of one rule"
msgstr "två åtgärder vid slutet av en regel"
#: src/reader.c:1548
#: src/reader.c:1438
#, c-format
msgid "type clash (`%s' `%s') on default action"
msgstr "typkonflikt (\"%s\" \"%s\") för standardåtgärd"
#: src/reader.c:1554
#: src/reader.c:1444
msgid "empty rule for typed nonterminal, and no action"
msgstr "tom regel för typad icketerminal, och ingen åtgärd"
#: src/reader.c:1600
#: src/reader.c:1450
#, 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
#: src/reader.c:1457
msgid "no rules in the input grammar"
msgstr "inga regler i ingrammatiken"
#: src/reader.c:1635
#: src/reader.c:1465
#, 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
#: src/reader.c:1487
#, 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:1551
#, 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
#: src/reader.c:1601
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "motstridiga precedenser mellan %s och %s"
#: src/reader.c:1835
#: src/reader.c:1613
#, c-format
msgid "conflicting assoc values for %s and %s"
msgstr "motstridiga assoc-värden mellan %s och %s"
#: src/reader.c:1874
#: src/reader.c:1650
#, c-format
msgid "the start symbol %s is undefined"
msgstr "startsymbolen %s är odefinierad"
#: src/reader.c:1876
#: src/reader.c:1652
#, c-format
msgid "the start symbol %s is a token"
msgstr "startsymbolen %s är ett element"
#: src/reduce.c:409
#: src/reader.c:1672
#, fuzzy, c-format
msgid "too many items (max %d)"
msgstr "för många tillstånd (max %d)"
#: src/reduce.c:398
msgid "Useless nonterminals:"
msgstr "Oanvändbara icketerminaler:"
#: src/reduce.c:422
#: src/reduce.c:411
msgid "Terminals which are not used:"
msgstr "Terminaler som inte används:"
#: src/reduce.c:433
#: src/reduce.c:422
msgid "Useless rules:"
msgstr "Oanvändbara regler:"
#: src/reduce.c:503
#, c-format
#: src/reduce.c:494
#, fuzzy, 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"
msgstr[0] "%d regler reduceras aldrig\n"
#: src/reduce.c:511
#, c-format
# Jag har anmält att det är fel att anta att "s" är en universell pluraländelse.
# Jag föreslog också att de använder ngettext istället.
# "Vad göras skall är redan gjort."
#: src/reduce.c:502
#, fuzzy, c-format
msgid "%d useless nonterminal"
msgid_plural "%d useless nonterminals"
msgstr[0] "%d oanvändbar icketerminal"
msgstr[1] "%d oanvändbara icketerminaler"
msgstr[0] "%d oanvändbara icketerminaler%.0s"
#: src/reduce.c:517
#: src/reduce.c:508
msgid " and "
msgstr " och "
#: src/reduce.c:520
#, c-format
#: src/reduce.c:511
#, fuzzy, c-format
msgid "%d useless rule"
msgid_plural "%d useless rules"
msgstr[0] "%d oanvändbar regel"
msgstr[1] "%d oanvändbara regler"
msgstr[0] "%d oanvändbara regler%.0s"
#: src/reduce.c:551
#: src/reduce.c:542
#, c-format
msgid "Start symbol %s does not derive any sentence"
msgstr "Startsymbolen %s genererar inga meningar"
@@ -776,3 +748,63 @@ msgstr "\""
#: lib/quotearg.c:275
msgid "'"
msgstr "\""
#~ msgid "%-4s\terror (nonassociative)"
#~ msgstr "%-4s\tfel (ickeassociativ)"
#~ msgid "$default\treduce using rule %d (%s)"
#~ msgstr "$standard\treducera med regel %d (%s)"
#~ msgid "unterminated %guard clause"
#~ msgstr "oavlutad %guard-sats"
#~ msgid " $ \tgo to state %d\n"
#~ msgstr " $ \tgå till tillstånd %d\n"
#~ msgid "%s: internal error: %s\n"
#~ msgstr "%s: internt fel: %s\n"
#~ msgid ""
#~ "Variables\n"
#~ "---------\n"
#~ "\n"
#~ msgstr ""
#~ "Variabler\n"
#~ "---------\n"
#~ "\n"
#~ msgid "Value Sprec Sassoc Tag\n"
#~ msgstr "Värde Sprec Sassoc Tagg\n"
#~ msgid ""
#~ "Rules\n"
#~ "-----\n"
#~ "\n"
#~ msgstr ""
#~ "Regler\n"
#~ "------\n"
#~ "\n"
#~ msgid ""
#~ "Rules interpreted\n"
#~ "-----------------\n"
#~ "\n"
#~ msgstr ""
#~ "Tolkade regler\n"
#~ "--------------\n"
#~ "\n"
#~ msgid "DERIVES"
#~ msgstr "HÄRLEDER"
#~ msgid "%s derives"
#~ msgstr "%s härleder"
#~ msgid "Entering set_nullable"
#~ msgstr "Påbörjar set_nullable"
#~ msgid ""
#~ "reduced %s defines %d terminal%s, %d nonterminal%s, and %d production%s.\n"
#~ msgstr ""
#~ "reducerad %s definierar %d terminaler%.0s, %d icketerminaler%.0s och %d "
#~ "produktioner%.0s.\n"
+329 -252
View File
@@ -1,21 +1,20 @@
# Turkish translations for GNU Bison messages.
# Copyright (C) 2001 Free Software Foundation, Inc.
# Altuð Bayram <[email protected]>, 2001.
# Altug Bayram <[email protected]>, 2001.
#
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 14:30GMT +02:00\n"
"Last-Translator: Altuð Bayram <[email protected]>\n"
"Project-Id-Version: bison 1.28c\n"
"POT-Creation-Date: 2002-01-29 17:17+0100\n"
"PO-Revision-Date: 2001-09-10 10:54GMT\n"
"Last-Translator: Altug 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:189
#: src/LR0.c:194
#, c-format
msgid "too many states (max %d)"
msgstr "çok fazla durum (en fazla %d)"
@@ -32,131 +31,104 @@ msgstr "uyar
msgid "fatal error: "
msgstr "ölümcül hata:"
#: src/conflicts.c:44
#: src/conflicts.c:46
#, 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\n"
"çözümlendi.\n"
"%d durumu içinde %d kuralý ve %s andaçý arasýndaki çeliþki %s "
"olarakçözümlendi.\n"
#: src/conflicts.c:94 src/conflicts.c:119
#: src/conflicts.c:111 src/conflicts.c:133
msgid "reduce"
msgstr "indirgeme"
#: src/conflicts.c:101 src/conflicts.c:115
#: src/conflicts.c:116 src/conflicts.c:128
msgid "shift"
msgstr "shift"
msgstr "öteleme"
#: src/conflicts.c:123
#: src/conflicts.c:138
msgid "an error"
msgstr "bir hata"
#: src/conflicts.c:302
#, c-format
#: src/conflicts.c:291
#, fuzzy, c-format
msgid "%d shift/reduce conflict"
msgid_plural "%d shift/reduce conflicts"
msgstr[0] "%d öteleme/indirgeme çeliþkisi"
msgstr[1] ""
msgstr[0] " %d öteleme/indirgeme çeliþkisi"
#: src/conflicts.c:309
#: src/conflicts.c:298
#, fuzzy
msgid "and"
msgstr "ve"
msgstr " ve"
#: src/conflicts.c:315
#, c-format
#: src/conflicts.c:304
#, fuzzy, c-format
msgid "%d reduce/reduce conflict"
msgid_plural "%d reduce/reduce conflicts"
msgstr[0] "%d indirgeme/indirgeme çeliþkisi"
msgstr[1] ""
msgstr[0] " %d indirgeme/indirgeme çeliþkisi"
#: src/conflicts.c:340
#, c-format
#: src/conflicts.c:329
#, fuzzy, c-format
msgid "State %d contains "
msgstr "%d durumu içerir"
#. If invoked with `--yacc', use the output format specified by
#. POSIX.
#: src/conflicts.c:387
#: src/conflicts.c:376
msgid "conflicts: "
msgstr "çeliþkiler: "
#: src/conflicts.c:389
#: src/conflicts.c:378
#, c-format
msgid " %d shift/reduce"
msgstr " %d öteleme/indirgeme"
#: src/conflicts.c:393
#: src/conflicts.c:382
#, c-format
msgid " %d reduce/reduce"
msgstr " %d indirgeme/indirgeme"
#: src/conflicts.c:398 src/reduce.c:508
#: src/conflicts.c:387 src/reduce.c:499
#, c-format
msgid "%s contains "
msgstr "%s içerir"
msgstr "%s içerir "
#: src/conflicts.c:412
#, c-format
#: src/conflicts.c:394
#, fuzzy, 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"
msgstr[0] " %d öteleme/indirgeme çeliþkisi"
#: 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:467 src/print.c:154
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
"\n"
msgstr ""
" $default\tindirgeme kural %d (%s)'i kullanýyor\n"
"\n"
#: 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:550
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\tindirgeme kural %d (%s)'i kullanýyor\n"
#: src/files.c:151
#: src/files.c:159
#, c-format
msgid "cannot open file `%s'"
msgstr "`%s' dosyasý açýlamadý"
#: src/files.c:170
#: src/files.c:178
msgid "cannot close file"
msgstr "dosya kapatýlamýyor"
#. Some efforts were made to ease the translators' task, please
#. continue.
#: src/getargs.c:84
#: src/getargs.c:55
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:88
#: src/getargs.c:59
#, c-format
msgid "Usage: %s [OPTION]... FILE\n"
msgstr "Kullaným: %s [SEÇENEK]... DOSYA\n"
#: src/getargs.c:92
#: src/getargs.c:63
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 "
"kýsa\n"
"seçenek için de geçerlidir. Bu durum, seçimli argümanlar için de "
"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"
"geçerlidir.\n"
#: src/getargs.c:98
#: src/getargs.c:69
msgid ""
"Operation modes:\n"
" -h, --help display this help and exit\n"
@@ -168,7 +140,7 @@ msgstr ""
" -V, --version sürüm bilgisini ver ve çýk\n"
" -y, --yacc POSIX yacc öykünmesi\n"
#: src/getargs.c:105
#: src/getargs.c:76
msgid ""
"Parser:\n"
" -S, --skeleton=FILE specify the skeleton to use\n"
@@ -180,15 +152,16 @@ msgid ""
" -k, --token-table include a table of token names\n"
msgstr ""
"Ayrýþtýrýcý:\n"
" -S, --skeleton=FILE kullanýlacak iskeleti belirle\n"
" -S, --skeleton=DOSYA kullanýlacak iskeleti belirler\n"
" -t, --debug ayrýþtýrýcý için hata ayýklayýcý aracý\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"
" --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"
#: src/getargs.c:117
#: src/getargs.c:88
#, fuzzy
msgid ""
"Output:\n"
" -d, --defines also produce a header file\n"
@@ -199,13 +172,12 @@ msgid ""
"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=DOSYA çýktýyý dosyaya býrakýr\n"
" -g, --graph otomatýn bir VCG grafik 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"
#: src/getargs.c:127
#: src/getargs.c:98
msgid "Report bugs to <[email protected]>.\n"
msgstr ""
"Hatalarý <[email protected]>'a,\n"
@@ -213,478 +185,471 @@ msgstr ""
#. Some efforts were made to ease the translators' task, please
#. continue.
#: src/getargs.c:141
#: src/getargs.c:112
#, c-format
msgid "bison (GNU Bison) %s"
msgstr "bison (GNU Bison) %s"
#: src/getargs.c:146
#: src/getargs.c:117
msgid ""
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
"Free Software Foundation, Inc.\n"
"Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"
msgstr ""
"Kopyahakký 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
"Free Software Foundation, Inc.\n"
"Telifhakký 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, "
"Inc.\n"
#: src/getargs.c:151
#: src/getargs.c:121
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 ÞAHSÝ KULLANIMINIZA\n"
"Hiçbir garantisi yoktur; hatta SATILABÝLÝRLÝÐÝ veya HERHANGÝ BÝR AMACA\n"
"UYGUNLUÐU için bile garanti verilmez.\n"
#: src/getargs.c:230 src/lex.c:705
#: src/getargs.c:200 src/lex.c:599
#, c-format
msgid "`%s' is no longer supported"
msgstr "`%s' artýk desteklenmeyecek"
msgstr "`%s' artýk desteklenmiyor"
#: src/getargs.c:254
#: src/getargs.c:224
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "Daha fazla bilgi için `%s --help' yazýn.\n"
#: src/getargs.c:261
#: src/getargs.c:233
#, c-format
msgid "%s: no grammar file given\n"
msgstr "%s: gramer dosyasý verilmemiþ\n"
#: src/getargs.c:265
#: src/getargs.c:237
#, c-format
msgid "%s: extra arguments ignored after `%s'\n"
msgstr "%s: '%s' den sonraki argümanlar yoksayýldý\n"
#: src/lalr.c:256
#: src/lalr.c:175
#, c-format
msgid "too many gotos (max %d)"
msgstr "gotos çok fazla (en fazla %d)"
#: src/lex.c:76
#: src/lex.c:77
msgid "unexpected `/' found and ignored"
msgstr "beklenmeyen `/' bulundu ve yoksayýldý"
#: src/lex.c:105 src/reader.c:280
#: src/lex.c:106 src/reader.c:302
msgid "unterminated comment"
msgstr "sonlandýrýlmamýþ açýklama"
#: src/lex.c:137
#: src/lex.c:138
msgid "unexpected end of file"
msgstr "beklenmeyen dosya sonu"
#: src/lex.c:166
#: src/lex.c:157
msgid "unescaped newline in constant"
msgstr "sabit içinde kaçamayan yeni satýr"
msgstr "sabit içinde kaçýþsýz yeni satýr"
#: src/lex.c:208
#: src/lex.c:196
#, c-format
msgid "octal value outside range 0...255: `\\%o'"
msgstr "sekizli deðer 0...255'in dýþýnda: `\\%o'"
#: src/lex.c:233
#: src/lex.c:221
#, c-format
msgid "hexadecimal value above 255: `\\x%x'"
msgstr "onaltýlýk deðer 255'in üstünde: `\\x%x'"
#: src/lex.c:245
#: src/lex.c:233
#, c-format
msgid "unknown escape sequence: `\\' followed by `%s'"
msgstr "bilinmeyen kaçýþ sýrasý: `\\' `%s' tarafýndan takip edildi"
#: src/lex.c:342
#: src/lex.c:264
msgid "unterminated type name at end of file"
msgstr "dosya sonunda sonlandýrýlmamýþ tip adý"
#: src/lex.c:345
#: src/lex.c:267
msgid "unterminated type name"
msgstr "sonlandýrýlmamýþ tip ismi"
#: src/lex.c:438
#: src/lex.c:359
msgid "use \"...\" for multi-character literal tokens"
msgstr "çok-karakterli yazýn andaçlarý için \"...\" kullan"
#: src/lex.c:678
#: src/lex.c:571
#, c-format
msgid "`%s' supports no argument: %s"
msgstr "`%s' argüman %s'i desteklemez"
msgstr ""
#: src/lex.c:694
#, c-format
#: src/lex.c:588
#, fuzzy, c-format
msgid "`%s' requires an argument"
msgstr "`%s' bir argüman gerektirir"
msgstr "%s: `%s' seçeneði bir argümanla kullanýlýr\n"
#: src/output.c:951
#: src/output.c:804
#, c-format
msgid "maximum table size (%d) exceeded"
msgstr "en büyük tablo uzunluðu (%d) aþýldý"
#: src/print.c:39
#: src/print.c:44
#, c-format
msgid " type %d is %s\n"
msgstr " tip %d %s'dir\n"
#: src/print.c:88
#: src/print.c:106
#, c-format
msgid " (rule %d)"
msgstr " (kural %d)"
#: src/print.c:108
msgid " $default\taccept\n"
msgstr " $default\tonayla\n"
#: src/print.c:110
msgid " NO ACTIONS\n"
msgstr " EYLEM YOK\n"
#: src/print.c:124
#, c-format
msgid " $ \tgo to state %d\n"
msgstr " $ \tdurum %d'ye git\n"
#: 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:142
#: src/print.c:144
#, c-format
msgid " %-4s\terror (nonassociative)\n"
msgstr " %-4s\thata (birleþmeli deðil)\n"
#: src/print.c:169
#: src/print.c:168
#, c-format
msgid " %-4s\tgo to state %d\n"
msgstr " %-4s\tdurum %d'ye git\n"
#: src/print.c:180
#: src/print.c:192 src/print.c:228
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
"\n"
msgstr ""
" $default\tindirgeme kural %d (%s)'i kullanýyor\n"
"\n"
#: src/print.c:224 src/print.c:301
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[indirgeme kural %d (%s)'i kullanýyor]\n"
#: src/print.c:282 src/print.c:295
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\tindirgeme kural %d (%s)'i kullanýyor\n"
#: src/print.c:311
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\tindirgeme kural %d (%s)'i kullanýyor\n"
#: src/print.c:327
msgid " $default\taccept\n"
msgstr " $default\tonayla\n"
#: src/print.c:329
msgid " NO ACTIONS\n"
msgstr " EYLEM YOK\n"
#: src/print.c:342
#, c-format
msgid "state %d"
msgstr "durum %d"
#. rule # : LHS -> RHS
#: src/print.c:211
#: src/print.c:373
msgid "Grammar"
msgstr "Gramer"
#: src/print.c:212
#: src/print.c:374
msgid "Number, Line, Rule"
msgstr "Sayý, Satýr, Kural"
msgstr ""
#: src/print.c:217
#, c-format
#: src/print.c:379
#, fuzzy, c-format
msgid " %3d %3d %s ->"
msgstr " %3d %3d %s ->"
msgstr "kural %-4d %s ->"
#: src/print.c:224
#: src/print.c:386
msgid "empty"
msgstr "boþ"
msgstr ""
#. TERMINAL (type #) : rule #s terminal is on RHS
#: src/print.c:231
#: src/print.c:393
msgid "Terminals, with rules where they appear"
msgstr "Sabit simgeler, kurallarýnýn bulunduklarý yerde"
#: src/print.c:256
#: src/print.c:416
msgid "Nonterminals, with rules where they appear"
msgstr "Deðiþken simgeler, kurallarýnýn bulunduklarý yerde"
#: src/print.c:282
#: src/print.c:442
msgid " on left:"
msgstr " solda:"
#: src/print.c:297
#: src/print.c:457
msgid " on right:"
msgstr " saðda:"
#. 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)"
#.
#. 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:89
#: src/reader.c:100
msgid " Skipping to next \\n"
msgstr " Sonrakine atlanýyor \\n"
#: src/reader.c:91
#: src/reader.c:102
#, c-format
msgid " Skipping to next %c"
msgstr " Sonraki %c'ye atlanýyor"
#: src/reader.c:142 src/reader.c:154
#: src/reader.c:153 src/reader.c:165
msgid "invalid $ value"
msgstr "geçersiz $ deðeri"
#: src/reader.c:180 src/reader.c:195
#: src/reader.c:192 src/reader.c:207
msgid "unterminated string at end of file"
msgstr "dosyanýn sonunda sonlandýrýlmamýþ dizge"
#: src/reader.c:183
#: src/reader.c:195
msgid "unterminated string"
msgstr "sonlandýrýlmamýþ dizge"
#: src/reader.c:339
msgid "invalid @ value"
msgstr "geçersiz @ deðeri"
#: src/reader.c:337 src/reader.c:401
#, fuzzy, c-format
msgid "invalid value: %s%d"
msgstr "geçersiz $ deðeri"
#: src/reader.c:352 src/reader.c:416
#: src/reader.c:351 src/reader.c:423
#, c-format
msgid "%s is invalid"
msgstr "%s geçersizdir"
#: src/reader.c:392
#: src/reader.c:391
#, c-format
msgid "$$ of `%s' has no declared type"
msgstr "`%s''in $$'ý bildirilmiþ tip deðil"
#: src/reader.c:409
#: src/reader.c:415
#, c-format
msgid "$%d of `%s' has no declared type"
msgstr "`%2$s''in %1$d'i bildirilmiþ tip deðil"
msgstr "`%d''in $%s'i bildirilmiþ tip deðil"
#: src/reader.c:463
#: src/reader.c:473
msgid "unterminated `%{' definition"
msgstr "`%{' tanýmlamasý sonlandýrýlmamýþ"
#: src/reader.c:508 src/reader.c:623 src/reader.c:673
#: src/reader.c:518 src/reader.c:636 src/reader.c:686 src/reader.c:933
#, c-format
msgid "Premature EOF after %s"
msgstr "%s'den sonra erken EOF"
#: src/reader.c:525
#: src/reader.c:535
#, c-format
msgid "symbol `%s' used more than once as a literal string"
msgstr "simge `%s' bir harfiyen uyumlu dizgi gibi birden fazla kullanýldý"
msgstr "simge `%s' birden fazla defa sabit dizge olarak kullanýldý"
#: src/reader.c:528
#: src/reader.c:538
#, c-format
msgid "symbol `%s' given more than one literal string"
msgstr "simge `%s' bir harfiyen uyumlu dizgi gibi birden fazla verilmiþ"
msgstr "`%s' simgesine birden fazla sabit dizge verilmiþ"
#: src/reader.c:549 src/reader.c:692
#: src/reader.c:559 src/reader.c:705
#, c-format
msgid "symbol %s redefined"
msgstr "%s simgesi yeniden tanýmlandý"
#: src/reader.c:559 src/reader.c:638 src/reader.c:699 src/reader.c:1314
#: src/reader.c:569 src/reader.c:651 src/reader.c:712
#, c-format
msgid "type redeclaration for %s"
msgstr "%s için yeniden tip bildirimi"
#: src/reader.c:568
#: src/reader.c:581
#, c-format
msgid "`%s' is invalid in %s"
msgstr "`%s' %s içinde geçersizdir"
#: src/reader.c:586 src/reader.c:751
#: src/reader.c:599 src/reader.c:758
#, c-format
msgid "multiple %s declarations"
msgstr "çoklu %s bildirimleri"
#: src/reader.c:588 src/reader.c:930 src/reader.c:955 src/reader.c:1292
#: src/reader.c:601 src/reader.c:913 src/reader.c:928 src/reader.c:961
#: src/reader.c:975 src/reader.c:1178
#, c-format
msgid "invalid %s declaration"
msgstr "geçersiz %s bildirimi"
#: src/reader.c:608
#: src/reader.c:621
msgid "%type declaration has no <typename>"
msgstr "%type bildirimi <tipadý>'na sahip deðil"
#: src/reader.c:643
#: src/reader.c:656
#, 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:688
#: src/reader.c:701
#, c-format
msgid "redefining precedence of %s"
msgstr "%s'in önceliði tekrar tanýmlandý"
#: src/reader.c:711
#: src/reader.c:724
#, 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:721
#: src/reader.c:734
#, c-format
msgid "unexpected item: %s"
msgstr "beklenmeyen öðe: %s"
#: src/reader.c:794 src/reader.c:1126 src/reader.c:1203
#: src/reader.c:790 src/reader.c:1149
#, c-format
msgid "unmatched %s"
msgstr "eþlenemeyen %s"
#: src/reader.c:826
#: src/reader.c:819
#, c-format
msgid "argument of %%expect is not an integer"
msgstr "%%expect'in argümaný bir tamsayý deðildir"
msgstr "%%expect'in argümaný bir tamsayý deðil"
#: src/reader.c:872
#: src/reader.c:865
#, c-format
msgid "unrecognized item %s, expected an identifier"
msgstr "%s öðesi tanýnmadý, beklenen bir tanýtýcýdýr"
#: src/reader.c:894
#: src/reader.c:887
#, c-format
msgid "expected string constant instead of %s"
msgstr "%s'in yerine sabit dizge beklendi"
#: src/reader.c:1042
#: src/reader.c:1080
#, c-format
msgid "unrecognized: %s"
msgstr "tanýnmayan: %s"
#: src/reader.c:1047
#: src/reader.c:1085
msgid "no input grammar"
msgstr "girdi grameri yok"
#: src/reader.c:1052
#: src/reader.c:1090
#, c-format
msgid "unknown character: %s"
msgstr "bilinmeyen karakter: %s"
#: src/reader.c:1226
#, c-format
msgid "unterminated %guard clause"
msgstr "sonlandýrýlmamýþ %guard yantümcesi"
#: src/reader.c:1379
#: src/reader.c:1265
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:1386
#: src/reader.c:1272
msgid "grammar starts with vertical bar"
msgstr "gramer düþey çubuk ile baþlýyor"
#: src/reader.c:1414
#: src/reader.c:1300
#, c-format
msgid "rule given for %s, which is a token"
msgstr "bir andaç olan %s için verilen kural"
#: src/reader.c:1444 src/reader.c:1556
msgid "previous rule lacks an ending `;'"
msgstr "önceki kuralda bir bitiþ `;' eksik"
#: src/reader.c:1517
#: src/reader.c:1405
msgid "two @prec's in a row"
msgstr "bir satýrda iki @prec"
#: src/reader.c:1525
#: src/reader.c:1414
#, c-format
msgid "%%guard present but %%semantic_parser not specified"
msgstr "%%guard sunulmuþ fakat %%semantic_parser belirlenmemiþ"
#: src/reader.c:1534
#: src/reader.c:1424
msgid "two actions at end of one rule"
msgstr "bir kuralýn sonunda iki eylem"
#: src/reader.c:1548
#: src/reader.c:1438
#, c-format
msgid "type clash (`%s' `%s') on default action"
msgstr "öntanýmlý eylem üzerinde (`%s' `%s') tip çatýþmasý"
#: src/reader.c:1554
#: src/reader.c:1444
msgid "empty rule for typed nonterminal, and no action"
msgstr ""
"Tipli deðiþken simge için boþ kural tanýmlanmýþ, ve eylem belirtilmemiþ"
msgstr "Tipli deðiþken simge için boþ kural tanýmlanmýþ, ve eylembelirtilmemiþ"
#: src/reader.c:1600
#: src/reader.c:1450
#, c-format
msgid "invalid input: %s"
msgstr "geçersiz girdi: %s"
#: src/reader.c:1608
#: src/reader.c:1457
msgid "no rules in the input grammar"
msgstr "girdi grameri içinde kurallar yok"
#: src/reader.c:1465
#, 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:1487
#, 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:1611
msgid "no rules in the input grammar"
msgstr "girdi grameri içinde kurallar yok"
#: 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ý ve kurallarý yok"
#: src/reader.c:1770
#: src/reader.c:1551
#, 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:1823
#: src/reader.c:1601
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "%s ve %s için çeliþen öncelikler"
#: src/reader.c:1835
#: src/reader.c:1613
#, 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
#: src/reader.c:1650
#, c-format
msgid "the start symbol %s is undefined"
msgstr "baþlangýç simgesi %s tanýmlanmadý"
#: src/reader.c:1876
#: src/reader.c:1652
#, c-format
msgid "the start symbol %s is a token"
msgstr "baþlangýç simgesi %s bir andaçtýr"
#: src/reduce.c:409
msgid "Useless nonterminals:"
msgstr "Yararsýz deðiþken simgeler:"
#: src/reader.c:1672
#, fuzzy, c-format
msgid "too many items (max %d)"
msgstr "çok fazla durum (en fazla %d)"
#: src/reduce.c:422
#: src/reduce.c:398
msgid "Useless nonterminals:"
msgstr "Yararsýz kurallar:"
#: src/reduce.c:411
msgid "Terminals which are not used:"
msgstr "Kullanýlmayan sabit simgeler:"
#: src/reduce.c:433
#: src/reduce.c:422
msgid "Useless rules:"
msgstr "Yararsýz kurallar:"
#: src/reduce.c:503
#, c-format
#: src/reduce.c:494
#, fuzzy, c-format
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:511
#, c-format
#: src/reduce.c:502
#, fuzzy, c-format
msgid "%d useless nonterminal"
msgid_plural "%d useless nonterminals"
msgstr[0] "%d yararsýz deðiþken simge"
msgstr[1] ""
msgstr[0] "%d yararsýz deðiþken simge%s"
#: src/reduce.c:517
#: src/reduce.c:508
msgid " and "
msgstr " ve "
#: src/reduce.c:520
#, c-format
#: src/reduce.c:511
#, fuzzy, c-format
msgid "%d useless rule"
msgid_plural "%d useless rules"
msgstr[0] "%d yararsýz kural"
msgstr[1] ""
msgstr[0] "%d yararsýz kural%s"
#: src/reduce.c:551
#: src/reduce.c:542
#, c-format
msgid "Start symbol %s does not derive any sentence"
msgstr "Baþlangýç simgesi %s herhangi bir cümleden türemez"
@@ -775,3 +740,115 @@ msgstr "`"
#: lib/quotearg.c:275
msgid "'"
msgstr "'"
#~ msgid "%-4s\terror (nonassociative)"
#~ msgstr "%-4s\thata (birleþmeli deðil)"
#~ msgid "$default\treduce using rule %d (%s)"
#~ msgstr "$default\tindirgeme kural %d (%s)'i kullanýyor"
#~ msgid "unterminated %guard clause"
#~ msgstr "sonlandýrýlmamýþ %guard yantümcesi"
#~ msgid " $ \tgo to state %d\n"
#~ msgstr " $ \tdurum %d'ye git\n"
#~ msgid "%s: internal error: %s\n"
#~ msgstr "%s: iç hata: %s\n"
#~ msgid ""
#~ "Variables\n"
#~ "---------\n"
#~ "\n"
#~ msgstr ""
#~ "Deðiþkenler\n"
#~ "-----------\n"
#~ "\n"
#~ msgid "Value Sprec Sassoc Tag\n"
#~ msgstr "Deðer Söncel Sbirleþ Etiket\n"
#~ msgid ""
#~ "Rules\n"
#~ "-----\n"
#~ "\n"
#~ msgstr ""
#~ "Kurallar\n"
#~ "--------\n"
#~ "\n"
#~ msgid ""
#~ "Rules interpreted\n"
#~ "-----------------\n"
#~ "\n"
#~ msgstr ""
#~ "Kurallar yorumlandý\n"
#~ "-------------------\n"
#~ "\n"
#~ msgid " 1 shift/reduce conflict"
#~ msgstr " 1 öteleme/indirgeme çeliþkisi"
#~ msgid " 1 reduce/reduce conflict"
#~ msgstr " 1 indirgeme/indirgeme çeliþkisi"
#~ msgid "%s contains"
#~ msgstr "%s içerir"
#~ msgid "DERIVES"
#~ msgstr "TÜRETÝLENLER"
#~ msgid "%s derives"
#~ msgstr "%s türetildi"
#~ msgid "Entering set_nullable"
#~ msgstr "set_nullable'a girildi"
#, fuzzy
#~ 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"
#~ 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"
+4
View File
@@ -3,3 +3,7 @@
Makefile
bison
*.log
*.flc
Makefile.in
parse-skel.[ch] parse-skel.output
scan-skel.c
+75 -250
View File
@@ -23,6 +23,7 @@
The entry point is generate_states. */
#include "system.h"
#include "symtab.h"
#include "getargs.h"
#include "reader.h"
#include "gram.h"
@@ -30,18 +31,22 @@
#include "complain.h"
#include "closure.h"
#include "LR0.h"
#include "lalr.h"
#include "reduce.h"
int nstates;
int final_state;
core *first_state = NULL;
shifts *first_shift = NULL;
reductions *first_reduction = NULL;
/* Initialize the final state to -1, otherwise, it might be set to 0
by default, and since we don't compute the reductions of the final
state, we end up not computing the reductions of the initial state,
which is of course needed.
static core *this_state = NULL;
static core *last_state = NULL;
static shifts *last_shift = NULL;
static reductions *last_reduction = NULL;
FINAL_STATE is properly set by new_state when it recognizes the
accessing symbol: EOF. */
int final_state = -1;
static state_t *first_state = NULL;
static state_t *this_state = NULL;
static state_t *last_state = NULL;
static int nshifts;
static short *shift_symbol = NULL;
@@ -55,8 +60,8 @@ static short *kernel_items = NULL;
/* hash table for states, to recognize equivalent ones. */
#define STATE_TABLE_SIZE 1009
static core **state_table = NULL;
#define STATE_HASH_SIZE 1009
static state_t **state_hash = NULL;
static void
@@ -71,8 +76,8 @@ allocate_itemsets (void)
int count = 0;
short *symbol_count = XCALLOC (short, nsyms + nuseless_nonterminals);
for (i = 0; ritem[i]; ++i)
if (ritem[i] > 0)
for (i = 0; i < nritems; ++i)
if (ritem[i] >= 0)
{
count++;
symbol_count[ritem[i]]++;
@@ -107,7 +112,8 @@ allocate_storage (void)
shiftset = XCALLOC (short, nsyms);
redset = XCALLOC (short, nrules + 1);
state_table = XCALLOC (core *, STATE_TABLE_SIZE);
state_hash = XCALLOC (state_t *, STATE_HASH_SIZE);
shift_symbol = XCALLOC (short, nsyms);
}
@@ -120,7 +126,7 @@ free_storage (void)
free (kernel_base);
free (kernel_size);
XFREE (kernel_items);
free (state_table);
free (state_hash);
}
@@ -149,13 +155,12 @@ new_itemsets (void)
for (i = 0; i < nsyms; i++)
kernel_size[i] = 0;
shift_symbol = XCALLOC (short, nsyms);
nshifts = 0;
for (i = 0; i < nitemset; ++i)
{
int symbol = ritem[itemset[i]];
if (symbol > 0)
if (symbol >= 0)
{
if (!kernel_size[symbol])
{
@@ -176,19 +181,19 @@ new_itemsets (void)
| necessary. |
`-----------------------------------------------------------------*/
static core *
static state_t *
new_state (int symbol)
{
core *p;
state_t *p;
if (trace_flag)
fprintf (stderr, "Entering new_state, state = %d, symbol = %d (%s)\n",
this_state->number, symbol, tags[symbol]);
this_state->number, symbol, symbols[symbol]->tag);
if (nstates >= MAXSHORT)
fatal (_("too many states (max %d)"), MAXSHORT);
p = CORE_ALLOC (kernel_size[symbol]);
p = STATE_ALLOC (kernel_size[symbol]);
p->accessing_symbol = symbol;
p->number = nstates;
p->nitems = kernel_size[symbol];
@@ -199,6 +204,10 @@ new_state (int symbol)
last_state = p;
nstates++;
/* If this is the eoftoken, then this is the final state. */
if (symbol == 0)
final_state = p->number;
return p;
}
@@ -214,19 +223,19 @@ get_state (int symbol)
{
int key;
int i;
core *sp;
state_t *sp;
if (trace_flag)
fprintf (stderr, "Entering get_state, state = %d, symbol = %d (%s)\n",
this_state->number, symbol, tags[symbol]);
this_state->number, symbol, symbols[symbol]->tag);
/* Add up the target state's active item numbers to get a hash key.
*/
key = 0;
for (i = 0; i < kernel_size[symbol]; ++i)
key += kernel_base[symbol][i];
key = key % STATE_TABLE_SIZE;
sp = state_table[key];
key = key % STATE_HASH_SIZE;
sp = state_hash[key];
if (sp)
{
@@ -257,7 +266,7 @@ get_state (int symbol)
}
else /* bucket is empty */
{
state_table[key] = sp = new_state (symbol);
state_hash[key] = sp = new_state (symbol);
}
if (trace_flag)
@@ -306,7 +315,7 @@ append_states (void)
static void
new_states (void)
{
first_state = last_state = this_state = CORE_ALLOC (0);
first_state = last_state = this_state = STATE_ALLOC (0);
nstates = 1;
}
@@ -319,208 +328,8 @@ static void
save_shifts (void)
{
shifts *p = shifts_new (nshifts);
p->number = this_state->number;
shortcpy (p->shifts, shiftset, nshifts);
if (last_shift)
last_shift->next = p;
else
first_shift = p;
last_shift = p;
}
/*------------------------------------------------------------------.
| Subroutine of augment_automaton. Create the next-to-final state, |
| to which a shift has already been made in the initial state. |
`------------------------------------------------------------------*/
static void
insert_start_shift (void)
{
core *statep;
shifts *sp;
statep = CORE_ALLOC (0);
statep->number = nstates;
statep->accessing_symbol = start_symbol;
last_state->next = statep;
last_state = statep;
/* Make a shift from this state to (what will be) the final state. */
sp = shifts_new (1);
sp->number = nstates++;
sp->shifts[0] = nstates;
last_shift->next = sp;
last_shift = sp;
}
/*------------------------------------------------------------------.
| Make sure that the initial state has a shift that accepts the |
| grammar's start symbol and goes to the next-to-final state, which |
| has a shift going to the final state, which has a shift to the |
| termination state. Create such states and shifts if they don't |
| happen to exist already. |
`------------------------------------------------------------------*/
static void
augment_automaton (void)
{
core *statep;
shifts *sp;
shifts *sp1 = NULL;
sp = first_shift;
if (!sp->nshifts)
{
/* There are no shifts for any state. Make one shift, from the
initial state to the next-to-final state. */
sp = shifts_new (1);
sp->shifts[0] = nstates;
/* Initialize the chain of shifts with sp. */
first_shift = sp;
last_shift = sp;
/* Create the next-to-final state, with shift to
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_ALLOC (0);
statep->number = nstates;
last_state->next = statep;
last_state = statep;
/* Make the shift from the final state to the termination state. */
sp = shifts_new (1);
sp->number = nstates++;
sp->shifts[0] = nstates;
last_shift->next = sp;
last_shift = sp;
/* Note that the variable `final_state' refers to what we sometimes call
the termination state. */
final_state = nstates;
/* Make the termination state. */
statep = CORE_ALLOC (0);
statep->number = nstates++;
last_state->next = statep;
last_state = statep;
this_state->shifts = p;
}
@@ -533,12 +342,15 @@ augment_automaton (void)
static void
save_reductions (void)
{
int count;
int count = 0;
int i;
/* Find and count the active items that represent ends of rules. */
/* If this is the final state, we want it to have no reductions at
all, although it has one for `START_SYMBOL EOF .'. */
if (this_state->number == final_state)
return;
count = 0;
/* Find and count the active items that represent ends of rules. */
for (i = 0; i < nitemset; ++i)
{
int item = ritem[itemset[i]];
@@ -547,25 +359,37 @@ save_reductions (void)
}
/* Make a reductions structure and copy the data into it. */
if (count)
{
reductions *p = REDUCTIONS_ALLOC (count);
p->number = this_state->number;
p->nreds = count;
shortcpy (p->rules, redset, count);
if (last_reduction)
last_reduction->next = p;
else
first_reduction = p;
last_reduction = p;
}
this_state->reductions = reductions_new (count);
shortcpy (this_state->reductions->rules, redset, count);
}
/*---------------.
| Build STATES. |
`---------------*/
static void
set_states (void)
{
state_t *sp;
states = XCALLOC (state_t *, nstates);
for (sp = first_state; sp; sp = sp->next)
{
/* Pessimization, but simplification of the code: make sure all
the states have a shifts, errs, and reductions, even if
reduced to 0. */
if (!sp->shifts)
sp->shifts = shifts_new (0);
if (!sp->errs)
sp->errs = errs_new (0);
if (!sp->reductions)
sp->reductions = reductions_new (0);
states[sp->number] = sp;
}
}
/*-------------------------------------------------------------------.
| Compute the nondeterministic finite state machine (see state.h for |
| details) from the grammar. |
@@ -575,14 +399,15 @@ void
generate_states (void)
{
allocate_storage ();
new_closure (nitems);
new_closure (nritems);
new_states ();
while (this_state)
{
if (trace_flag)
fprintf (stderr, "Processing state %d (reached by %s)\n",
this_state->number, tags[this_state->accessing_symbol]);
this_state->number,
symbols[this_state->accessing_symbol]->tag);
/* 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
@@ -607,6 +432,6 @@ generate_states (void)
free_closure ();
free_storage ();
/* set up initial and final states as parser wants them */
augment_automaton ();
/* Set up STATES. */
set_states ();
}
+1 -4
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.
@@ -27,8 +27,5 @@ void generate_states PARAMS ((void));
extern int nstates;
extern int final_state;
extern core *first_state;
extern shifts *first_shift;
extern reductions *first_reduction;
#endif /* !LR0_H_ */
+12 -7
View File
@@ -1,4 +1,4 @@
## Copyright 2001, 2002 Free Software Foundation, Inc.
## Copyright 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
@@ -23,6 +23,7 @@ DEFS = @DEFS@ \
-DLOCALEDIR=\"$(datadir)/locale\"
CFLAGS = @CFLAGS@ $(WARNING_CFLAGS) $(WERROR_CFLAGS)
YFLAGS = "-dv"
# libintl.h in is build/intl, intl/libgettext.h in src/,
# config.h in build/.
@@ -40,16 +41,20 @@ bison_SOURCES = LR0.c closure.c complain.c conflicts.c \
files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
output.h output.c \
state.h state.c \
print.c reader.c reduce.c symtab.c warshall.c vcg.c print_graph.c
print_graph.h print_graph.c \
muscle_tab.h muscle_tab.c \
options.h options.c \
print.c reader.c reduce.c symtab.c warshall.c vcg.c \
skeleton.h parse-skel.h parse-skel.y scan-skel.l
BUILT_SOURCES = parse-skel.c scan-skel.c
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 \
print.h reader.h reduce.h symtab.h warshall.h system.h types.h \
vcg.h vcg_defaults.h print_graph.h
print.h reader.h reduce.h symtab.h warshall.h system.h \
types.h vcg.h vcg_defaults.h
pkgdata_DATA = bison.simple bison.hairy
EXTRA_DIST = $(pkgdata_DATA) build.com bison.cld vmshlp.mar
EXTRA_DIST = build.com bison.cld vmshlp.mar
-496
View File
@@ -1,496 +0,0 @@
# Makefile.in generated by automake 1.5c from Makefile.am.
# @configure_input@
# 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,
# 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_sh_DATA = $(install_sh) -c -m 644
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@
LIB = @LIB@
LIBICONV = @LIBICONV@
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 = ../lib/ansi2knr
DEFS = @DEFS@ \
-DBISON_SIMPLE=\"$(pkgdatadir)/bison.simple\" \
-DBISON_HAIRY=\"$(pkgdatadir)/bison.hairy\" \
-DLOCALEDIR=\"$(datadir)/locale\"
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.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
noinst_HEADERS = LR0.h closure.h complain.h conflicts.h \
derives.h \
files.h getargs.h gram.h lalr.h lex.h nullable.h \
print.h reader.h reduce.h symtab.h warshall.h system.h types.h \
vcg.h vcg_defaults.h print_graph.h
pkgdata_DATA = bison.simple bison.hairy
EXTRA_DIST = $(pkgdata_DATA) build.com bison.cld vmshlp.mar
subdir = src
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
bin_PROGRAMS = bison$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS)
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) 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
bison_LDFLAGS =
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
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 $@
DIST_SOURCES = $(bison_SOURCES) $(EXTRA_bison_SOURCES)
DATA = $(pkgdata_DATA)
HEADERS = $(noinst_HEADERS)
DIST_COMMON = $(noinst_HEADERS) Makefile.am Makefile.in
SOURCES = $(bison_SOURCES) $(EXTRA_bison_SOURCES)
all: all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
$(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)/$@ $(am__depfiles_maybe)
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
; then \
f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \
$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
done
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
bison$(EXEEXT): $(bison_OBJECTS) $(bison_DEPENDENCIES)
@rm -f bison$(EXEEXT)
$(LINK) $(bison_LDFLAGS) $(bison_OBJECTS) $(bison_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT) core *.core
distclean-compile:
-rm -f *.tab.c
ANSI2KNR = ../lib/ansi2knr
../lib/ansi2knr:
cd ../lib && $(MAKE) $(AM_MAKEFLAGS) 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)/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)
.c.o:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
.c.obj:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(COMPILE) -c `cygpath -w $<`
CCDEPMODE = @CCDEPMODE@
LR0_.c: LR0.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/LR0.c; then echo $(srcdir)/LR0.c; else echo LR0.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > LR0_.c || rm -f LR0_.c
closure_.c: closure.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/closure.c; then echo $(srcdir)/closure.c; else echo closure.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > closure_.c || rm -f closure_.c
complain_.c: complain.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/complain.c; then echo $(srcdir)/complain.c; else echo complain.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > complain_.c || rm -f complain_.c
conflicts_.c: conflicts.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/conflicts.c; then echo $(srcdir)/conflicts.c; else echo conflicts.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > conflicts_.c || rm -f conflicts_.c
derives_.c: derives.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/derives.c; then echo $(srcdir)/derives.c; else echo derives.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > derives_.c || rm -f derives_.c
files_.c: files.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/files.c; then echo $(srcdir)/files.c; else echo files.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > files_.c || rm -f files_.c
getargs_.c: getargs.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getargs.c; then echo $(srcdir)/getargs.c; else echo getargs.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getargs_.c || rm -f getargs_.c
gram_.c: gram.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/gram.c; then echo $(srcdir)/gram.c; else echo gram.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > gram_.c || rm -f gram_.c
lalr_.c: lalr.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lalr.c; then echo $(srcdir)/lalr.c; else echo lalr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > lalr_.c || rm -f lalr_.c
lex_.c: lex.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lex.c; then echo $(srcdir)/lex.c; else echo lex.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > lex_.c || rm -f lex_.c
main_.c: main.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/main.c; then echo $(srcdir)/main.c; else echo main.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > main_.c || rm -f main_.c
nullable_.c: nullable.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/nullable.c; then echo $(srcdir)/nullable.c; else echo nullable.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > nullable_.c || rm -f nullable_.c
output_.c: output.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/output.c; then echo $(srcdir)/output.c; else echo output.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > output_.c || rm -f output_.c
print_.c: print.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/print.c; then echo $(srcdir)/print.c; else echo print.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > print_.c || rm -f print_.c
print_graph_.c: print_graph.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/print_graph.c; then echo $(srcdir)/print_graph.c; else echo print_graph.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > print_graph_.c || rm -f print_graph_.c
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)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/vcg.c; then echo $(srcdir)/vcg.c; else echo vcg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > vcg_.c || rm -f vcg_.c
vmsgetargs_.c: vmsgetargs.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/vmsgetargs.c; then echo $(srcdir)/vmsgetargs.c; else echo vmsgetargs.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > vmsgetargs_.c || rm -f vmsgetargs_.c
warshall_.c: warshall.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/warshall.c; then echo $(srcdir)/warshall.c; else echo warshall.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > warshall_.c || rm -f warshall_.c
LR0_.$(OBJEXT) closure_.$(OBJEXT) complain_.$(OBJEXT) \
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) \
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 " $(pkgdataDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
$(pkgdataDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
done
uninstall-pkgdataDATA:
@$(NORMAL_UNINSTALL)
@list='$(pkgdata_DATA)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(pkgdatadir)/$$f"; \
rm -f $(DESTDIR)$(pkgdatadir)/$$f; \
done
ETAGS = etags
ETAGSFLAGS =
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(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
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
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)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
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 || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir)$$dir \
|| exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS) $(DATA) $(HEADERS)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(pkgdatadir)
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)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
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-binPROGRAMS clean-generic mostlyclean-am
distclean: distclean-am
distclean-am: clean-am distclean-compile distclean-depend \
distclean-generic distclean-tags
dvi: dvi-am
dvi-am:
info: info-am
info-am:
install-data-am: install-pkgdataDATA
install-exec-am: install-binPROGRAMS
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr
uninstall-am: uninstall-binPROGRAMS uninstall-info-am \
uninstall-pkgdataDATA
.PHONY: GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic distclean distclean-compile distclean-depend \
distclean-generic distclean-tags distdir dvi dvi-am info \
info-am install install-am install-binPROGRAMS install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-pkgdataDATA install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-kr tags uninstall uninstall-am \
uninstall-binPROGRAMS uninstall-info-am uninstall-pkgdataDATA
# 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:
-334
View File
@@ -1,334 +0,0 @@
/* -*- C -*- */
extern int timeclock;
int yyerror; /* Yyerror and yycost are set by guards. */
int yycost; /* If yyerror is set to a nonzero value by a */
/* guard, the reduction with which the guard */
/* is associated is not performed, and the */
/* error recovery mechanism is invoked. */
/* Yycost indicates the cost of performing */
/* the reduction given the attributes of the */
/* symbols. */
/* YYMAXDEPTH indicates the size of the parser's state and value */
/* stacks. */
#ifndef YYMAXDEPTH
#define YYMAXDEPTH 500
#endif
/* YYMAXRULES must be at least as large as the number of rules that */
/* could be placed in the rule queue. That number could be determined */
/* from the grammar and the size of the stack, but, as yet, it is not. */
#ifndef YYMAXRULES
#define YYMAXRULES 100
#endif
#ifndef YYMAXBACKUP
#define YYMAXBACKUP 100
#endif
short yyss[YYMAXDEPTH]; /* the state stack */
YYSTYPE yyvs[YYMAXDEPTH]; /* the semantic value stack */
YYLTYPE yyls[YYMAXDEPTH]; /* the location stack */
short yyrq[YYMAXRULES]; /* the rule queue */
int yychar; /* the lookahead symbol */
YYSTYPE yylval; /* the semantic value of the */
/* lookahead symbol */
YYSTYPE yytval; /* the semantic value for the state */
/* at the top of the state stack. */
YYSTYPE yyval; /* the variable used to return */
/* semantic values from the action */
/* routines */
YYLTYPE yylloc; /* location data for the lookahead */
/* symbol */
YYLTYPE yytloc; /* location data for the state at the */
/* top of the state stack */
int yynunlexed;
short yyunchar[YYMAXBACKUP];
YYSTYPE yyunval[YYMAXBACKUP];
YYLTYPE yyunloc[YYMAXBACKUP];
short *yygssp; /* a pointer to the top of the state */
/* stack; only set during error */
/* recovery. */
YYSTYPE *yygvsp; /* a pointer to the top of the value */
/* stack; only set during error */
/* recovery. */
YYLTYPE *yyglsp; /* a pointer to the top of the */
/* location stack; only set during */
/* error recovery. */
/* Yyget is an interface between the parser and the lexical analyzer. */
/* It is costly to provide such an interface, but it avoids requiring */
/* the lexical analyzer to be able to back up the scan. */
yyget()
{
if (yynunlexed > 0)
{
yynunlexed--;
yychar = yyunchar[yynunlexed];
yylval = yyunval[yynunlexed];
yylloc = yyunloc[yynunlexed];
}
else if (yychar <= 0)
yychar = 0;
else
{
yychar = yylex();
if (yychar < 0)
yychar = 0;
else yychar = YYTRANSLATE(yychar);
}
}
yyunlex(chr, val, loc)
int chr;
YYSTYPE val;
YYLTYPE loc;
{
yyunchar[yynunlexed] = chr;
yyunval[yynunlexed] = val;
yyunloc[yynunlexed] = loc;
yynunlexed++;
}
yyrestore(first, last)
register short *first;
register short *last;
{
register short *ssp;
register short *rp;
register int symbol;
register int state;
register int tvalsaved;
ssp = yygssp;
yyunlex(yychar, yylval, yylloc);
tvalsaved = 0;
while (first != last)
{
symbol = yystos[*ssp];
if (symbol < YYNTBASE)
{
yyunlex(symbol, yytval, yytloc);
tvalsaved = 1;
ssp--;
}
ssp--;
if (first == yyrq)
first = yyrq + YYMAXRULES;
first--;
for (rp = yyrhs + yyprhs[*first]; symbol = *rp; rp++)
{
if (symbol < YYNTBASE)
state = yytable[yypact[*ssp] + symbol];
else
{
state = yypgoto[symbol - YYNTBASE] + *ssp;
if (state >= 0 && state <= YYLAST && yycheck[state] == *ssp)
state = yytable[state];
else
state = yydefgoto[symbol - YYNTBASE];
}
*++ssp = state;
}
}
if ( ! tvalsaved && ssp > yyss)
{
yyunlex(yystos[*ssp], yytval, yytloc);
ssp--;
}
yygssp = ssp;
}
int
yyparse()
{
register int yystate;
register int yyn;
register short *yyssp;
register short *yyrq0;
register short *yyptr;
register YYSTYPE *yyvsp;
int yylen;
YYLTYPE *yylsp;
short *yyrq1;
short *yyrq2;
yystate = 0;
yyssp = yyss - 1;
yyvsp = yyvs - 1;
yylsp = yyls - 1;
yyrq0 = yyrq;
yyrq1 = yyrq0;
yyrq2 = yyrq0;
yychar = yylex();
if (yychar < 0)
yychar = 0;
else yychar = YYTRANSLATE(yychar);
yynewstate:
if (yyssp >= yyss + YYMAXDEPTH - 1)
{
yyabort("Parser Stack Overflow");
YYABORT;
}
*++yyssp = yystate;
yyresume:
yyn = yypact[yystate];
if (yyn == YYFLAG)
goto yydefault;
yyn += yychar;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar)
goto yydefault;
yyn = yytable[yyn];
if (yyn < 0)
{
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrlab;
yystate = yyn;
yyptr = yyrq2;
while (yyptr != yyrq1)
{
yyn = *yyptr++;
yylen = yyr2[yyn];
yyvsp -= yylen;
yylsp -= yylen;
yyguard(yyn, yyvsp, yylsp);
if (yyerror)
goto yysemerr;
yyaction(yyn, yyvsp, yylsp);
*++yyvsp = yyval;
yylsp++;
if (yylen == 0)
{
yylsp->timestamp = timeclock;
yylsp->first_line = yytloc.first_line;
yylsp->first_column = yytloc.first_column;
yylsp->last_line = (yylsp-1)->last_line;
yylsp->last_column = (yylsp-1)->last_column;
yylsp->text = 0;
}
else
{
yylsp->last_line = (yylsp+yylen-1)->last_line;
yylsp->last_column = (yylsp+yylen-1)->last_column;
}
if (yyptr == yyrq + YYMAXRULES)
yyptr = yyrq;
}
if (yystate == YYFINAL)
YYACCEPT;
yyrq2 = yyptr;
yyrq1 = yyrq0;
*++yyvsp = yytval;
*++yylsp = yytloc;
yytval = yylval;
yytloc = yylloc;
yyget();
goto yynewstate;
yydefault:
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
yyreduce:
*yyrq0++ = yyn;
if (yyrq0 == yyrq + YYMAXRULES)
yyrq0 = yyrq;
if (yyrq0 == yyrq2)
{
yyabort("Parser Rule Queue Overflow");
YYABORT;
}
yyssp -= yyr2[yyn];
yyn = yyr1[yyn];
yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
yystate = yydefgoto[yyn - YYNTBASE];
goto yynewstate;
yysemerr:
*--yyptr = yyn;
yyrq2 = yyptr;
yyvsp += yyr2[yyn];
yyerrlab:
yygssp = yyssp;
yygvsp = yyvsp;
yyglsp = yylsp;
yyrestore(yyrq0, yyrq2);
yyrecover();
yystate = *yygssp;
yyssp = yygssp;
yyvsp = yygvsp;
yyrq0 = yyrq;
yyrq1 = yyrq0;
yyrq2 = yyrq0;
goto yyresume;
}
%% actions
+15 -13
View File
@@ -20,6 +20,7 @@
#include "system.h"
#include "getargs.h"
#include "symtab.h"
#include "gram.h"
#include "reader.h"
#include "closure.h"
@@ -60,9 +61,9 @@ print_closure (const char *title, short *array, size_t size)
{
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);
for (rp = &ritem[array[i]]; *rp >= 0; ++rp)
fprintf (stderr, " %s", symbols[*rp]->tag);
fprintf (stderr, " (rule %d)\n", -*rp - 1);
}
fputs ("\n\n", stderr);
}
@@ -76,10 +77,11 @@ print_firsts (void)
fprintf (stderr, "FIRSTS\n");
for (i = ntokens; i < nsyms; i++)
{
fprintf (stderr, "\t%s firsts\n", tags[i]);
fprintf (stderr, "\t%s firsts\n", symbols[i]->tag);
for (j = 0; j < nvars; j++)
if (BITISSET (FIRSTS (i), j))
fprintf (stderr, "\t\t%d (%s)\n", j + ntokens, tags[j + ntokens]);
fprintf (stderr, "\t\t%d (%s)\n",
j + ntokens, symbols[j + ntokens]->tag);
}
fprintf (stderr, "\n\n");
}
@@ -95,14 +97,14 @@ print_fderives (void)
for (i = ntokens; i < nsyms; i++)
{
fprintf (stderr, "\t%s derives\n", tags[i]);
fprintf (stderr, "\t%s derives\n", symbols[i]->tag);
for (j = 0; j <= nrules; 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]);
fprintf (stderr, "\t\t%d:", j - 1);
for (rhsp = &ritem[rules[j].rhs]; *rhsp >= 0; ++rhsp)
fprintf (stderr, " %s", symbols[*rhsp]->tag);
fputc ('\n', stderr);
}
}
@@ -131,7 +133,7 @@ set_firsts (void)
for (i = ntokens; i < nsyms; i++)
for (j = 0; derives[i][j] >= 0; ++j)
{
int symbol = ritem[rule_table[derives[i][j]].rhs];
int symbol = ritem[rules[derives[i][j]].rhs];
if (ISVAR (symbol))
SETBIT (FIRSTS (i), symbol - ntokens);
}
@@ -193,7 +195,7 @@ closure (short *core, int n)
/* Index over CORE. */
int c;
/* Index over RULESET. */
/* An index over RULESET. */
int r;
/* A bit index over RULESET. */
@@ -220,10 +222,10 @@ closure (short *core, int n)
nitemset = 0;
c = 0;
for (ruleno = 0; ruleno < rulesetsize * BITS_PER_WORD; ++ruleno)
for (ruleno = 0; ruleno < nrules + 1; ++ruleno)
if (BITISSET (ruleset, ruleno))
{
int itemno = rule_table[ruleno].rhs;
int itemno = rules[ruleno].rhs;
while (c < n && core[c] < itemno)
{
itemset[nitemset] = core[c];
+85 -239
View File
@@ -21,6 +21,7 @@
#include "system.h"
#include "complain.h"
#include "getargs.h"
#include "symtab.h"
#include "files.h"
#include "gram.h"
#include "state.h"
@@ -38,12 +39,14 @@ static unsigned *lookaheadset = NULL;
static inline void
log_resolution (int state, int LAno, int token, char *resolution)
log_resolution (state_t *state, int LAno, int token, char *resolution)
{
obstack_fgrow4 (&output_obstack,
_("\
if (verbose_flag)
obstack_fgrow4 (&output_obstack,
_("\
Conflict in state %d between rule %d and token %s resolved as %s.\n"),
state, LAruleno[LAno], tags[token], resolution);
state->number, LAruleno[LAno], symbols[token]->tag,
resolution);
}
@@ -54,17 +57,31 @@ Conflict in state %d between rule %d and token %s resolved as %s.\n"),
`------------------------------------------------------------------*/
static void
flush_shift (int state, int token)
flush_shift (state_t *state, int token)
{
shifts *shiftp = state_table[state].shifts;
shifts *shiftp = state->shifts;
int i;
RESETBIT (lookaheadset, token);
for (i = 0; i < shiftp->nshifts; i++)
if (!SHIFT_IS_DISABLED (shiftp, i) && SHIFT_SYMBOL (shiftp, i) == token)
SHIFT_DISABLE (shiftp, i);
}
/*-------------------------------------------------------------------.
| Turn off the reduce recorded for the specified token for the |
| specified lookahead. Used when we resolve a shift-reduce conflict |
| in favor of the shift. |
`-------------------------------------------------------------------*/
static void
flush_reduce (int lookahead, int token)
{
RESETBIT (LA (lookahead), token);
}
/*------------------------------------------------------------------.
| Attempt to resolve shift-reduce conflict for one rule by means of |
| precedence declarations. It has already been checked that the |
@@ -73,99 +90,80 @@ flush_shift (int state, int token)
`------------------------------------------------------------------*/
static void
resolve_sr_conflict (int state, int lookaheadnum)
resolve_sr_conflict (state_t *state, int lookahead)
{
int i;
/* 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;
int redprec = rules[LAruleno[lookahead]].prec;
errs *errp = errs_new (ntokens + 1);
errp->nerrs = 0;
for (i = 0; i < ntokens; i++)
if (BITISSET (LA (lookaheadnum), i)
if (BITISSET (LA (lookahead), 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. */
&& symbols[i]->prec)
{
if (sprec[i] < redprec)
/* Shift-reduce conflict occurs for token number i
and it has a precedence.
The precedence of shifting is that of token i. */
if (symbols[i]->prec < redprec)
{
log_resolution (state, lookaheadnum, i, _("reduce"));
/* flush the shift for this token */
RESETBIT (lookaheadset, i);
log_resolution (state, lookahead, i, _("reduce"));
flush_shift (state, i);
}
else if (sprec[i] > redprec)
else if (symbols[i]->prec > redprec)
{
log_resolution (state, lookaheadnum, i, _("shift"));
/* flush the reduce for this token */
RESETBIT (LA (lookaheadnum), i);
log_resolution (state, lookahead, i, _("shift"));
flush_reduce (lookahead, i);
}
else
{
/* Matching precedence levels.
For left association, keep only the reduction.
For right association, keep only the shift.
For nonassociation, keep neither. */
/* 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 (symbols[i]->assoc)
{
case right_assoc:
log_resolution (state, lookahead, i, _("shift"));
flush_reduce (lookahead, i);
break;
case left_assoc:
log_resolution (state, lookaheadnum, i, _("reduce"));
break;
case left_assoc:
log_resolution (state, lookahead, i, _("reduce"));
flush_shift (state, i);
break;
case non_assoc:
log_resolution (state, lookaheadnum, i, _("an error"));
break;
}
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;
}
}
case non_assoc:
log_resolution (state, lookahead, i, _("an error"));
flush_shift (state, i);
flush_reduce (lookahead, i);
/* Record an explicit error for this token. */
errp->errs[errp->nerrs++] = i;
break;
}
}
errp->nerrs = errtokens - errp->errs;
/* 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);
state->errs = errs_dup (errp);
free (errp);
}
static void
set_conflicts (int state)
set_conflicts (state_t *state)
{
int i, j;
shifts *shiftp;
if (state_table[state].consistent)
if (state->consistent)
return;
for (i = 0; i < tokensetsize; i++)
lookaheadset[i] = 0;
shiftp = state_table[state].shifts;
shiftp = 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));
@@ -173,30 +171,26 @@ set_conflicts (int state)
/* Loop over all rules which require lookahead in this state. First
check for shift-reduce conflict, and try to resolve using
precedence */
for (i = state_table[state].lookaheads;
i < state_table[state + 1].lookaheads;
++i)
if (rule_table[LAruleno[i]].prec)
for (i = 0; i < state->nlookaheads; ++i)
if (rules[LAruleno[state->lookaheadsp + i]].prec)
for (j = 0; j < tokensetsize; ++j)
if (LA (i)[j] & lookaheadset[j])
if (LA (state->lookaheadsp + i)[j] & lookaheadset[j])
{
resolve_sr_conflict (state, i);
resolve_sr_conflict (state, state->lookaheadsp + i);
break;
}
/* Loop over all rules which require lookahead in this state. Check
for conflicts not resolved above. */
for (i = state_table[state].lookaheads;
i < state_table[state + 1].lookaheads;
++i)
for (i = 0; i < state->nlookaheads; ++i)
{
for (j = 0; j < tokensetsize; ++j)
if (LA (i)[j] & lookaheadset[j])
conflicts[state] = 1;
if (LA (state->lookaheadsp + i)[j] & lookaheadset[j])
conflicts[state->number] = 1;
for (j = 0; j < tokensetsize; ++j)
lookaheadset[j] |= LA (i)[j];
lookaheadset[j] |= LA (state->lookaheadsp + i)[j];
}
}
@@ -210,7 +204,7 @@ solve_conflicts (void)
lookaheadset = XCALLOC (unsigned, tokensetsize);
for (i = 0; i < nstates; i++)
set_conflicts (i);
set_conflicts (states[i]);
}
@@ -219,11 +213,11 @@ solve_conflicts (void)
`---------------------------------------------*/
static int
count_sr_conflicts (int state)
count_sr_conflicts (state_t *state)
{
int i, k;
int src_count = 0;
shifts *shiftp = state_table[state].shifts;
shifts *shiftp = state->shifts;
if (!shiftp)
return 0;
@@ -238,11 +232,9 @@ count_sr_conflicts (int state)
if (!SHIFT_IS_DISABLED (shiftp, i))
SETBIT (shiftset, SHIFT_SYMBOL (shiftp, i));
for (i = state_table[state].lookaheads;
i < state_table[state + 1].lookaheads;
++i)
for (i = 0; i < state->nlookaheads; ++i)
for (k = 0; k < tokensetsize; ++k)
lookaheadset[k] |= LA (i)[k];
lookaheadset[k] |= LA (state->lookaheadsp + i)[k];
for (k = 0; k < tokensetsize; ++k)
lookaheadset[k] &= shiftset[k];
@@ -260,23 +252,20 @@ count_sr_conflicts (int state)
`----------------------------------------------*/
static int
count_rr_conflicts (int state)
count_rr_conflicts (state_t *state)
{
int i;
int rrc_count = 0;
int m = state_table[state].lookaheads;
int n = state_table[state + 1].lookaheads;
if (n - m < 2)
if (state->nlookaheads < 2)
return 0;
for (i = 0; i < ntokens; i++)
{
int count = 0;
int j;
for (j = m; j < n; j++)
if (BITISSET (LA (j), i))
for (j = 0; j < state->nlookaheads; ++j)
if (BITISSET (LA (state->lookaheadsp + j), i))
count++;
if (count >= 2)
@@ -338,8 +327,8 @@ conflicts_output (FILE *out)
if (conflicts[i])
{
fprintf (out, _("State %d contains "), i);
fputs (conflict_report (count_sr_conflicts (i),
count_rr_conflicts (i)), out);
fputs (conflict_report (count_sr_conflicts (states[i]),
count_rr_conflicts (states[i])), out);
printed_sth = TRUE;
}
if (printed_sth)
@@ -368,8 +357,8 @@ conflicts_print (void)
for (i = 0; i < nstates; i++)
if (conflicts[i])
{
src_total += count_sr_conflicts (i);
rrc_total += count_rr_conflicts (i);
src_total += count_sr_conflicts (states[i]);
rrc_total += count_rr_conflicts (states[i]);
}
src_ok = src_total == (expected_conflicts == -1 ? 0 : expected_conflicts);
@@ -401,14 +390,7 @@ conflicts_print (void)
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++;
complain_message_count++;
fprintf (stderr, ngettext ("expected %d shift/reduce conflict\n",
"expected %d shift/reduce conflicts\n",
expected_conflicts),
@@ -417,142 +399,6 @@ conflicts_print (void)
}
void
print_reductions (FILE *out, int state)
{
int i;
int m;
int n;
shifts *shiftp;
errs *errp;
int nodefault = 0;
for (i = 0; i < tokensetsize; i++)
shiftset[i] = 0;
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 = state_table[state].errs;
if (errp)
for (i = 0; i < errp->nerrs; i++)
if (errp->errs[i])
SETBIT (shiftset, errp->errs[i]);
m = state_table[state].lookaheads;
n = state_table[state + 1].lookaheads;
if (n - m == 1 && !nodefault)
{
int k;
int default_rule = LAruleno[m];
for (k = 0; k < tokensetsize; ++k)
lookaheadset[k] = LA (m)[k] & shiftset[k];
for (i = 0; i < ntokens; i++)
if (BITISSET (lookaheadset, i))
fprintf (out, _(" %-4s\t[reduce using rule %d (%s)]\n"),
tags[i], default_rule,
tags[rule_table[default_rule].lhs]);
fprintf (out, _(" $default\treduce using rule %d (%s)\n\n"),
default_rule, tags[rule_table[default_rule].lhs]);
}
else if (n - m >= 1)
{
int cmax = 0;
int default_LA = -1;
int default_rule = 0;
if (!nodefault)
for (i = m; i < n; i++)
{
int count = 0;
int j, k;
for (k = 0; k < tokensetsize; ++k)
lookaheadset[k] = LA (i)[k] & ~shiftset[k];
for (j = 0; j < ntokens; j++)
if (BITISSET (lookaheadset, j))
count++;
if (count > cmax)
{
cmax = count;
default_LA = i;
default_rule = LAruleno[i];
}
for (k = 0; k < tokensetsize; ++k)
shiftset[k] |= lookaheadset[k];
}
for (i = 0; i < tokensetsize; i++)
shiftset[i] = 0;
for (i = 0; i < shiftp->nshifts && SHIFT_IS_SHIFT (shiftp, i); i++)
if (!SHIFT_IS_DISABLED (shiftp, i))
SETBIT (shiftset, SHIFT_SYMBOL (shiftp, i));
for (i = 0; i < ntokens; i++)
{
int j;
int defaulted = 0;
int count = BITISSET (shiftset, i);
for (j = m; j < n; j++)
{
if (BITISSET (LA (j), i))
{
if (count == 0)
{
if (j != default_LA)
fprintf (out,
_(" %-4s\treduce using rule %d (%s)\n"),
tags[i],
LAruleno[j],
tags[rule_table[LAruleno[j]].lhs]);
else
defaulted = 1;
count++;
}
else
{
if (defaulted)
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],
LAruleno[j],
tags[rule_table[LAruleno[j]].lhs]);
}
}
}
}
if (default_LA >= 0)
fprintf (out, _(" $default\treduce using rule %d (%s)\n"),
default_rule, tags[rule_table[default_rule].lhs]);
}
}
void
free_conflicts (void)
{
-1
View File
@@ -25,7 +25,6 @@
void solve_conflicts PARAMS ((void));
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? */
+7 -6
View File
@@ -21,6 +21,7 @@
#include "system.h"
#include "getargs.h"
#include "symtab.h"
#include "types.h"
#include "reader.h"
#include "gram.h"
@@ -38,14 +39,14 @@ print_derives (void)
for (i = ntokens; i < nsyms; i++)
{
short *sp;
fprintf (stderr, "\t%s derives\n", tags[i]);
fprintf (stderr, "\t%s derives\n", symbols[i]->tag);
for (sp = derives[i]; *sp > 0; 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);
for (rhsp = &ritem[rules[*sp].rhs]; *rhsp >= 0; ++rhsp)
fprintf (stderr, " %s", symbols[*rhsp]->tag);
fprintf (stderr, " (rule %d)\n", -*rhsp - 1);
}
}
@@ -67,9 +68,9 @@ set_derives (void)
p = delts;
for (i = nrules; i > 0; i--)
if (rule_table[i].useful)
if (rules[i].useful)
{
int lhs = rule_table[i].lhs;
int lhs = rules[i].lhs;
p->next = dset[lhs];
p->value = i;
dset[lhs] = p;
+56 -159
View File
@@ -22,7 +22,6 @@
#include "system.h"
#include "getargs.h"
#include "quote.h"
#include "files.h"
#include "gram.h"
#include "error.h"
@@ -30,30 +29,39 @@
/* 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;
struct obstack attrs_obstack;
struct obstack table_obstack;
struct obstack defines_obstack;
struct obstack guard_obstack;
struct obstack output_obstack;
/* Initializing some values below (such SPEC_NAME_PREFIX to `yy') is
tempting, but don't do that: for the time being our handling of the
%directive vs --option leaves precedence to the options by deciding
that if a %directive sets a variable which is really set (i.e., not
NULL), then the %directive is ignored. As a result, %name-prefix,
for instance, will not be honored. */
char *spec_outfile = NULL; /* for -o. */
char *spec_file_prefix = NULL; /* for -b. */
char *spec_name_prefix = NULL; /* for -p. */
const char *spec_name_prefix = NULL; /* for -p. */
char *spec_verbose_file = NULL; /* for --verbose. */
char *spec_graph_file = NULL; /* for -g. */
char *spec_defines_file = NULL; /* for --defines. */
char *parser_file_name = NULL;
char *infile = NULL;
char *attrsfile = NULL;
static char *full_base_name = NULL;
static char *short_base_name = NULL;
/* Prefix used to generate output file names. */
char *short_base_name = NULL;
/* Infix used to generate output file names (i.e., `.tab', or `_tab',
or `'). */
char *output_infix = NULL;
/* C source file extension (the parser source). */
const char *src_extension = NULL;
@@ -82,7 +90,7 @@ strsuffix (const char *string, const char *suffix)
| STRING1, and STRING2. |
`-----------------------------------------------------------------*/
static char *
char*
stringappend (const char *string1, const char *string2)
{
size_t len = strlen (string1) + strlen (string2);
@@ -101,7 +109,7 @@ stringappend (const char *string1, const char *string2)
| alphanumerical + underscore). |
`-----------------------------------------------------------------*/
static char *
char *
compute_header_macro (void)
{
const char *prefix = "BISON_";
@@ -172,38 +180,6 @@ xfclose (FILE *ptr)
return result;
}
/*--------------------------------------------------.
| Save the content of the obstack OBS in FILENAME. |
`--------------------------------------------------*/
static void
obstack_save (struct obstack *obs, const char *filename)
{
FILE *out = xfopen (filename, "w");
size_t size = obstack_object_size (obs);
fwrite (obstack_finish (obs), 1, size, out);
xfclose (out);
}
/*---------------------------------------------------------------------.
| Output double inclusion protection macros and saves defines_obstack |
`---------------------------------------------------------------------*/
static void
defines_obstack_save (const char *filename)
{
FILE *out = xfopen (filename, "w");
size_t size = obstack_object_size (&defines_obstack);
char *macro_name = compute_header_macro ();
fprintf (out, "#ifndef %s\n", macro_name);
fprintf (out, "# define %s\n\n", macro_name);
fwrite (obstack_finish (&defines_obstack), 1, size, out);
fprintf (out, "\n#endif /* not %s */\n", macro_name);
free (macro_name);
xfclose (out);
}
/*------------------------------------------------------------------.
| Return the path to the skeleton which locaction might be given in |
@@ -215,7 +191,7 @@ skeleton_find (const char *envvar, const char *skeleton_name)
{
const char *res = getenv (envvar);
#if (defined (MSDOS) && !defined(__DJGPP__)) || defined (_WIN32)
#if defined (MSDOS) || defined (_WIN32)
const char *cp = getenv ("INIT");
if (!res)
{
@@ -250,7 +226,7 @@ skeleton_find (const char *envvar, const char *skeleton_name)
strcpy (res + (cp - program_name), skel_name);
}
}
#endif /* (defined (MSDOS) && !defined (__DJGPP__)) || defined (_WIN32) */
#endif /* defined (MSDOS) || defined (_WIN32) */
if (!res)
res = skeleton_name;
@@ -373,16 +349,21 @@ compute_base_names (void)
/* The full base name goes up the EXT, excluding it. */
full_base_name =
xstrndup (spec_outfile,
(strlen (spec_outfile) - (ext ? strlen (ext) : 0)));
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))));
xstrndup (spec_outfile,
(strlen (spec_outfile)
- (tab ? strlen (tab) : (ext ? strlen (ext) : 0))));
if (tab)
output_infix = xstrndup (tab,
(strlen (tab) - (ext ? strlen (ext) : 0)));
if (ext)
compute_exts_from_src (ext);
compute_exts_from_src (ext);
}
/* If --file-prefix=foo was specified, FULL_BASE_NAME = `foo.tab'
@@ -392,41 +373,41 @@ compute_base_names (void)
else
{
if (spec_file_prefix)
{
/* If --file-prefix=foo was specified, SHORT_BASE_NAME =
`foo'. */
short_base_name = xstrdup (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");
}
{
/* 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)));
}
{
/* 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)));
}
/* In these cases, always append `.tab'. */
output_infix = xstrdup (EXT_TAB);
full_base_name = XMALLOC (char,
strlen (short_base_name)
+ strlen (EXT_TAB) + 1);
strlen (short_base_name)
+ strlen (EXT_TAB) + 1);
stpcpy (stpcpy (full_base_name, short_base_name), EXT_TAB);
/* Computes the extensions from the grammar file name. */
filename_split (infile, &base, &tab, &ext);
if (ext && !yacc_flag)
compute_exts_from_gf (ext);
}
}
/*-------------------------------------------------------.
| Close the open files, compute the output files names. |
`-------------------------------------------------------*/
@@ -441,25 +422,14 @@ compute_output_file_names (void)
src_extension = ".c";
if (!header_extension)
header_extension = ".h";
parser_file_name =
spec_outfile ? spec_outfile : stringappend (full_base_name, src_extension);
/* It the defines filename if not given, we create it. */
if (!spec_defines_file)
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)
spec_graph_file = stringappend (short_base_name, ".vcg");
@@ -467,77 +437,4 @@ compute_output_file_names (void)
spec_verbose_file = stringappend (short_base_name, EXT_OUTPUT);
attrsfile = stringappend (short_base_name, EXT_STYPE_H);
attrsfile = stringappend (attrsfile, EXT_TYPE (header_extension));
}
/*-----------------------------------------------------------------.
| Open the input file. Look for the skeletons. Find the names of |
| the output files. Prepare the obstacks. |
`-----------------------------------------------------------------*/
void
open_files (void)
{
finput = xfopen (infile, "r");
/* Initialize the obstacks. */
obstack_init (&action_obstack);
obstack_init (&attrs_obstack);
obstack_init (&table_obstack);
obstack_init (&defines_obstack);
obstack_init (&guard_obstack);
obstack_init (&output_obstack);
}
/*-----------------------.
| Close the open file.. |
`-----------------------*/
void
close_files (void)
{
xfclose (finput);
}
/*---------------------------.
| Produce the output files. |
`---------------------------*/
void
output_files (void)
{
/* Output the main file. */
if (spec_outfile)
obstack_save (&table_obstack, spec_outfile);
else
obstack_save (&table_obstack,
stringappend (full_base_name, src_extension));
obstack_free (&table_obstack, NULL);
/* Output the header file if wanted. */
if (defines_flag)
defines_obstack_save (spec_defines_file);
obstack_free (&defines_obstack, NULL);
/* If we output only the table, dump the actions in ACTFILE. */
if (no_parser_flag)
obstack_save (&action_obstack, stringappend (short_base_name, ".act"));
obstack_free (&action_obstack, NULL);
/* If we produced a semantic parser ATTRS_OBSTACK must be dumped
into its own file, ATTTRSFILE. */
if (semantic_parser)
{
char *temp_name;
obstack_save (&attrs_obstack, attrsfile);
obstack_free (&attrs_obstack, NULL);
temp_name = stringappend (short_base_name, EXT_GUARD_C);
temp_name = stringappend (temp_name, EXT_TYPE (src_extension));
obstack_save (&guard_obstack, temp_name);
obstack_free (&guard_obstack, NULL);
}
}
+21 -21
View File
@@ -1,5 +1,5 @@
/* File names and variables for bison,
Copyright 1984, 1989, 2000, 2002 Free Software Foundation, Inc.
Copyright 1984, 1989, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -21,15 +21,14 @@
#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. */
/* File name specified with -o for the output file, or 0 if no -o. */
extern char *spec_outfile;
/* File name for the parser (i.e., the one above, or its default.) */
extern char *parser_file_name;
/* For -a. */
extern char *spec_name_prefix;
extern const char *spec_name_prefix;
/* File name pfx specified with -b, or 0 if no -b. */
extern char *spec_file_prefix;
@@ -50,37 +49,38 @@ extern FILE *finput;
/* Output all the action code; precise form depends on which parser. */
extern struct obstack action_obstack;
/* Output the tables and the parser and also contains all the %{
... %} definitions. */
extern struct obstack table_obstack;
/* optionally output #define's for token numbers. */
extern struct obstack defines_obstack;
/* If semantic parser, output a .h file that defines YYSTYPE... */
extern struct obstack attrs_obstack;
/* ... and output yyguard, containing all the guard code. */
extern struct obstack guard_obstack;
/* The verbose output. */
extern struct obstack output_obstack;
extern char *infile;
extern char *attrsfile;
void open_files PARAMS((void));
void close_files PARAMS((void));
void compute_output_file_names PARAMS((void));
void output_files PARAMS((void));
FILE *xfopen PARAMS ((const char *name, const char *mode));
int xfclose PARAMS ((FILE *ptr));
/* Compute the double inclusion guard's name. */
char *compute_header_macro PARAMS ((void));
const char *skeleton_find PARAMS ((const char *envvar,
const char *skeleton_name));
int strsuffix PARAMS ((const char *string, const char *suffix));
/* Is SUFFIX ending STRING? */
int strsuffix (const char* string, const char* suffix);
/* Return a newly allocated string composed of the concatenation of
STRING1, and STRING2. */
char* stringappend (const char* string1, const char* string2);
/* Prefix used to generate output file names. */
extern char *short_base_name;
/* Infix used to generate output file names (i.e., `.tab', or `_tab',
or `'). */
extern char *output_infix;
#endif /* !FILES_H_ */
+15 -43
View File
@@ -24,6 +24,8 @@
#include "files.h"
#include "complain.h"
#include "getargs.h"
#include "xalloc.h"
#include "options.h"
int debug_flag = 0;
int defines_flag = 0;
@@ -37,40 +39,9 @@ int graph_flag = 0;
int trace_flag = 0;
const char *skeleton = NULL;
const char *include = NULL;
extern char *program_name;
const char *shortopts = "yvgdhrltknVo:b:p:S:";
static struct option longopts[] =
{
/* Operation modes. */
{"help", no_argument, 0, 'h'},
{"version", no_argument, 0, 'V'},
{"yacc", no_argument, 0, 'y'},
{"fixed-output-files",no_argument, 0, 'y'},
/* Parser. */
{"skeleton", required_argument, 0, 'S'},
{"debug", no_argument, 0, 't'},
{"locations", no_argument, &locations_flag, 1},
/* was 'a'; apparently unused -wjh */
{"name-prefix", required_argument, 0, 'p'},
{"no-lines", no_argument, 0, 'l'},
{"no-parser", no_argument, 0, 'n'},
{"raw", no_argument, 0, 'r'},
{"token-table", no_argument, 0, 'k'},
/* Output. */
{"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. */
{"trace", no_argument, &trace_flag, 1},
{0, 0, 0, 0}
};
/*---------------------------.
| Display the help message. |
@@ -144,8 +115,7 @@ bison (GNU Bison) %s"), VERSION);
putc ('\n', stream);
fputs (_("\
Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n\
Free Software Foundation, Inc.\n"),
Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"),
stream);
fputs (_("\
@@ -160,16 +130,10 @@ 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
/* Under 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
# define AS_FILE_NAME(File) (strlwr (File), (File))
#else
# define AS_FILE_NAME(File) (File)
#endif
@@ -179,6 +143,7 @@ getargs (int argc, char *argv[])
{
int c;
struct option *longopts = long_option_table_new ();
while ((c = getopt_long (argc, argv, shortopts, longopts, NULL)) != EOF)
switch (c)
{
@@ -212,10 +177,15 @@ getargs (int argc, char *argv[])
skeleton = AS_FILE_NAME (optarg);
break;
case 'I':
include = AS_FILE_NAME (optarg);
break;
case 'd':
/* Here, the -d and --defines options are differentiated. */
defines_flag = 1;
spec_defines_file = AS_FILE_NAME (optarg);
if (optarg)
spec_defines_file = AS_FILE_NAME (optarg);
break;
case 'l':
@@ -256,6 +226,8 @@ getargs (int argc, char *argv[])
exit (1);
}
free (longopts);
if (optind == argc)
{
fprintf (stderr, _("%s: no grammar file given\n"), program_name);
+2 -3
View File
@@ -22,9 +22,8 @@
# define GETARGS_H_
/* flags set by % directives */
extern char *spec_file_prefix; /* for -b */
extern char *spec_name_prefix; /* for -p */
extern const char *skeleton;
extern const char *skeleton; /* for -S */
extern const char *include; /* for -I */
extern int debug_flag; /* for -t */
extern int defines_flag; /* for -d */
+13 -13
View File
@@ -21,6 +21,7 @@
#include "system.h"
#include "gram.h"
#include "symtab.h"
#include "reader.h"
/* comments for these variables are in gram.h */
@@ -32,12 +33,11 @@ int ntokens;
int nvars;
short *ritem = NULL;
rule_t *rule_table = NULL;
short *rprec = NULL;
short *rprecsym = NULL;
short *sprec = NULL;
short *rassoc = NULL;
short *sassoc = NULL;
int nritems;
rule_t *rules = NULL;
struct bucket **symbols = NULL;
short *token_translations = NULL;
int start_symbol;
@@ -60,11 +60,11 @@ 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]]);
for (i = 0; i < nritems; ++i)
if (ritem[i] >= 0)
fprintf (out, " %s", symbols[ritem[i]]->tag);
else
fprintf (out, " (rule %d)\n", -ritem[i]);
fprintf (out, " (rule %d)\n", -ritem[i] - 1);
fputs ("\n\n", out);
}
@@ -76,14 +76,14 @@ ritem_print (FILE *out)
size_t
ritem_longest_rhs (void)
{
short *itemp;
int length;
int max;
int i;
length = 0;
max = 0;
for (itemp = ritem; *itemp; itemp++)
if (*itemp > 0)
for (i = 0; i < nritems; ++i)
if (ritem[i] >= 0)
{
length++;
}
+50 -33
View File
@@ -21,45 +21,55 @@
#ifndef GRAM_H_
# define GRAM_H_
/* representation of the grammar rules:
/* Representation of the grammar rules:
ntokens is the number of tokens, and nvars is the number of
variables (nonterminals). nsyms is the total number, ntokens +
NTOKENS is the number of tokens, and NVARS is the number of
variables (nonterminals). NSYMS is the total number, ntokens +
nvars.
(the true number of token values assigned is ntokens reduced by one
for each alias declaration)
Each symbol (either token or variable) receives a symbol number.
Numbers 0 to ntokens-1 are for tokens, and ntokens to nsyms-1 are
for variables. Symbol number zero is the end-of-input token. This
token is counted in ntokens.
Numbers 0 to NTOKENS - 1 are for tokens, and NTOKENS to NSYMS - 1
are for variables. Symbol number zero is the end-of-input token.
This token is counted in ntokens. The true number of token values
assigned is NTOKENS reduced by one for each alias declaration.
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 receive rule numbers 1 to NRULES in the order they are
written. More precisely Bison augments the grammar with the
initial rule, `$axiom: START-SYMBOL EOF', which is numbered 1, all
the user rules are 2, 3 etc. Each time a rule number is presented
to the user, we subtract 1, so *displayed* rule numbers are 0, 1,
2...
Internally, we cannot use the number 0 for a rule because for
instance RITEM stores both symbol (the RHS) and rule numbers: the
symbols are shorts >= 0, and rule number are stored negative.
Therefore 0 cannot be used, since it would be both the rule number
0, and the token EOF).
Actions and guards are accessed via the rule number.
The rules themselves are described by several arrays: amongst which
RITEM, and RULE_TABLE.
RITEM, and RULES.
RULE_TABLE is an array of struct rule_s, which members are:
RULES 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.
RULES[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.
RULES[R].rhs -- the index in RITEM of the beginning of the portion
for rule R.
RULE_TABLE[R].prec -- the precedence level of R.
RULES[R].prec -- the precedence level of R.
RULE_TABLE[R].precsym -- the symbol-number of the symbol in %prec
for R (if any).
RULES[R].precsym -- the symbol-number of the symbol in %prec for R
(if any).
RULE_TABLE[R].assoc -- the associativity of R.
RULES[R].assoc -- the associativity of R.
RULE_TABLE[R].line -- the line where R was defined.
RULES[R].line -- the line where R was defined.
RULE_TABLE[R].useful -- TRUE iff the rule is used.
RULES[R].useful -- TRUE iff the rule is used.
The right hand side is stored as symbol numbers in a portion of
RITEM.
@@ -72,20 +82,20 @@
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
element of RITEM is called an "item" and its index in RITEM is an
item number.
Item numbers are used in the finite state machine to represent
places that parsing can get to.
SPREC records the precedence level of each symbol.
SYMBOLS[I]->prec 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
as they ought to. Zero as a symbol or rule's precedence means none
is assigned.
Associativities are recorded similarly in rassoc and sassoc. */
Associativities are recorded similarly in SYMBOLS[I]->assoc. */
#define ISTOKEN(s) ((s) < ntokens)
@@ -98,13 +108,11 @@ extern int ntokens;
extern int nvars;
extern short *ritem;
extern short *sprec;
extern short *sassoc;
extern int nritems;
extern int start_symbol;
/* associativity values in elements of rassoc, sassoc. */
/* Associativity values for tokens and rules. */
typedef enum
{
right_assoc,
@@ -119,12 +127,21 @@ typedef struct rule_s
short rhs;
short prec;
short precsym;
short assoc;
associativity assoc;
short line;
bool useful;
const char *action;
short action_line;
const char *guard;
short guard_line;
} rule_t;
extern struct rule_s *rule_table;
extern struct rule_s *rules;
/* Table of the symbols, indexed by the symbol number. */
extern struct bucket **symbols;
/* token translation table: indexed by a token number as returned by
the user's yylex routine, it yields the internal token number used

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