mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-08-09 18:55:14 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae26e1f02a | ||
|
|
d43baf71a7 | ||
|
|
7ebc83e34d | ||
|
|
b0a7a533c9 | ||
|
|
d90c934c05 | ||
|
|
05846dae07 | ||
|
|
447fbb178d | ||
|
|
b56471a689 | ||
|
|
1318e37d58 | ||
|
|
22a00a0cd2 | ||
|
|
768eb43fe8 | ||
|
|
7c78fa1885 | ||
|
|
5038f418c1 | ||
|
|
e5cfd9d8af | ||
|
|
cc0f0794b8 | ||
|
|
6b8c325436 | ||
|
|
6fed0802ee | ||
|
|
32f0598d06 | ||
|
|
7ea9a33f3b | ||
|
|
ea99527d23 | ||
|
|
f377f69fec | ||
|
|
2a1fe6ed6f | ||
|
|
f50adbbdb0 | ||
|
|
3b7d4eb2cd | ||
|
|
bcbad5b9a0 | ||
|
|
0ff67d71d7 | ||
|
|
efcb44dd47 | ||
|
|
1fe611e544 | ||
|
|
a6352deb14 | ||
|
|
bd0ba42d72 | ||
|
|
46b8b6ce90 | ||
|
|
fdabfd76d6 | ||
|
|
ea9ed226e0 | ||
|
|
98194095fe | ||
|
|
3f4c0f8017 | ||
|
|
14904b8965 | ||
|
|
17acead581 | ||
|
|
095b9f05c3 | ||
|
|
68449b3ad3 | ||
|
|
ff6dca1839 | ||
|
|
df5aed8c11 | ||
|
|
eb71459201 | ||
|
|
b7195100fd | ||
|
|
f28a0f2dd1 | ||
|
|
303e6da265 | ||
|
|
ef5da92061 | ||
|
|
3e0a8627e1 | ||
|
|
fd5c1e824e | ||
|
|
f5e211a120 | ||
|
|
55e728eb31 | ||
|
|
47c8386f83 | ||
|
|
d5c559cde4 | ||
|
|
d9d83ef277 | ||
|
|
d4d399fcce | ||
|
|
6fbe49845f | ||
|
|
7933f2b5dd | ||
|
|
0f9cd74fdb | ||
|
|
09147be095 | ||
|
|
7a542f5d81 | ||
|
|
420f93c83b | ||
|
|
a337a5eb7e | ||
|
|
595878d7f5 | ||
|
|
242a6e484e | ||
|
|
01eb033cf5 | ||
|
|
1c303b00fe | ||
|
|
f704e33362 | ||
|
|
5beedd9b58 | ||
|
|
9abb46d527 | ||
|
|
cd931d9b53 | ||
|
|
a4bf0390a0 | ||
|
|
72d2299ca0 | ||
|
|
ff68026d4f | ||
|
|
bf5c381136 | ||
|
|
5c319390d7 | ||
|
|
effda851f6 | ||
|
|
52f8da14ea | ||
|
|
eb6172cd1e | ||
|
|
32e218da16 | ||
|
|
4fc71aa390 | ||
|
|
c9de3b4080 | ||
|
|
2d382ea853 | ||
|
|
808a5918e6 | ||
|
|
d32fe6f64f | ||
|
|
f6ebdb3174 | ||
|
|
8207d52123 | ||
|
|
62a34c3eb6 | ||
|
|
6aa452a643 | ||
|
|
719010ad2b | ||
|
|
927f781708 | ||
|
|
e88dbdbf44 | ||
|
|
b778eff5f9 | ||
|
|
805e703284 | ||
|
|
464197c3a7 |
@@ -1,3 +1,418 @@
|
||||
2002-10-14 Akim Demaille <[email protected]>
|
||||
|
||||
Version 1.75.
|
||||
|
||||
2002-10-14 Akim Demaille <[email protected]>
|
||||
|
||||
* tests/Makefile.am (maintainer-check-posix): New.
|
||||
|
||||
2002-10-14 Akim Demaille <[email protected]>
|
||||
|
||||
* data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
|
||||
member.
|
||||
|
||||
2002-10-14 Akim Demaille <[email protected]>
|
||||
|
||||
* src/tables.c (table_ninf_remap): base -> tab.
|
||||
Reported by Matt Rosing.
|
||||
|
||||
2002-10-14 Paul Eggert <[email protected]>
|
||||
|
||||
* tests/action.at, tests/calc.at, tests/conflicts.at,
|
||||
tests/cxx-type.at, tests/headers.at, tests/input.at,
|
||||
tests/regression.at, tests/synclines.at, tests/torture.at:
|
||||
Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
|
||||
so that the tests still work even if POSIXLY_CORRECT is set.
|
||||
* doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
|
||||
|
||||
* data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
|
||||
for portability to K&R hosts. Fix typo: signed char is guaranteed
|
||||
only to 127, not to 128.
|
||||
* data/glr.c (yysigned_char): New type.
|
||||
* data/yacc.c (yysigned_char): Likewise.
|
||||
* tests/regression.at (Web2c Actions): signed char -> yysigned_char.
|
||||
|
||||
2002-10-13 Paul Eggert <[email protected]>
|
||||
|
||||
* data/yacc.c (yyparse): Rewrite to avoid "comparison is always
|
||||
true due to limited range of data type" warning from GCC.
|
||||
|
||||
* data/c.m4 (b4_token_defines): Protect against double-inclusion
|
||||
by wrapping enum yytokentype's definition inside #ifndef
|
||||
YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
|
||||
|
||||
2002-10-13 Akim Demaille <[email protected]>
|
||||
|
||||
* data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
|
||||
Un yy- yyrhs to avoid the name clash with the global YYRHS.
|
||||
|
||||
2002-10-13 Akim Demaille <[email protected]>
|
||||
|
||||
* Makefile.maint: Update from Autoconf 2.54.
|
||||
* m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
|
||||
|
||||
2002-10-13 Akim Demaille <[email protected]>
|
||||
|
||||
* src/print.c (print_state): Separate the list of solved conflicts
|
||||
from the other items.
|
||||
* tests/conflicts.at (Resolved SR Conflicts): Adjust.
|
||||
|
||||
2002-10-13 Akim Demaille <[email protected]>
|
||||
|
||||
Let nondeterministic skeletons be usable with deterministic
|
||||
tables.
|
||||
|
||||
With the patch, GAWK compiled by GCC without -O2 passes its test
|
||||
suite using a GLR parser driven by LALR tables. It fails with -O2
|
||||
because `struct stat' gives two different answers on my machine:
|
||||
88 (definition of an auto var) and later 96 (memset on this var).
|
||||
Hence the stack is badly corrumpted. The headers inclusion is to
|
||||
blame: if I move the awk.h inclusion before GLR's system header
|
||||
inclusion, the two struct stat have the same size.
|
||||
|
||||
* src/tables.c (pack_table): Always create conflict_table.
|
||||
(token_actions): Always create conflict_list.
|
||||
* data/glr.c (YYFLAG): Remove, unused.
|
||||
|
||||
2002-10-13 Akim Demaille <[email protected]>
|
||||
|
||||
* configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
|
||||
(O0FLAGS): New.
|
||||
(VALGRIND, GXX): New.
|
||||
* tests/atlocal.in (CFLAGS): Use O0FLAGS.
|
||||
* tests/bison.in: Run $PREBISON a pre-command.
|
||||
* tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
|
||||
(maintainer-check-g++): New.
|
||||
* Makefile.am (maintainer-check): New.
|
||||
|
||||
2002-10-13 Akim Demaille <[email protected]>
|
||||
|
||||
* data/glr.c: Formatting changes.
|
||||
Tweak some trace messages to match yacc.c's.
|
||||
|
||||
2002-10-13 Akim Demaille <[email protected]>
|
||||
|
||||
GLR parsers sometimes raise parse errors instead of performing the
|
||||
default reduction.
|
||||
Reported by Charles-Henry de Boysson.
|
||||
|
||||
* tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
|
||||
check the length of the traces when %glr.
|
||||
(_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
|
||||
GLR's traces.
|
||||
(AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
|
||||
Test GLR parsers.
|
||||
* data/glr.c (YYLEFTMOST_STATE): Fix its value.
|
||||
(yyltype): Remove the yy prefix from the member names.
|
||||
(yytable): Complete its comment.
|
||||
(yygetLRActions): Map error action number from YYTABLE from
|
||||
YYTABLE_NINF to 0.
|
||||
(yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
|
||||
(which was a bug: it should have been YYTABEL_NINF, and yet it was
|
||||
not satisfying as we could compare an YYACTION computed from
|
||||
YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
|
||||
only value for error actions.
|
||||
(yyreportParseError): In verbose parse error messages, don't issue
|
||||
`error' in the list of expected tokens.
|
||||
* data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
|
||||
next action to perform to match glr.c's decoding.
|
||||
(yytable): Complete its comment.
|
||||
|
||||
2002-10-13 Paul Eggert <[email protected]>
|
||||
|
||||
Fix problem reported by Henrik Grubbstroem in
|
||||
<http://mail.gnu.org/pipermail/bug-bison/2002-October/001670.html>:
|
||||
"nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
|
||||
because the Bison parser reads the second action before reducing
|
||||
the first one.
|
||||
* src/scan-gram.l (rule_length): New static var.
|
||||
Use it to keep track of the rule length in the scanner, since
|
||||
we can't expect the parser to be in lock-step sync with the scanner.
|
||||
(handle_action_dollar, handle_action_at): Use this var.
|
||||
* tests/actions.at (Exotic Dollars): Test for the problem.
|
||||
|
||||
2002-10-12 Paul Eggert <[email protected]>
|
||||
|
||||
* lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
|
||||
* m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
|
||||
Include <sys/time.h> when checking for clock_t and struct tms.
|
||||
Use same include order as source.
|
||||
This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
|
||||
<http://mail.gnu.org/pipermail/bug-bison/2002-October/001674.html>.
|
||||
|
||||
* lib/timevar.c: Update copyright date and clarify comments.
|
||||
(get_time) [IN_GCC]: Keep the GCC version for reference.
|
||||
|
||||
* lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
|
||||
GCC version as of today, then merge Bison's changes.
|
||||
Change "GCC" to "Bison" in copyright notice. timevar.def's
|
||||
author is Akim, so change that too.
|
||||
|
||||
* src/reader.c (grammar_current_rule_check):
|
||||
Don't worry about the default action if $$ is untyped.
|
||||
Prevents bogus warnings reported by Jim Gifford in
|
||||
<http://mail.gnu.org/pipermail/bug-bison/2002-October/001673.html>.
|
||||
|
||||
* data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
|
||||
* data/glr.c, data/lalr1.cc, data/yacc.c:
|
||||
Output token definitions before the first part of user declarations.
|
||||
Fixes compatibility problem reported by Jim Gifford for kbd in
|
||||
<http://mail.gnu.org/pipermail/bug-bison/2002-October/001672.html>.
|
||||
|
||||
2002-10-11 Paul Eggert <[email protected]>
|
||||
|
||||
* data/yacc.c (yyreport_parse_error): Remove, putting its body into...
|
||||
(yyparse): here. This undoes some of the 2002-07-25 change.
|
||||
Compatibility problem reported by Ralf S. Engelschall with
|
||||
OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
|
||||
|
||||
2002-10-11 Akim Demaille <[email protected]>
|
||||
|
||||
* tests/regression.at Characters Escapes): New.
|
||||
* src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
|
||||
characters.
|
||||
Reported by Jan Nieuwenhuizen.
|
||||
|
||||
2002-10-11 Akim Demaille <[email protected]>
|
||||
|
||||
* po/id.po: New.
|
||||
|
||||
2002-10-10 Paul Eggert <[email protected]>
|
||||
|
||||
Portability fixes for bitsets; this also avoids several GCC
|
||||
warnings.
|
||||
|
||||
* lib/abitset.c: Include <stddef.h>, for offsetof.
|
||||
* lib/lbitset.c: Likewise.
|
||||
|
||||
* lib/abitset.c (abitset_bytes): Return a size that is aligned
|
||||
properly for vectors of objects. Do not assume that adding a
|
||||
header size to a multiple of a word size yields a value that is
|
||||
properly aligned for the whole union.
|
||||
* lib/bitsetv.c (bitsetv_alloc): Likewise.
|
||||
|
||||
* lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
|
||||
unique names for structures.
|
||||
* lib/ebitset.c (ebitset_bytes): Likewise.
|
||||
* lib/lbitset.c (lbitset_bytes): Likewise.
|
||||
|
||||
* lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
|
||||
abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
|
||||
abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
|
||||
abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
|
||||
abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
|
||||
abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
|
||||
abitset_or_and_cmp, abitset_copy): Supply prototype decls,
|
||||
to improve the type-checking that GCC can do.
|
||||
* lib/bitset.c (bitset_op4_cmp): Likewise.
|
||||
* lib/bitset_stats.c (bitset_stats_count,
|
||||
bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
|
||||
bitset_stats_copy, bitset_stats_disjoint_p,
|
||||
bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
|
||||
bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
|
||||
bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
|
||||
bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
|
||||
bitset_stats_and_or_cmp, bitset_stats_andn_or,
|
||||
bitset_stats_andn_or_cmp, bitset_stats_or_and,
|
||||
bitset_stats_or_and_cmp): Likewise.
|
||||
* lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
|
||||
lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
|
||||
lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
|
||||
lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
|
||||
|
||||
* lib/abitset.h: Include bitset.h, not bbitset.h.
|
||||
* lib/ebitset.h: Likewise.
|
||||
* lib/lbitset.h: Likewise.
|
||||
|
||||
* lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
|
||||
All instances of parameters of type enum bitset_opts are now of
|
||||
type enum_bitset_opts, to conform to the C Standard, and similarly
|
||||
for enum_bitset_type.
|
||||
* lib/ebitset.c (enum_ebitset_find_mode): Likewise.
|
||||
* lib/lbitset.c (enum_lbitset_find_mode): Likewise.
|
||||
|
||||
Do not use "struct bitset_struct" to mean different things in
|
||||
different modules. Not only is this confusing, it violates
|
||||
the C Standard, which requires that structure types in different
|
||||
modules must be compatible if one is to be passed to the other.
|
||||
* lib/bbitset.h (bitset): Now points to a union, not to a struct.
|
||||
All instances of "struct bitset_struct *" replaced with "bitset".
|
||||
* lib/bitset.h (struct bitset_struct): Remove, replacing with....
|
||||
(union bitset_union, struct abitset_struct, struct ebitset_struct,
|
||||
struct lbitset_struct, struct bitset_stats_struct): New types.
|
||||
All uses of struct bitset_struct changed to union bitset_union,
|
||||
etc.
|
||||
* lib/abitset.c (struct abitset_struct, abitset,
|
||||
struct bitset_struct): Remove.
|
||||
* lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
|
||||
struct bitset_struct): Remove.
|
||||
* lib/ebitset.c (struct ebitset_struct, ebitset, struct
|
||||
bitset_struct): Remove.
|
||||
* lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
|
||||
Likewise.
|
||||
|
||||
Do not call a function of type T using a call that assumes the
|
||||
function is of a different type U. Standard C requires that a
|
||||
function must be called with a type that is compatible with its
|
||||
definition.
|
||||
* lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
|
||||
New decls.
|
||||
* lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
|
||||
New functions.
|
||||
* lib/ebitset.c (PFV): Remove.
|
||||
* lib/lbitset.c (PFV): Likewise.
|
||||
* lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
|
||||
ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
|
||||
decls.
|
||||
(ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
|
||||
(ebitset_vtable): Use them.
|
||||
* lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
|
||||
lbitset_xor): New functions.
|
||||
(lbitset_vtable): Use them.
|
||||
|
||||
* lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
|
||||
Declare.
|
||||
|
||||
* lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
|
||||
GCC warning.
|
||||
* lib/lbitset.c (LBITSET_CURRENT1): Likewise.
|
||||
Use offsetof, for simplicity.
|
||||
|
||||
2002-10-06 Paul Eggert <[email protected]>
|
||||
|
||||
* lib/bitset.h (bitset_reset): Do not assume that bitset_word is
|
||||
the same width as int. This reapplies a hunk of the 2002-08-12 patch
|
||||
<http://mail.gnu.org/pipermail/bison-patches/2002-August/001111.html>,
|
||||
which was inadvertently undone by the 2002-09-30 patch.
|
||||
* lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
|
||||
the same width as int.
|
||||
|
||||
2002-10-04 Paul Eggert <[email protected]>
|
||||
|
||||
Version 1.50.
|
||||
|
||||
* configure.ac (AC_INIT), NEWS: Increment version number.
|
||||
|
||||
* doc/bison.texinfo: Minor spelling, grammar, and white space
|
||||
fixes.
|
||||
(Symbols): Mention that any negative value returned from yylex
|
||||
signifies end-of-input. Warn about negative chars. Mention
|
||||
the portable Standard C character set.
|
||||
|
||||
The GNU coding standard says CFLAGS and YFLAGS are reserved
|
||||
for the installer to set.
|
||||
* lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
|
||||
* src/Makefile.am (AM_CFLAGS): Likewise.
|
||||
(AM_YFLAGS): Renamed from YFLAGS.
|
||||
|
||||
Fix some MAX and MIN problems.
|
||||
* src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
|
||||
* src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
|
||||
* src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
|
||||
* src/reader.c (reader): Use it.
|
||||
|
||||
* tests/regression.at (Braces parsing): Use grep, not fgrep, as
|
||||
POSIX 1003.1-2001 has removed fgrep.
|
||||
|
||||
2002-10-04 Michael Hayes <[email protected]>
|
||||
|
||||
* lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
|
||||
interpreted as signed.
|
||||
* lib/ebitset.c (ebitset_list): Fix bug.
|
||||
|
||||
2002-10-01 Paul Eggert <[email protected]>
|
||||
|
||||
More fixes for 64-bit hosts and large bitsets.
|
||||
|
||||
* lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
|
||||
abitset_size, abitset_list, abitset_list_reverse, abitset_list):
|
||||
Use bitset_bindex, not int or unsigned int or size_t, to count bits.
|
||||
* lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
|
||||
struct bitset_vtable.list, struct bitset_vtable.list_reverse,
|
||||
bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
|
||||
bitset_count_): Likewise.
|
||||
* lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
|
||||
bitset_first, bitset_last): Likewise.
|
||||
* lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
|
||||
bitset_stats_list_reverse, bitset_stats_size,
|
||||
bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
|
||||
Likewise.
|
||||
* lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
|
||||
* lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
|
||||
bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
|
||||
bitsetv_reflexive_transitive_closure): Likewise.
|
||||
* lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
|
||||
* lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
|
||||
Likewise.
|
||||
* lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
|
||||
Likewise.
|
||||
|
||||
* lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
|
||||
Use size_t, not unsigned int, to count bytes.
|
||||
* lib/abitset.h (abitset_bytes): Likewise.
|
||||
* lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
|
||||
Likewise.
|
||||
* lib/bitset.h (bitset_bytes): Likewise.
|
||||
* lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
|
||||
* lib/bitset_stats.h (bitset_stats_bytes): Likewise.
|
||||
* lib/bitsetv.c (bitsetv_alloc): Likewise.
|
||||
* lib/ebitset.c (ebitset_bytes): Likewise.
|
||||
* lib/ebitset.h (ebitset_bytes): Likewise.
|
||||
* lib/lbitset.c (lbitset_bytes): Likewise.
|
||||
* lib/lbitset.h (lbitset_bytes): Likewise.
|
||||
|
||||
* lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
|
||||
abitset_subset_p, abitset_disjoint_p, abitset_and,
|
||||
abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
|
||||
abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
|
||||
abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
|
||||
abitset_or_and, abitset_or_and_cmp):
|
||||
Use bitset_windex instead of unsigned int.
|
||||
* lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
|
||||
* lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
|
||||
ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
|
||||
ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
|
||||
Likewise.
|
||||
* lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
|
||||
|
||||
* lib/bitset.c (bitset_print):
|
||||
Use proper printf formats for widths of integer types.
|
||||
* lib/bitset_stats.c (bitset_percent_histogram_print,
|
||||
bitset_log_histogram_print, bitset_stats_print_1): Likewise.
|
||||
* lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
|
||||
* lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
|
||||
* lib/lbitset.c (lbitset_bytes): Likewise.
|
||||
|
||||
* lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
|
||||
BITSET_SIZE_MAX): New macros.
|
||||
(BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
|
||||
sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
|
||||
to BITSET_WINDEX_MAX.
|
||||
|
||||
* lib/bitset.c (bitset_next, bitset_prev, bitset_first,
|
||||
bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
|
||||
since we now return the bitset_bindex type (not int).
|
||||
|
||||
* lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
|
||||
when computing sizes.
|
||||
* lib/ebitset.c (ebitset_elts_grow): Likewise.
|
||||
|
||||
* lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
|
||||
and avoid cast to unsigned.
|
||||
|
||||
2002-09-30 Akim Demaille <[email protected]>
|
||||
|
||||
* lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
|
||||
* lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
|
||||
Updates from Michael Hayes.
|
||||
|
||||
2002-09-30 Art Haas <[email protected]>
|
||||
|
||||
* configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
|
||||
invocations.
|
||||
* tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
|
||||
defined.
|
||||
|
||||
2002-09-27 Akim Demaille <[email protected]>
|
||||
|
||||
Version 1.49c.
|
||||
|
||||
@@ -52,11 +52,10 @@ release:
|
||||
that 1. Bison compiles cleanly, 2. the parsers it produces compile
|
||||
cleanly too.
|
||||
|
||||
- Change tests/bison to run `valgrind -q bison' to run Bison under
|
||||
Valgrind.
|
||||
|
||||
- Run the test suite with `./testsuite PREPARSER='valgrind -q' to make
|
||||
sure the parser behave properly.
|
||||
- run `make maintainer-check' which:
|
||||
- runs `valgrind -q bison' to run Bison under Valgrind.
|
||||
- runs the parsers under Valdrind.
|
||||
- runs the test suite with G++ as C compiler...
|
||||
|
||||
- Change tests/atlocal/CFLAGS to add your preferred options. For
|
||||
instance, `-traditional' to check that the parsers are K&R. Note
|
||||
@@ -64,8 +63,6 @@ release:
|
||||
but currently is actually GNU C, nor for lalr1.cc, which anyway is
|
||||
not exercised yet in the test suite.
|
||||
|
||||
- Change tests/atlocal/CC to use a C++ compiler.
|
||||
|
||||
|
||||
* Release Procedure
|
||||
|
||||
|
||||
@@ -22,6 +22,9 @@ SUBDIRS = config po lib data src doc m4 tests
|
||||
|
||||
EXTRA_DIST = REFERENCES OChangeLog Makefile.maint GNUmakefile
|
||||
|
||||
.PHONY: maintainer-check
|
||||
maintainer-check:
|
||||
cd tests && $(MAKE) $(AM_MAKEFLAGS) $@
|
||||
|
||||
## ---------------------------- ##
|
||||
## Customizing Makefile.maint. ##
|
||||
|
||||
+14
-22
@@ -251,19 +251,15 @@ my-distcheck: writable-files po-check
|
||||
echo "$(distdir).tar.gz is ready for distribution"; \
|
||||
echo "========================"
|
||||
|
||||
# This must be the same name on both hosts.
|
||||
# Make it a symlink that points to the right place.
|
||||
real_dir = fetish-ftp
|
||||
|
||||
url_dir_list = $(foreach x,$(hosts),ftp://$($(x)_host)/$($(x)_url_dir))
|
||||
|
||||
tgz-md5 = $(shell md5sum < $(my_distdir).tar.gz|sed 's/ -//')
|
||||
tgz-sha1 = $(shell sha1sum < $(my_distdir).tar.gz|sed 's/ -//')
|
||||
bz2-md5 = $(shell md5sum < $(my_distdir).tar.bz2|sed 's/ -//')
|
||||
bz2-sha1 = $(shell sha1sum < $(my_distdir).tar.bz2|sed 's/ -//')
|
||||
tgz-size = $(shell du --human $(my_distdir).tar.gz|sed 's/\([Mk]\).*/ \1B/')
|
||||
bz2-size = $(shell du --human $(my_distdir).tar.bz2|sed 's/\([Mk]\).*/ \1B/')
|
||||
xd-size = $(shell du --human $(xd-delta)|sed 's/\([Mk]\).*/ \1B/')
|
||||
xdelta-md5 = $(shell md5sum < $(xd-delta)|sed 's/ -//')
|
||||
xdelta-sha1 = $(shell sha1sum < $(xd-delta)|sed 's/ -//')
|
||||
tgz-size = $(shell du --human $(my_distdir).tar.gz|sed 's/\([MkK]\).*/ \1B/')
|
||||
bz2-size = $(shell du --human $(my_distdir).tar.bz2|sed 's/\([MkK]\).*/ \1B/')
|
||||
xd-size = $(shell du --human $(xd-delta)|sed 's/\([MkK]\).*/ \1B/')
|
||||
|
||||
rel-check:
|
||||
tarz=/tmp/rel-check-tarz-$$$$; \
|
||||
@@ -277,12 +273,8 @@ rel-check:
|
||||
prev-tgz = $(PACKAGE)-$(PREV_VERSION).tar.gz
|
||||
xd-delta = $(PACKAGE)-$(PREV_VERSION)-$(VERSION).xdelta
|
||||
|
||||
GZIP = gzip
|
||||
BZIP2 = bzip2
|
||||
$(my_distdir).tar.bz2: $(my_distdir).tar.gz
|
||||
$(GZIP) -dc $< > $(my_distdir).tar
|
||||
rm -f $@
|
||||
$(BZIP2) -9 $(my_distdir).tar
|
||||
news-r1 = /^[^ ].*$(THIS_VERSION_REGEXP)[]:]/
|
||||
news-r2 = /^[^ ].*$(PREV_VERSION_REGEXP)[]:]/
|
||||
|
||||
rel-files = $(xd-delta) $(distdir).tar.bz2 $(distdir).tar.gz
|
||||
announcement: NEWS ChangeLog $(rel-files)
|
||||
@@ -302,15 +294,17 @@ announcement: NEWS ChangeLog $(rel-files)
|
||||
echo " $$url/$(xd-delta) ($(xd-size))"; \
|
||||
done; \
|
||||
echo; \
|
||||
echo "Here are the MD5 and SHA1 signatures for the compressed tar files:"; \
|
||||
echo "Here are the MD5 and SHA1 signatures:"; \
|
||||
echo; \
|
||||
echo "$(tgz-md5) $(my_distdir).tar.gz"; \
|
||||
echo "$(bz2-md5) $(my_distdir).tar.bz2"; \
|
||||
echo "$(xdelta-md5) $(xd-delta)"; \
|
||||
echo "$(tgz-sha1) $(my_distdir).tar.gz"; \
|
||||
echo "$(bz2-sha1) $(my_distdir).tar.bz2"; \
|
||||
echo "$(xdelta-sha1) $(xd-delta)"; \
|
||||
echo; \
|
||||
echo NEWS:; \
|
||||
sed -n "/$(THIS_VERSION_REGEXP)[]:]/,/$(PREV_VERSION_REGEXP)[]:]/p" NEWS \
|
||||
sed -n "$(news-r1),$(news-r2)p" NEWS \
|
||||
| grep -v '^\['; \
|
||||
echo; \
|
||||
echo ChangeLog entries:; \
|
||||
@@ -321,12 +315,10 @@ announcement: NEWS ChangeLog $(rel-files)
|
||||
-e 'print "\n"."*"x70 ."\n"; s///; print; print "*"x70 ."\n"'; \
|
||||
)
|
||||
|
||||
define emit-rsync-commands
|
||||
define emit-upload-commands
|
||||
echo =====================================
|
||||
echo =====================================
|
||||
echo 'for host in $(a_host) $(b_host); do \'
|
||||
echo ' rsync -e ssh --pro -av $(xd-delta) $(my_distdir).tar.bz2 \'
|
||||
echo ' $(my_distdir).tar.gz $$host:$(real_dir); done'
|
||||
echo upload $(PACKAGE) $(PREV_VERSION) $(VERSION)
|
||||
echo '# send the /tmp/announcement e-mail'
|
||||
echo =====================================
|
||||
echo =====================================
|
||||
@@ -343,4 +335,4 @@ alpha:
|
||||
chmod a-w $(rel-files)
|
||||
echo $(VERSION) > $(prev_version_file)
|
||||
$(CVS) ci -m. $(prev_version_file)
|
||||
@$(emit-rsync-commands)
|
||||
@$(emit-upload-commands)
|
||||
|
||||
@@ -1,10 +1,38 @@
|
||||
Bison News
|
||||
----------
|
||||
|
||||
Changes in version 1.49c:
|
||||
Changes in version 1.75:
|
||||
|
||||
* Bison should now work on 64-bit hosts.
|
||||
|
||||
Changes in version 1.49b, 2002-08-12:
|
||||
* Indonesian translation thanks to Tedi Heriyanto.
|
||||
|
||||
* GLR parsers
|
||||
Fix spurious parse errors.
|
||||
|
||||
* Pure parsers
|
||||
Some people redefine yyerror to steal yyparse' private variables.
|
||||
Reenable this trick until an official feature replaces it.
|
||||
|
||||
* Type Clashes
|
||||
In agreement with POSIX and with other Yaccs, leaving a default
|
||||
action is valid when $$ is untyped, and $1 typed:
|
||||
|
||||
untyped: ... typed;
|
||||
|
||||
but the converse remains an error:
|
||||
|
||||
typed: ... untyped;
|
||||
|
||||
* Values of mid-rule actions
|
||||
The following code:
|
||||
|
||||
foo: { ... } { $$ = $1; } ...
|
||||
|
||||
was incorrectly rejected: $1 is defined in the second mid-rule
|
||||
action, and is equal to the $$ of the first mid-rule action.
|
||||
|
||||
Changes in version 1.50, 2002-10-04:
|
||||
|
||||
* GLR parsing
|
||||
The declaration
|
||||
@@ -14,27 +42,30 @@ Changes in version 1.49b, 2002-08-12:
|
||||
%dprec and %merge on grammar rules allow parse-time resolution of
|
||||
ambiguities. Contributed by Paul Hilfinger.
|
||||
|
||||
Unfortunately Bison 1.50 does not work properly on 64-bit hosts
|
||||
like the Alpha, so please stick to 32-bit hosts for now.
|
||||
|
||||
* Output Directory
|
||||
When not in Yacc compatibility mode, when the output file was not
|
||||
specified, runnning `bison foo/bar.y' created `foo/bar.c'. It
|
||||
specified, running `bison foo/bar.y' created `foo/bar.c'. It
|
||||
now creates `bar.c'.
|
||||
|
||||
* Undefined token
|
||||
The undefined token was systematically mapped to 2 which prevented
|
||||
the use of 2 from the user. This is no longer the case.
|
||||
the use of 2 by the user. This is no longer the case.
|
||||
|
||||
* Unknown token numbers
|
||||
If yylex returned a code out of range, yyparse could die. This is
|
||||
If yylex returned an out of range value, yyparse could die. This is
|
||||
no longer the case.
|
||||
|
||||
* Error token
|
||||
According to POSIX, the error token should be numbered as 256.
|
||||
According to POSIX, the error token must be 256.
|
||||
Bison extends this requirement by making it a preference: *if* the
|
||||
user specified that one of her tokens is numbered 256, then error
|
||||
will be mapped onto another number.
|
||||
|
||||
* Verbose error messages
|
||||
They no longer report `..., expecting error or...' for state where
|
||||
They no longer report `..., expecting error or...' for states where
|
||||
error recovery is possible.
|
||||
|
||||
* End token
|
||||
@@ -110,12 +141,12 @@ Changes in version 1.49b, 2002-08-12:
|
||||
Croatian, thanks to Denis Lackovic.
|
||||
|
||||
* Incorrect token definitions
|
||||
When fed with `%token 'a' "A"', Bison used to output `#define 'a' 65'.
|
||||
When given `%token 'a' "A"', Bison used to output `#define 'a' 65'.
|
||||
|
||||
* Token definitions as enums
|
||||
Tokens are output both as the traditional #define's, and, provided
|
||||
the compiler supports ANSI C or is a C++ compiler, as enums.
|
||||
This helps debuggers producing symbols instead of values.
|
||||
This lets debuggers display names instead of integers.
|
||||
|
||||
* Reports
|
||||
In addition to --verbose, bison supports --report=THINGS, which
|
||||
@@ -155,7 +186,6 @@ Changes in version 1.35, 2002-03-25:
|
||||
|
||||
This kludge also addresses some C++ problems when the stack was
|
||||
extended.
|
||||
|
||||
|
||||
Changes in version 1.34, 2002-03-12:
|
||||
|
||||
|
||||
@@ -1,60 +1,64 @@
|
||||
Bison was originally written by Robert Corbett. It would not be what
|
||||
it is today without the invaluable help of these people:
|
||||
|
||||
Airy Andre [email protected]
|
||||
Akim Demaille [email protected]
|
||||
Albert Chin-A-Young [email protected]
|
||||
Alexander Belopolsky [email protected]
|
||||
Andreas Schwab [email protected]
|
||||
Arnold Robbins [email protected]
|
||||
Benoit Perrot [email protected]
|
||||
Bruce Lilly [email protected]
|
||||
Cris Bailiff c.bailiff+bison@awayweb.com
|
||||
Cris van Pelt [email protected]
|
||||
Daniel Hagerty [email protected]
|
||||
David J. MacKenzie [email protected]
|
||||
Dick Streefland [email protected]
|
||||
Enrico Scholz [email protected]
|
||||
Evgeny Stambulchik [email protected]l
|
||||
Fabrice Bauzac [email protected]
|
||||
Florian Krohm [email protected]
|
||||
H. Merijn Brand [email protected]
|
||||
Hans Aberg [email protected]
|
||||
Jesse Thilo [email protected]
|
||||
Jim Meyering [email protected]
|
||||
Juan Manuel Guerrero [email protected]
|
||||
Kees Zeelenberg [email protected]
|
||||
Keith Browne [email protected]
|
||||
Laurent Mascherpa [email protected]
|
||||
Magnus Fromreide [email protected]
|
||||
Marc Autret [email protected]
|
||||
Martin Mokrejs [email protected]
|
||||
Matt Kraai [email protected]
|
||||
Michael Hayes [email protected]
|
||||
Mike Castle [email protected]
|
||||
Neil Booth [email protected]
|
||||
Nelson H. F. Beebe [email protected]
|
||||
Nicolas Burrus [email protected]
|
||||
Nicolas Tisserand [email protected]
|
||||
Noah Friedman [email protected]
|
||||
Pascal Bart [email protected]
|
||||
Paul Eggert [email protected]
|
||||
Paul Hilfinger [email protected]
|
||||
Per Allansson [email protected]
|
||||
Peter Hámorský [email protected]
|
||||
Piotr Gackiewicz gacek@intertel.com.pl
|
||||
R Blake [email protected]
|
||||
Raja R Harinath [email protected]
|
||||
Richard Stallman [email protected]
|
||||
Robert Anisko [email protected]
|
||||
Shura [email protected]
|
||||
Tim Josling [email protected]u
|
||||
Tom Lane [email protected]
|
||||
Tom Tromey [email protected]
|
||||
Wayne Green [email protected]
|
||||
Wolfram Wagner [email protected]
|
||||
Wwp [email protected]
|
||||
Zack Weinberg zack@codesourcery.com
|
||||
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]
|
||||
Art Haas [email protected]
|
||||
Benoit Perrot [email protected]
|
||||
Bruce Lilly blilly@erols.com
|
||||
Charles-Henri de Boysson [email protected]
|
||||
Cris Bailiff [email protected]
|
||||
Cris van Pelt [email protected]
|
||||
Daniel Hagerty [email protected]
|
||||
David J. MacKenzie [email protected]
|
||||
Dick Streefland [email protected]l
|
||||
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]
|
||||
Jan Nieuwenhuizen [email protected]
|
||||
Jesse Thilo [email protected]
|
||||
Jim Meyering [email protected]
|
||||
Juan Manuel Guerrero [email protected]
|
||||
Kees Zeelenberg [email protected]
|
||||
Keith Browne [email protected]
|
||||
Laurent Mascherpa [email protected]
|
||||
Magnus Fromreide [email protected]
|
||||
Marc Autret [email protected]
|
||||
Martin Mokrejs [email protected]
|
||||
Matt Kraai [email protected]
|
||||
Matt Rosing [email protected]
|
||||
Michael Hayes [email protected]
|
||||
Mike Castle [email protected]
|
||||
Neil Booth [email protected]
|
||||
Nelson H. F. Beebe [email protected]
|
||||
Nicolas Burrus [email protected]
|
||||
Nicolas Tisserand [email protected]
|
||||
Noah Friedman [email protected]
|
||||
Pascal Bart [email protected]
|
||||
Paul Eggert eggert@twinsun.com
|
||||
Paul Hilfinger [email protected]
|
||||
Per Allansson [email protected]
|
||||
Peter Hámorský [email protected]
|
||||
Piotr Gackiewicz [email protected]
|
||||
R Blake [email protected]
|
||||
Raja R Harinath [email protected]u
|
||||
Richard Stallman [email protected]
|
||||
Robert Anisko [email protected]
|
||||
Shura [email protected]
|
||||
Tim Josling [email protected]
|
||||
Tom Lane [email protected]
|
||||
Tom Tromey tromey@cygnus.com
|
||||
Wayne Green [email protected]
|
||||
Wolfram Wagner [email protected]
|
||||
Wwp [email protected]
|
||||
Zack Weinberg [email protected]
|
||||
|
||||
Many people are not named here because we lost track of them. We
|
||||
thank them! Please, help us keeping this list up to date.
|
||||
|
||||
@@ -2,62 +2,7 @@
|
||||
|
||||
* Header guards
|
||||
|
||||
En rentrant chez moi, je relance un `make' sur un projet que j'ai avancé
|
||||
ailleurs durant la semaine. Le système que j'utilise ici est un peu plus
|
||||
à jour que l'autre, et le Bison est probablement plus récent itou. Ici,
|
||||
c'est la version 1.33. J'obtiens, en montrant un peu plus que nécessaire:
|
||||
|
||||
---------------------------------------------------------------------->
|
||||
cd ~/fpub/pyrexpp/Pyrexpp/
|
||||
LANGUAGE= /usr/bin/make MAKEFLAGS='-k -j2'
|
||||
/usr/bin/make -C .. install
|
||||
make[1]: Entre dans le répertoire `/bpi/titan/home/pinard/fpub/pyrexpp'
|
||||
install -g bpi -m 2775 -d Prépare-titan
|
||||
chmod g+sw Prépare-titan
|
||||
touch Prépare-titan/.estampille
|
||||
/usr/bin/gcc -fPIC -I/usr/include/python2.2 -IPrépare-titan -g -c -o Prépare-titan/ctools.o ctools.c
|
||||
bison -d -o Prépare-titan/c-parser.c c-parser.y
|
||||
/usr/bin/gcc -fPIC -I/usr/include/python2.2 -IPrépare-titan -g -c -o Prépare-titan/c-parser.o Prépare-titan/c-parser.c
|
||||
flex -t c-scanner.l | grep -v '^#line' > Prépare-titan/c-scanner.c
|
||||
/usr/bin/gcc -fPIC -I/usr/include/python2.2 -IPrépare-titan -g -c -o Prépare-titan/c-scanner.o Prépare-titan/c-scanner.c
|
||||
In file included from Prépare-titan/c-scanner.c:547:
|
||||
Prépare-titan/c-parser.h:1: warning: garbage at end of `#ifndef' argument
|
||||
Prépare-titan/c-parser.h:2: warning: missing white space after `#define BISON_PR'
|
||||
/usr/bin/gcc -o Prépare-titan/ctools.so Prépare-titan/ctools.o Prépare-titan/c-scanner.o -shared -lm
|
||||
python setup.py --quiet build
|
||||
install -g bpi -m 664 Prépare-titan/ctools.so /bpi/titan/local/lib/python2.2/site-packages/Pyrexpp
|
||||
python setup.py --quiet install
|
||||
make[1]: Quitte le répertoire `/bpi/titan/home/pinard/fpub/pyrexpp'
|
||||
[...]
|
||||
----------------------------------------------------------------------<
|
||||
|
||||
Diagnostics que je n'avais sûrement pas, plus tôt en journée, sur l'autre
|
||||
système. En allant voir, je trouve:
|
||||
|
||||
---------------------------------------------------------------------->
|
||||
#ifndef BISON_PRÉPARE_TITAN_C_PARSER_H
|
||||
# define BISON_PRÉPARE_TITAN_C_PARSER_H
|
||||
|
||||
# ifndef YYSTYPE
|
||||
# define YYSTYPE int
|
||||
# endif
|
||||
# define IDENTIFIER 257
|
||||
[...]
|
||||
|
||||
extern YYSTYPE yylval;
|
||||
|
||||
#endif /* not BISON_PRÉPARE_TITAN_C_PARSER_H */
|
||||
----------------------------------------------------------------------<
|
||||
|
||||
Le pré-processeur de C n'est pas à l'aise avec les caractères accentués
|
||||
dans les identificateurs.
|
||||
|
||||
Bon, de mon expérience, il n'a jamais été nécessaire de protéger un fichier
|
||||
`.h' de Bison ou Yacc contre de multiples inclusions, mais si ça été
|
||||
fait, je présume qu'il y avait un problème réel et convaincant à régler,
|
||||
et qu'il ne s'agit pas d'une simple fantaisie: je ne mettrai donc pas
|
||||
ça en doute. Mais le choix du nom de l'identificateur laisse à désirer,
|
||||
tu en conviendras :-). Et faut-il vraiment y inclure le répertoire?
|
||||
From Franc,ois: should we keep the directory part in the CPP guard?
|
||||
|
||||
|
||||
* URGENT: Documenting C++ output
|
||||
@@ -88,6 +33,10 @@ check if %union is used, since the user is free to $<foo>n on her
|
||||
union, doesn't she?
|
||||
|
||||
|
||||
* GLR & C++
|
||||
Currently, the GLR parser cannot compile with a C++ compiler.
|
||||
|
||||
|
||||
* Report
|
||||
|
||||
** GLR
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.49a
|
||||
1.49c
|
||||
|
||||
+34
-29
@@ -20,34 +20,19 @@
|
||||
# We need a recent Autoconf to run a recent Autotest.
|
||||
AC_PREREQ(2.54)
|
||||
|
||||
AC_INIT([GNU Bison], [1.49c], [[email protected]])
|
||||
AC_INIT([GNU Bison], [1.75], [[email protected]])
|
||||
AC_CONFIG_AUX_DIR(config)
|
||||
|
||||
AM_INIT_AUTOMAKE([1.7 check-news readme-alpha dist-bzip2])
|
||||
AM_CONFIG_HEADER(config.h:config.hin)
|
||||
AC_CONFIG_HEADERS([config.h:config.hin])
|
||||
|
||||
# Initialize the test suite.
|
||||
AC_CONFIG_TESTDIR(tests)
|
||||
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.
|
||||
# Checks for the compiler.
|
||||
AC_PROG_CC
|
||||
AM_PROG_LEX
|
||||
AC_PROG_YACC
|
||||
AC_MINIX
|
||||
# Remove with Automake 1.8.
|
||||
AC_ISC_POSIX
|
||||
AC_GNU_SOURCE
|
||||
AC_MINIX
|
||||
AM_PROG_CC_STDC
|
||||
AC_PROG_RANLIB
|
||||
AM_MISSING_PROG([AUTOM4TE], [autom4te])
|
||||
BISON_PROG_GNU_M4
|
||||
if test x"$ac_cv_prog_gnu_m4" != xyes; then
|
||||
AC_MSG_ERROR([GNU M4 1.4 is required])
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the GNU M4 executable name.])
|
||||
|
||||
AC_ARG_ENABLE(gcc-warnings,
|
||||
[ --enable-gcc-warnings turn on lots of GCC warnings (not recommended)],
|
||||
[case "${enableval}" in
|
||||
@@ -73,8 +58,15 @@ if test "${enableval}" = yes; then
|
||||
BISON_WARNING(-Wwrite-strings)
|
||||
fi
|
||||
|
||||
# Checks for libraries.
|
||||
AC_DEFINE([_GNU_SOURCE],1,[Define to 1 for GNU C library extensions.])
|
||||
# Checks for programs.
|
||||
AM_PROG_LEX
|
||||
AC_PROG_YACC
|
||||
AC_PROG_RANLIB
|
||||
BISON_PROG_GNU_M4
|
||||
if test x"$ac_cv_prog_gnu_m4" != xyes; then
|
||||
AC_MSG_ERROR([GNU M4 1.4 is required])
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the GNU M4 executable name.])
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
@@ -110,9 +102,22 @@ BISON_PREREQ_TIMEVAR
|
||||
AM_GNU_GETTEXT(external, need-ngettext)
|
||||
AM_GNU_GETTEXT_VERSION(0.11.5)
|
||||
|
||||
AC_OUTPUT([Makefile
|
||||
config/Makefile
|
||||
po/Makefile.in
|
||||
data/Makefile
|
||||
lib/Makefile src/Makefile doc/Makefile
|
||||
m4/Makefile])
|
||||
# Initialize the test suite.
|
||||
AC_CONFIG_TESTDIR(tests)
|
||||
AC_CONFIG_FILES([tests/Makefile tests/atlocal])
|
||||
AC_CONFIG_FILES([tests/bison], [chmod +x tests/bison])
|
||||
AC_CHECK_PROGS([VALGRIND], [valgrind])
|
||||
AC_CHECK_PROGS([GXX], [g++])
|
||||
AM_MISSING_PROG([AUTOM4TE], [autom4te])
|
||||
# Needed by tests/atlocal.in.
|
||||
AC_SUBST([GCC])
|
||||
O0CFLAGS=`echo $CFLAGS | sed 's/-O[0-9] *//'`
|
||||
AC_SUBST([O0CFLAGS])
|
||||
|
||||
AC_CONFIG_FILES([Makefile
|
||||
config/Makefile
|
||||
po/Makefile.in
|
||||
data/Makefile
|
||||
lib/Makefile src/Makefile doc/Makefile
|
||||
m4/Makefile])
|
||||
AC_OUTPUT
|
||||
|
||||
@@ -65,7 +65,7 @@ m4_define([b4_ints_in],
|
||||
# MIN to MAX (included).
|
||||
m4_define([b4_int_type],
|
||||
[m4_if(b4_ints_in($@, [0], [255]), [1], [unsigned char],
|
||||
b4_ints_in($@, [-128], [128]), [1], [signed char],
|
||||
b4_ints_in($@, [-128], [127]), [1], [yysigned_char],
|
||||
|
||||
b4_ints_in($@, [0], [65535]), [1], [unsigned short],
|
||||
b4_ints_in($@, [-32768], [32767]), [1], [short],
|
||||
@@ -108,7 +108,7 @@ m4_define([b4_token_defines],
|
||||
[m4_if([$@], [[]], [],
|
||||
[/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# if defined (__STDC__) || defined (__cplusplus)
|
||||
# define YYTOKENTYPE
|
||||
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
||||
know about them. */
|
||||
enum yytokentype {
|
||||
@@ -116,10 +116,7 @@ m4_map_sep([ b4_token_enum], [,
|
||||
],
|
||||
[$@])
|
||||
};
|
||||
# endif
|
||||
/* POSIX requires `int' for tokens in interfaces. */
|
||||
# define YYTOKENTYPE int
|
||||
#endif /* !YYTOKENTYPE */
|
||||
#endif
|
||||
m4_map([b4_token_define], [$@])
|
||||
])
|
||||
])
|
||||
|
||||
+94
-61
@@ -136,10 +136,10 @@ b4_copyright([Skeleton parser for GLR parsing with Bison], [2002])
|
||||
#define yynerrs b4_prefix[]nerrs
|
||||
b4_location_if([#define yylloc b4_prefix[]lloc])])
|
||||
|
||||
/* Copy the first part of user declarations. */
|
||||
b4_pre_prologue
|
||||
b4_token_defines(b4_tokens)
|
||||
|
||||
b4_token_defines(b4_tokens)[
|
||||
/* Copy the first part of user declarations. */
|
||||
b4_pre_prologue[
|
||||
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
@@ -169,10 +169,10 @@ typedef union b4_stype yystype;
|
||||
typedef struct yyltype
|
||||
{
|
||||
]b4_location_if([
|
||||
int yyfirst_line;
|
||||
int yyfirst_column;
|
||||
int yylast_line;
|
||||
int yylast_column;])[
|
||||
int first_line;
|
||||
int first_column;
|
||||
int last_line;
|
||||
int last_column;])[
|
||||
} yyltype;
|
||||
# define YYLTYPE ]b4_ltype[
|
||||
# define YYLTYPE_IS_TRIVIAL 1
|
||||
@@ -198,6 +198,12 @@ static YYLTYPE yyloc_default;
|
||||
# define yyfalse 0
|
||||
#endif
|
||||
|
||||
#if defined (__STDC__) || defined (__cplusplus)
|
||||
typedef signed char yysigned_char;
|
||||
#else
|
||||
typedef short yysigned_char;
|
||||
#endif
|
||||
|
||||
/*-----------------.
|
||||
| GCC extensions. |
|
||||
`-----------------*/
|
||||
@@ -220,7 +226,6 @@ static YYLTYPE yyloc_default;
|
||||
|
||||
/* YYFINAL -- State number of the termination state. */
|
||||
#define YYFINAL ]b4_final_state_number[
|
||||
#define YYFLAG ]b4_flag[
|
||||
#define YYLAST ]b4_last[
|
||||
|
||||
/* YYNTOKENS -- Number of terminals. */
|
||||
@@ -333,24 +338,25 @@ static const ]b4_int_type_for([b4_pgoto])[ yypgoto[] =
|
||||
|
||||
/* 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. */
|
||||
number is the opposite. If zero, do what YYDEFACT says.
|
||||
If YYTABLE_NINF, parse error. */
|
||||
#define YYTABLE_NINF ]b4_table_ninf[
|
||||
static const ]b4_int_type_for([b4_table])[ yytable[] =
|
||||
{
|
||||
]b4_table[
|
||||
};
|
||||
|
||||
/* YYCONFLP[YYPACT[STATE-NUM]] -- pointer into yyconfl of start of list
|
||||
of conflicting reductions corresponding to action entry for state
|
||||
STATE-NUM in yytable. 0 means no conflicts. The list in yyconfl
|
||||
is terminated by a rule number of 0. */
|
||||
/* YYCONFLP[YYPACT[STATE-NUM]] -- Pointer into YYCONFL of start of
|
||||
list of conflicting reductions corresponding to action entry for
|
||||
state STATE-NUM in yytable. 0 means no conflicts. The list in
|
||||
yyconfl is terminated by a rule number of 0. */
|
||||
static const ]b4_int_type_for([b4_conflict_list_heads])[ yyconflp[] =
|
||||
{
|
||||
]b4_conflict_list_heads[
|
||||
};
|
||||
|
||||
/* YYCONFL[I] -- lists of conflicting rule numbers, each terminated
|
||||
by 0, pointed into by YYCONFLP. */
|
||||
/* YYCONFL[I] -- lists of conflicting rule numbers, each terminated by
|
||||
0, pointed into by YYCONFLP. */
|
||||
]dnl Do not use b4_int_type_for here, since there are places where
|
||||
dnl pointers onto yyconfl are taken, which type is "short *".
|
||||
dnl We probably ought to introduce a type for confl.
|
||||
@@ -396,10 +402,10 @@ int yyparse (void);
|
||||
|
||||
#ifndef YYLLOC_DEFAULT
|
||||
# define YYLLOC_DEFAULT(yyCurrent, yyRhs, YYN) \
|
||||
yyCurrent.yyfirst_line = YYRHSLOC(yyRhs,1).yyfirst_line; \
|
||||
yyCurrent.yyfirst_column = YYRHSLOC(yyRhs,1).yyfirst_column; \
|
||||
yyCurrent.yylast_line = YYRHSLOC(yyRhs,YYN).yylast_line; \
|
||||
yyCurrent.yylast_column = YYRHSLOC(yyRhs,YYN).yylast_column;
|
||||
yyCurrent.first_line = YYRHSLOC(yyRhs,1).first_line; \
|
||||
yyCurrent.first_column = YYRHSLOC(yyRhs,1).first_column; \
|
||||
yyCurrent.last_line = YYRHSLOC(yyRhs,YYN).last_line; \
|
||||
yyCurrent.last_column = YYRHSLOC(yyRhs,YYN).last_column;
|
||||
#endif
|
||||
|
||||
/* YYLEX -- calling `yylex' with the right arguments. */
|
||||
@@ -692,7 +698,7 @@ yydefaultAction (yyStateNum yystate)
|
||||
return yydefact[yystate];
|
||||
}
|
||||
|
||||
/** Set *ACTION to the action to take in STATE on seeing TOKEN.
|
||||
/** Set *YYACTION to the action to take in YYSTATE on seeing YYTOKEN.
|
||||
* Result R means
|
||||
* R < 0: Reduce on rule -R.
|
||||
* R = 0: Error.
|
||||
@@ -705,16 +711,21 @@ yygetLRActions (yyStateNum yystate, int yytoken,
|
||||
int* yyaction, const short** yyconflicts)
|
||||
{
|
||||
int yyindex = yypact[yystate] + yytoken;
|
||||
if (yyindex < 0 || yyindex > YYLAST || yycheck[yyindex] != yytoken)
|
||||
if (yyindex < 0 || YYLAST < yyindex || yycheck[yyindex] != yytoken)
|
||||
{
|
||||
*yyaction = -yydefact[yystate];
|
||||
*yyconflicts = yyconfl;
|
||||
}
|
||||
else
|
||||
else if (yytable[yyindex] != YYTABLE_NINF)
|
||||
{
|
||||
*yyaction = yytable[yyindex];
|
||||
*yyconflicts = yyconfl + yyconflp[yyindex];
|
||||
}
|
||||
else
|
||||
{
|
||||
*yyaction = 0;
|
||||
*yyconflicts = yyconfl + yyconflp[yyindex];
|
||||
}
|
||||
}
|
||||
|
||||
static inline yyStateNum
|
||||
@@ -722,7 +733,7 @@ yyLRgotoState (yyStateNum yystate, yySymbol yylhs)
|
||||
{
|
||||
int yyr;
|
||||
yyr = yypgoto[yylhs - YYNTOKENS] + yystate;
|
||||
if (yyr >= 0 && yyr <= YYLAST && yycheck[yyr] == yystate)
|
||||
if (0 <= yyr && yyr <= YYLAST && yycheck[yyr] == yystate)
|
||||
return yytable[yyr];
|
||||
else
|
||||
return yydefgoto[yylhs - YYNTOKENS];
|
||||
@@ -737,7 +748,7 @@ yyisShiftAction (int yyaction)
|
||||
static inline bool
|
||||
yyisErrorAction (int yyaction)
|
||||
{
|
||||
return yyaction == 0 || yyaction == YYPACT_NINF;
|
||||
return yyaction == 0;
|
||||
}
|
||||
|
||||
/* GLRStates */
|
||||
@@ -752,14 +763,14 @@ yyhasResolvedValue (yyGLRState* yystate)
|
||||
|
||||
static void
|
||||
yyaddDeferredAction (yyGLRStack* yystack, yyGLRState* yystate,
|
||||
yyGLRState* yyrhs, yyRuleNum yyrule)
|
||||
yyGLRState* rhs, yyRuleNum yyrule)
|
||||
{
|
||||
yySemanticOption* yynewItem;
|
||||
yynewItem = &yystack->yynextFree->yyoption;
|
||||
yystack->yyspaceLeft -= 1;
|
||||
yystack->yynextFree += 1;
|
||||
yynewItem->yyisState = yyfalse;
|
||||
yynewItem->yystate = yyrhs;
|
||||
yynewItem->yystate = rhs;
|
||||
yynewItem->yyrule = yyrule;
|
||||
yynewItem->yynext = yystate->yysemantics.yyfirstVal;
|
||||
yystate->yysemantics.yyfirstVal = yynewItem;
|
||||
@@ -962,7 +973,7 @@ yyglrShift (yyGLRStack* yystack, int yyk, yyStateNum yylrState, size_t yyposn,
|
||||
* the (unresolved) semantic value of RHS under the action for RULE. */
|
||||
static inline void
|
||||
yyglrShiftDefer (yyGLRStack* yystack, int yyk, yyStateNum yylrState,
|
||||
size_t yyposn, yyGLRState* yyrhs, yyRuleNum yyrule)
|
||||
size_t yyposn, yyGLRState* rhs, yyRuleNum yyrule)
|
||||
{
|
||||
yyGLRStackItem* yynewItem;
|
||||
|
||||
@@ -976,7 +987,7 @@ yyglrShiftDefer (yyGLRStack* yystack, int yyk, yyStateNum yylrState,
|
||||
yystack->yytops.yystates[yyk] = &yynewItem->yystate;
|
||||
yystack->yynextFree += 1;
|
||||
yystack->yyspaceLeft -= 1;
|
||||
yyaddDeferredAction (yystack, &yynewItem->yystate, yyrhs, yyrule);
|
||||
yyaddDeferredAction (yystack, &yynewItem->yystate, rhs, yyrule);
|
||||
}
|
||||
|
||||
/** Pop the symbols consumed by reduction #RULE from the top of stack
|
||||
@@ -994,7 +1005,7 @@ yydoAction (yyGLRStack* yystack, int yyk, yyRuleNum yyrule,
|
||||
if (yystack->yysplitPoint == NULL)
|
||||
{
|
||||
/* Standard special case: single stack. */
|
||||
yyGLRStackItem* yyrhs = (yyGLRStackItem*) yystack->yytops.yystates[yyk];
|
||||
yyGLRStackItem* rhs = (yyGLRStackItem*) yystack->yytops.yystates[yyk];
|
||||
assert (yyk == 0);
|
||||
yystack->yynextFree -= yynrhs;
|
||||
yystack->yyspaceLeft += yynrhs;
|
||||
@@ -1006,10 +1017,10 @@ yydoAction (yyGLRStack* yystack, int yyk, yyRuleNum yyrule,
|
||||
}
|
||||
else
|
||||
{
|
||||
*yyvalp = yyrhs[1-yynrhs].yystate.yysemantics.yysval;
|
||||
*yylocp = yyrhs[1-yynrhs].yystate.yyloc;
|
||||
*yyvalp = rhs[1-yynrhs].yystate.yysemantics.yysval;
|
||||
*yylocp = rhs[1-yynrhs].yystate.yyloc;
|
||||
}
|
||||
return yyuserAction (yyrule, yynrhs, yyrhs, yyvalp, yylocp, yystack);
|
||||
return yyuserAction (yyrule, yynrhs, rhs, yyvalp, yylocp, yystack);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1063,13 +1074,25 @@ yyglrReduce (yyGLRStack* yystack, size_t yyk, yyRuleNum yyrule,
|
||||
YYSTYPE yysval;
|
||||
YYLTYPE yyloc;
|
||||
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
{
|
||||
int yyi;
|
||||
YYDPRINTF ((stderr, "Reducing stack %d by rule %d (line %d),",
|
||||
yyk, yyrule - 1, yyrline[yyrule]));
|
||||
/* Print the symbols being reduced, and their result. */
|
||||
for (yyi = yyprhs[yyrule]; yyrhs[yyi] >= 0; yyi++)
|
||||
YYFPRINTF (stderr, "%s ", yytokenName (yyrhs[yyi]));
|
||||
YYFPRINTF (stderr, " -> %s\n", yytokenName (yyr1[yyrule]));
|
||||
}
|
||||
#endif
|
||||
YYCHK (yydoAction (yystack, yyk, yyrule, &yysval, &yyloc));
|
||||
yyglrShift (yystack, yyk,
|
||||
yyLRgotoState (yystack->yytops.yystates[yyk]->yylrState,
|
||||
yylhsNonterm (yyrule)),
|
||||
yyposn, yysval, &yyloc);
|
||||
YYDPRINTF ((stderr, "Reduced stack %d by rule #%d. Now in state %d.\n",
|
||||
yyk, yyrule-1, yystack->yytops.yystates[yyk]->yylrState));
|
||||
YYDPRINTF ((stderr, "Stack %d entering state %d\n",
|
||||
yyk, yystack->yytops.yystates[yyk]->yylrState));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1256,7 +1279,16 @@ yyresolveAction (yySemanticOption* yyopt, yyGLRStack* yystack,
|
||||
}
|
||||
|
||||
#if YYDEBUG
|
||||
static yyGLRState YYLEFTMOST_STATE = { 0, NULL, -1, 0, { NULL } };
|
||||
static yyGLRState YYLEFTMOST_STATE =
|
||||
{
|
||||
0, 0, -1, NULL, 0, { NULL },
|
||||
/* yyloc. */
|
||||
{
|
||||
#if YYLTYPE_IS_TRIVIAL
|
||||
]b4_location_if([ 0, 0, 0, 0])[
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
static void yyreportTree (yySemanticOption* yyx, int yyindent)
|
||||
{
|
||||
@@ -1448,9 +1480,11 @@ yyprocessOneStack (yyGLRStack* yystack, int yyk,
|
||||
{
|
||||
if (*yytokenp == YYEMPTY)
|
||||
{
|
||||
YYDPRINTF ((stderr, "Reading a token: "));
|
||||
yychar = YYLEX;
|
||||
*yytokenp = YYTRANSLATE(yychar);
|
||||
YYDPRINTF ((stderr, "Read token %s\n", yytokenName (*yytokenp)));
|
||||
YYDPRINTF ((stderr, "Next token is %s\n",
|
||||
yytokenName (*yytokenp)));
|
||||
}
|
||||
yygetLRActions (yystate, *yytokenp, &yyaction, &yyconflicts);
|
||||
|
||||
@@ -1467,7 +1501,7 @@ yyprocessOneStack (yyGLRStack* yystack, int yyk,
|
||||
|
||||
if (yyisShiftAction (yyaction))
|
||||
{
|
||||
YYDPRINTF ((stderr, "Shifted token %s on stack %d, ",
|
||||
YYDPRINTF ((stderr, "Shifting token %s on stack %d, ",
|
||||
yytokenName (*yytokenp), yyk));
|
||||
yyglrShift (yystack, yyk, yyaction, yyposn+1, *yylvalp, yyllocp);
|
||||
YYDPRINTF ((stderr, "which is now in state #%d\n",
|
||||
@@ -1524,7 +1558,7 @@ yyreportParseError (yyGLRStack* yystack, YYSTYPE* yylvalp, YYLTYPE* yyllocp)
|
||||
{
|
||||
yyprefix = ", expecting ";
|
||||
for (yyx = yyn < 0 ? -yyn : 0; yyx < yytname_size; yyx += 1)
|
||||
if (yycheck[yyx + yyn] == yyx)
|
||||
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
||||
{
|
||||
yyp += sprintf (yyp, "%s%s", yyprefix, yytokenName (yyx));
|
||||
yyprefix = " or ";
|
||||
@@ -1540,13 +1574,9 @@ yyreportParseError (yyGLRStack* yystack, YYSTYPE* yylvalp, YYLTYPE* yyllocp)
|
||||
}
|
||||
}
|
||||
|
||||
/* Recover from a syntax error on STACK, assuming that TOKENP,
|
||||
/* Recover from a syntax error on YYSTACK, assuming that YYTOKENP,
|
||||
YYLVALP, and YYLLOCP point to the syntactic category, semantic
|
||||
value, and location of the lookahead.
|
||||
NOTE: This uses the panic-mode recovery algorithm described in the
|
||||
Bison documentation, which differs from what is in bison.simple.
|
||||
Specifically, this routine performs no reductions before shifting
|
||||
the error token. */
|
||||
value, and location of the lookahead. */
|
||||
static void
|
||||
yyrecoverParseError (yyGLRStack* yystack, YYSTYPE* yylvalp, YYLTYPE* yyllocp)
|
||||
{
|
||||
@@ -1557,34 +1587,34 @@ yyrecoverParseError (yyGLRStack* yystack, YYSTYPE* yylvalp, YYLTYPE* yyllocp)
|
||||
if (yystack->yyerrState == 0)
|
||||
yystack->yyerrState = 3;
|
||||
else if (yystack->yyerrState == 3)
|
||||
{
|
||||
/* We just shifted the error token and (perhaps) took some
|
||||
reductions. Skip tokens until we can proceed. */
|
||||
do {
|
||||
/* We just shifted the error token and (perhaps) took some
|
||||
reductions. Skip tokens until we can proceed. */
|
||||
while (yytrue)
|
||||
{
|
||||
if (*yytokenp == YYEOF)
|
||||
yyFail (yystack, NULL);
|
||||
if (*yytokenp != YYEMPTY)
|
||||
YYDPRINTF ((stderr, "Discarding token %s\n",
|
||||
yytokenName (*yytokenp)));
|
||||
YYDPRINTF ((stderr, "Reading a token: "));
|
||||
yychar = YYLEX;
|
||||
*yytokenp = YYTRANSLATE (yychar);
|
||||
YYDPRINTF ((stderr, "Read token %s\n", yytokenName (*yytokenp)));
|
||||
YYDPRINTF ((stderr, "Next token is %s\n", yytokenName (*yytokenp)));
|
||||
yyj = yypact[yystack->yytops.yystates[0]->yylrState];
|
||||
if (yyj == YYPACT_NINF)
|
||||
/* Something's not right; we shouldn't be here */
|
||||
/* Something's not right; we shouldn't be here. */
|
||||
yyFail (yystack, NULL);
|
||||
yyj += *yytokenp;
|
||||
if (yyj < 0 || yyj > YYLAST || yycheck[yyj] != *yytokenp)
|
||||
if (yyj < 0 || YYLAST < yyj || yycheck[yyj] != *yytokenp)
|
||||
{
|
||||
if (yydefact[yystack->yytops.yystates[0]->yylrState] != 0)
|
||||
return;
|
||||
}
|
||||
else if (yytable[yyj] != 0 && yytable[yyj] != YYTABLE_NINF)
|
||||
return;
|
||||
} while (yytrue);
|
||||
}
|
||||
}
|
||||
|
||||
/* Reduce to one stack */
|
||||
/* Reduce to one stack. */
|
||||
for (yyk = 0; yyk < yystack->yytops.yysize; yyk += 1)
|
||||
if (yystack->yytops.yystates[yyk] != NULL)
|
||||
break;
|
||||
@@ -1650,6 +1680,8 @@ yyparse (YYPARSE_PARAM_ARG)
|
||||
yyinitGLRStack (&yystack, YYINITDEPTH);
|
||||
yystack.yytokenp = &yytoken;
|
||||
|
||||
YYDPRINTF ((stderr, "Starting parse\n"));
|
||||
|
||||
if (setjmp (yystack.yyexception_buffer) != 0)
|
||||
goto yyDone;
|
||||
|
||||
@@ -1687,9 +1719,10 @@ yyparse (YYPARSE_PARAM_ARG)
|
||||
{
|
||||
if (yytoken == YYEMPTY)
|
||||
{
|
||||
YYDPRINTF ((stderr, "Reading a token: "));
|
||||
yychar = YYLEX;
|
||||
yytoken = YYTRANSLATE (yychar);
|
||||
YYDPRINTF ((stderr, "Read token %s\n",
|
||||
YYDPRINTF ((stderr, "Next token is %s\n",
|
||||
yytokenName (yytoken)));
|
||||
}
|
||||
yygetLRActions (yystate, yytoken, &yyaction, &yyconflicts);
|
||||
@@ -1697,7 +1730,7 @@ yyparse (YYPARSE_PARAM_ARG)
|
||||
break;
|
||||
if (yyisShiftAction (yyaction))
|
||||
{
|
||||
YYDPRINTF ((stderr, "Shifted token %s. ",
|
||||
YYDPRINTF ((stderr, "Shifting token %s, ",
|
||||
yytokenName (yytoken)));
|
||||
if (yytoken != YYEOF)
|
||||
yytoken = YYEMPTY;
|
||||
@@ -1705,7 +1738,7 @@ yyparse (YYPARSE_PARAM_ARG)
|
||||
yyglrShift (&yystack, 0, yyaction, yyposn, yylval, yyllocp);
|
||||
if (yystack.yyerrState > 0)
|
||||
yystack.yyerrState -= 1;
|
||||
YYDPRINTF ((stderr, "Now in state #%d\n",
|
||||
YYDPRINTF ((stderr, "Entering state %d\n",
|
||||
yystack.yytops.yystates[0]->yylrState));
|
||||
}
|
||||
else if (yyisErrorAction (yyaction))
|
||||
@@ -1855,10 +1888,10 @@ b4_location_if(
|
||||
[#ifndef YYLTYPE
|
||||
typedef struct yyltype
|
||||
{
|
||||
int yyfirst_line;
|
||||
int yyfirst_column;
|
||||
int yylast_line;
|
||||
int yylast_column;
|
||||
int first_line;
|
||||
int first_column;
|
||||
int last_line;
|
||||
int last_column;
|
||||
} yyltype;
|
||||
# define YYLTYPE yyltype
|
||||
#endif
|
||||
|
||||
+2
-3
@@ -104,15 +104,14 @@ b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison],
|
||||
/* Using locations. */
|
||||
#define YYLSP_NEEDED b4_locations_flag
|
||||
|
||||
b4_token_defines(b4_tokens)
|
||||
|
||||
/* Copy the first part of user declarations. */
|
||||
b4_pre_prologue
|
||||
|
||||
/* Line __line__ of __file__. */
|
||||
#line __oline__ "__ofile__"
|
||||
|
||||
/* Tokens. */
|
||||
b4_token_defines(b4_tokens)
|
||||
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG b4_debug
|
||||
|
||||
+62
-85
@@ -166,11 +166,11 @@ m4_if(b4_prefix[], [yy], [],
|
||||
#define yynerrs b4_prefix[]nerrs
|
||||
b4_location_if([#define yylloc b4_prefix[]lloc])])
|
||||
|
||||
b4_token_defines(b4_tokens)
|
||||
|
||||
/* Copy the first part of user declarations. */
|
||||
b4_pre_prologue
|
||||
|
||||
b4_token_defines(b4_tokens)
|
||||
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG b4_debug
|
||||
@@ -307,6 +307,12 @@ b4_location_if(
|
||||
|
||||
#endif
|
||||
|
||||
#if defined (__STDC__) || defined (__cplusplus)
|
||||
typedef signed char yysigned_char;
|
||||
#else
|
||||
typedef short yysigned_char;
|
||||
#endif
|
||||
|
||||
/* YYFINAL -- State number of the termination state. */
|
||||
#define YYFINAL b4_final_state_number
|
||||
#define YYLAST b4_last
|
||||
@@ -414,7 +420,8 @@ static const b4_int_type_for([b4_pgoto]) yypgoto[[]] =
|
||||
|
||||
/* 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. */
|
||||
number is the opposite. If zero, do what YYDEFACT says.
|
||||
If YYTABLE_NINF, parse error. */
|
||||
#define YYTABLE_NINF b4_table_ninf
|
||||
static const b4_int_type_for([b4_table]) yytable[[]] =
|
||||
{
|
||||
@@ -648,74 +655,6 @@ m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl
|
||||
#endif /* YYDEBUG. */
|
||||
|
||||
|
||||
/*----------------------------------------------------------.
|
||||
| yyreport_parse_error -- report a parse error in YYSTATE. |
|
||||
`----------------------------------------------------------*/
|
||||
|
||||
b4_c_function([yyreport_parse_error],
|
||||
[static void],
|
||||
[[int], [yystate]],
|
||||
[[int], [yychar]],
|
||||
[[YYSTYPE], [yyvalue]]b4_location_if([,
|
||||
[[YYLTYPE], [yylloc]]]))
|
||||
[{
|
||||
#if YYERROR_VERBOSE
|
||||
int yyn = yypact[yystate];
|
||||
|
||||
if (YYPACT_NINF < yyn && yyn < YYLAST)
|
||||
{
|
||||
YYSIZE_T yysize = 0;
|
||||
int yytype = YYTRANSLATE (yychar);
|
||||
char *yymsg;
|
||||
int yyx, yycount;
|
||||
|
||||
yycount = 0;
|
||||
/* Start YYX at -YYN if negative to avoid negative indexes in
|
||||
YYCHECK. */
|
||||
for (yyx = yyn < 0 ? -yyn : 0;
|
||||
yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
|
||||
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
||||
yysize += yystrlen (yytname[yyx]) + 15, yycount++;
|
||||
yysize += yystrlen ("parse error, unexpected ") + 1;
|
||||
yysize += yystrlen (yytname[yytype]);
|
||||
yymsg = (char *) YYSTACK_ALLOC (yysize);
|
||||
if (yymsg != 0)
|
||||
{
|
||||
char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
|
||||
yyp = yystpcpy (yyp, yytname[yytype]);
|
||||
|
||||
if (yycount < 5)
|
||||
{
|
||||
yycount = 0;
|
||||
for (yyx = yyn < 0 ? -yyn : 0;
|
||||
yyx < (int) (sizeof (yytname) / sizeof (char *));
|
||||
yyx++)
|
||||
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
||||
{
|
||||
const char *yyq = ! yycount ? ", expecting " : " or ";
|
||||
yyp = yystpcpy (yyp, yyq);
|
||||
yyp = yystpcpy (yyp, yytname[yyx]);
|
||||
yycount++;
|
||||
}
|
||||
}
|
||||
yyerror (yymsg);
|
||||
YYSTACK_FREE (yymsg);
|
||||
}
|
||||
else
|
||||
yyerror ("parse error; also virtual memory exhausted");
|
||||
}
|
||||
else
|
||||
#endif /* YYERROR_VERBOSE */
|
||||
yyerror ("parse error");
|
||||
|
||||
/* Pacify ``unused variable'' warnings. */
|
||||
(void) yystate;
|
||||
(void) yychar;
|
||||
(void) yyvalue;
|
||||
]b4_location_if([(void) yylloc;])[
|
||||
}]
|
||||
|
||||
|
||||
/*-----------------------------------------------.
|
||||
| Release the memory associated to this symbol. |
|
||||
`-----------------------------------------------*/
|
||||
@@ -985,28 +924,19 @@ yybackup:
|
||||
YYDPRINTF ((stderr, "\n"));
|
||||
}
|
||||
|
||||
/* If the proper action on seeing token YYCHAR1 is to reduce or to
|
||||
detect an error, take that action. */
|
||||
yyn += yychar1;
|
||||
if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yychar1)
|
||||
goto yydefault;
|
||||
|
||||
yyn = yytable[yyn];
|
||||
|
||||
/* yyn is what to do for this token type in this state.
|
||||
Negative => reduce, -yyn is rule number.
|
||||
Positive => shift, yyn is new state.
|
||||
New state is final state => don't bother to shift,
|
||||
just return success.
|
||||
0, or most negative number => error. */
|
||||
|
||||
if (yyn < 0)
|
||||
if (yyn <= 0)
|
||||
{
|
||||
if (yyn == YYTABLE_NINF)
|
||||
if (yyn == 0 || yyn == YYTABLE_NINF)
|
||||
goto yyerrlab;
|
||||
yyn = -yyn;
|
||||
goto yyreduce;
|
||||
}
|
||||
else if (yyn == 0)
|
||||
goto yyerrlab;
|
||||
|
||||
if (yyn == YYFINAL)
|
||||
YYACCEPT;
|
||||
@@ -1127,7 +1057,54 @@ yyerrlab:
|
||||
if (!yyerrstatus)
|
||||
{
|
||||
++yynerrs;
|
||||
yyreport_parse_error (yystate, yychar, yylval]b4_location_if([, yylloc])[);
|
||||
#if YYERROR_VERBOSE
|
||||
yyn = yypact[yystate];
|
||||
|
||||
if (YYPACT_NINF < yyn && yyn < YYLAST)
|
||||
{
|
||||
YYSIZE_T yysize = 0;
|
||||
int yytype = YYTRANSLATE (yychar);
|
||||
char *yymsg;
|
||||
int yyx, yycount;
|
||||
|
||||
yycount = 0;
|
||||
/* Start YYX at -YYN if negative to avoid negative indexes in
|
||||
YYCHECK. */
|
||||
for (yyx = yyn < 0 ? -yyn : 0;
|
||||
yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
|
||||
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
||||
yysize += yystrlen (yytname[yyx]) + 15, yycount++;
|
||||
yysize += yystrlen ("parse error, unexpected ") + 1;
|
||||
yysize += yystrlen (yytname[yytype]);
|
||||
yymsg = (char *) YYSTACK_ALLOC (yysize);
|
||||
if (yymsg != 0)
|
||||
{
|
||||
char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
|
||||
yyp = yystpcpy (yyp, yytname[yytype]);
|
||||
|
||||
if (yycount < 5)
|
||||
{
|
||||
yycount = 0;
|
||||
for (yyx = yyn < 0 ? -yyn : 0;
|
||||
yyx < (int) (sizeof (yytname) / sizeof (char *));
|
||||
yyx++)
|
||||
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
||||
{
|
||||
const char *yyq = ! yycount ? ", expecting " : " or ";
|
||||
yyp = yystpcpy (yyp, yyq);
|
||||
yyp = yystpcpy (yyp, yytname[yyx]);
|
||||
yycount++;
|
||||
}
|
||||
}
|
||||
yyerror (yymsg);
|
||||
YYSTACK_FREE (yymsg);
|
||||
}
|
||||
else
|
||||
yyerror ("parse error; also virtual memory exhausted");
|
||||
}
|
||||
else
|
||||
#endif /* YYERROR_VERBOSE */
|
||||
yyerror ("parse error");
|
||||
}
|
||||
goto yyerrlab1;
|
||||
|
||||
|
||||
+112
-99
@@ -806,25 +806,25 @@ as both an @code{expr} and a @code{decl}, and print
|
||||
@cindex position, textual
|
||||
|
||||
Many applications, like interpreters or compilers, have to produce verbose
|
||||
and useful error messages. To achieve this, one must be able to keep track of
|
||||
and useful error messages. To achieve this, one must be able to keep track of
|
||||
the @dfn{textual position}, or @dfn{location}, of each syntactic construct.
|
||||
Bison provides a mechanism for handling these locations.
|
||||
|
||||
Each token has a semantic value. In a similar fashion, each token has an
|
||||
Each token has a semantic value. In a similar fashion, each token has an
|
||||
associated location, but the type of locations is the same for all tokens and
|
||||
groupings. Moreover, the output parser is equipped with a default data
|
||||
groupings. Moreover, the output parser is equipped with a default data
|
||||
structure for storing locations (@pxref{Locations}, for more details).
|
||||
|
||||
Like semantic values, locations can be reached in actions using a dedicated
|
||||
set of constructs. In the example above, the location of the whole grouping
|
||||
set of constructs. In the example above, the location of the whole grouping
|
||||
is @code{@@$}, while the locations of the subexpressions are @code{@@1} and
|
||||
@code{@@3}.
|
||||
|
||||
When a rule is matched, a default action is used to compute the semantic value
|
||||
of its left hand side (@pxref{Actions}). In the same way, another default
|
||||
action is used for locations. However, the action for locations is general
|
||||
of its left hand side (@pxref{Actions}). In the same way, another default
|
||||
action is used for locations. However, the action for locations is general
|
||||
enough for most cases, meaning there is usually no need to describe for each
|
||||
rule how @code{@@$} should be formed. When building a new location for a given
|
||||
rule how @code{@@$} should be formed. When building a new location for a given
|
||||
grouping, the default behavior of the output parser is to take the beginning
|
||||
of the first symbol, and the end of the last symbol.
|
||||
|
||||
@@ -952,7 +952,7 @@ general form of a Bison grammar file is as follows:
|
||||
The @samp{%%}, @samp{%@{} and @samp{%@}} are punctuation that appears
|
||||
in every Bison grammar file to separate the sections.
|
||||
|
||||
The prologue may define types and variables used in the actions. You can
|
||||
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.
|
||||
|
||||
@@ -963,7 +963,7 @@ semantic values of various symbols.
|
||||
The grammar rules define how to construct each nonterminal symbol from its
|
||||
parts.
|
||||
|
||||
The epilogue can contain any code you want to use. Often the definition of
|
||||
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.
|
||||
@@ -1030,7 +1030,7 @@ Here are the C and Bison declarations for the reverse polish notation
|
||||
calculator. As in C, comments are placed between @samp{/*@dots{}*/}.
|
||||
|
||||
@example
|
||||
/* Reverse polish notation calculator. */
|
||||
/* Reverse polish notation calculator. */
|
||||
|
||||
%@{
|
||||
#define YYSTYPE double
|
||||
@@ -1039,7 +1039,7 @@ calculator. As in C, comments are placed between @samp{/*@dots{}*/}.
|
||||
|
||||
%token NUM
|
||||
|
||||
%% /* Grammar rules and actions follow */
|
||||
%% /* Grammar rules and actions follow. */
|
||||
@end example
|
||||
|
||||
The declarations section (@pxref{Prologue, , The prologue}) contains two
|
||||
@@ -1148,7 +1148,7 @@ more times.
|
||||
|
||||
The parser function @code{yyparse} continues to process input until a
|
||||
grammatical error is seen or the lexical analyzer says there are no more
|
||||
input tokens; we will arrange for the latter to happen at end of file.
|
||||
input tokens; we will arrange for the latter to happen at end-of-input.
|
||||
|
||||
@node Rpcalc Line
|
||||
@subsubsection Explanation of @code{line}
|
||||
@@ -1215,7 +1215,7 @@ action, Bison by default copies the value of @code{$1} into @code{$$}.
|
||||
This is what happens in the first rule (the one that uses @code{NUM}).
|
||||
|
||||
The formatting shown here is the recommended convention, but Bison does
|
||||
not require it. You can add or change whitespace as much as you wish.
|
||||
not require it. You can add or change white space as much as you wish.
|
||||
For example, this:
|
||||
|
||||
@example
|
||||
@@ -1266,18 +1266,17 @@ for it. (The C data type of @code{yylval} is @code{YYSTYPE}, which was
|
||||
defined at the beginning of the grammar; @pxref{Rpcalc Decls,
|
||||
,Declarations for @code{rpcalc}}.)
|
||||
|
||||
A token type code of zero is returned if the end-of-file is encountered.
|
||||
(Bison recognizes any nonpositive value as indicating the end of the
|
||||
input.)
|
||||
A token type code of zero is returned if the end-of-input is encountered.
|
||||
(Bison recognizes any nonpositive value as indicating end-of-input.)
|
||||
|
||||
Here is the code for the lexical analyzer:
|
||||
|
||||
@example
|
||||
@group
|
||||
/* Lexical analyzer returns a double floating point
|
||||
/* The lexical analyzer returns a double floating point
|
||||
number on the stack and the token NUM, or the numeric code
|
||||
of the character read if not a number. Skips all blanks
|
||||
and tabs, returns 0 for EOF. */
|
||||
of the character read if not a number. It skips all blanks
|
||||
and tabs, and returns 0 for end-of-input. */
|
||||
|
||||
#include <ctype.h>
|
||||
@end group
|
||||
@@ -1288,12 +1287,12 @@ yylex (void)
|
||||
@{
|
||||
int c;
|
||||
|
||||
/* skip white space */
|
||||
/* Skip white space. */
|
||||
while ((c = getchar ()) == ' ' || c == '\t')
|
||||
;
|
||||
@end group
|
||||
@group
|
||||
/* process numbers */
|
||||
/* Process numbers. */
|
||||
if (c == '.' || isdigit (c))
|
||||
@{
|
||||
ungetc (c, stdin);
|
||||
@@ -1302,10 +1301,10 @@ yylex (void)
|
||||
@}
|
||||
@end group
|
||||
@group
|
||||
/* return end-of-file */
|
||||
/* Return end-of-input. */
|
||||
if (c == EOF)
|
||||
return 0;
|
||||
/* return single chars */
|
||||
/* Return a single char. */
|
||||
return c;
|
||||
@}
|
||||
@end group
|
||||
@@ -1345,7 +1344,7 @@ here is the definition we will use:
|
||||
#include <stdio.h>
|
||||
|
||||
void
|
||||
yyerror (const char *s) /* Called by yyparse on error */
|
||||
yyerror (const char *s) /* called by yyparse on error */
|
||||
@{
|
||||
printf ("%s\n", s);
|
||||
@}
|
||||
@@ -1383,7 +1382,7 @@ bison @var{file_name}.y
|
||||
@noindent
|
||||
In this example the file was called @file{rpcalc.y} (for ``Reverse Polish
|
||||
CALCulator''). Bison produces a file named @file{@var{file_name}.tab.c},
|
||||
removing the @samp{.y} from the original file name. The file output by
|
||||
removing the @samp{.y} from the original file name. The file output by
|
||||
Bison contains the source code for @code{yyparse}. The additional
|
||||
functions in the input file (@code{yylex}, @code{yyerror} and @code{main})
|
||||
are copied verbatim to the output.
|
||||
@@ -1404,7 +1403,7 @@ rpcalc.tab.c rpcalc.y
|
||||
@group
|
||||
# @r{Compile the Bison parser.}
|
||||
# @r{@samp{-lm} tells compiler to search math library for @code{pow}.}
|
||||
$ @kbd{cc rpcalc.tab.c -lm -o rpcalc}
|
||||
$ @kbd{cc -lm -o rpcalc rpcalc.tab.c}
|
||||
@end group
|
||||
|
||||
@group
|
||||
@@ -1573,7 +1572,7 @@ This example extends the infix notation calculator with location
|
||||
tracking. This feature will be used to improve the error messages. For
|
||||
the sake of clarity, this example is a simple integer calculator, since
|
||||
most of the work needed to use locations will be done in the lexical
|
||||
analyser.
|
||||
analyzer.
|
||||
|
||||
@menu
|
||||
* Decls: Ltcalc Decls. Bison and C declarations for ltcalc.
|
||||
@@ -1681,7 +1680,7 @@ hand.
|
||||
@subsection The @code{ltcalc} Lexical Analyzer.
|
||||
|
||||
Until now, we relied on Bison's defaults to enable location
|
||||
tracking. The next step is to rewrite the lexical analyser, and make it
|
||||
tracking. The next step is to rewrite the lexical analyzer, and make it
|
||||
able to feed the parser with the token locations, as it already does for
|
||||
semantic values.
|
||||
|
||||
@@ -1695,17 +1694,17 @@ yylex (void)
|
||||
@{
|
||||
int c;
|
||||
|
||||
/* skip white space */
|
||||
/* Skip white space. */
|
||||
while ((c = getchar ()) == ' ' || c == '\t')
|
||||
++yylloc.last_column;
|
||||
|
||||
/* step */
|
||||
/* Step. */
|
||||
yylloc.first_line = yylloc.last_line;
|
||||
yylloc.first_column = yylloc.last_column;
|
||||
@end group
|
||||
|
||||
@group
|
||||
/* process numbers */
|
||||
/* Process numbers. */
|
||||
if (isdigit (c))
|
||||
@{
|
||||
yylval = c - '0';
|
||||
@@ -1720,11 +1719,11 @@ yylex (void)
|
||||
@}
|
||||
@end group
|
||||
|
||||
/* return end-of-file */
|
||||
/* Return end-of-input. */
|
||||
if (c == EOF)
|
||||
return 0;
|
||||
|
||||
/* return single chars and update location */
|
||||
/* Return a single char, and update location. */
|
||||
if (c == '\n')
|
||||
@{
|
||||
++yylloc.last_line;
|
||||
@@ -1742,7 +1741,7 @@ In addition, it updates @code{yylloc}, the global variable (of type
|
||||
@code{YYLTYPE}) containing the token's location.
|
||||
|
||||
Now, each time this function returns a token, the parser has its number
|
||||
as well as its semantic value, and its location in the text. The last
|
||||
as well as its semantic value, and its location in the text. The last
|
||||
needed change is to initialize @code{yylloc}, for example in the
|
||||
controlling function:
|
||||
|
||||
@@ -1821,7 +1820,7 @@ Here are the C and Bison declarations for the multi-function calculator.
|
||||
|
||||
@smallexample
|
||||
%@{
|
||||
#include <math.h> /* For math functions, cos(), sin(), etc. */
|
||||
#include <math.h> /* For math functions, cos(), sin(), etc. */
|
||||
#include "calc.h" /* Contains definition of `symrec' */
|
||||
%@}
|
||||
%union @{
|
||||
@@ -1915,7 +1914,7 @@ provides for either functions or variables to be placed in the table.
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
/* Fonctions type. */
|
||||
/* Function type. */
|
||||
typedef double (*func_t) (double);
|
||||
|
||||
/* Data type for links in the chain of symbols. */
|
||||
@@ -1990,7 +1989,7 @@ symrec *sym_table = (symrec *) 0;
|
||||
@end group
|
||||
|
||||
@group
|
||||
/* Put arithmetic functions in table. */
|
||||
/* Put arithmetic functions in table. */
|
||||
void
|
||||
init_table (void)
|
||||
@{
|
||||
@@ -2024,7 +2023,7 @@ putsym (char *sym_name, int sym_type)
|
||||
ptr->name = (char *) malloc (strlen (sym_name) + 1);
|
||||
strcpy (ptr->name,sym_name);
|
||||
ptr->type = sym_type;
|
||||
ptr->value.var = 0; /* set value to 0 even if fctn. */
|
||||
ptr->value.var = 0; /* Set value to 0 even if fctn. */
|
||||
ptr->next = (struct symrec *)sym_table;
|
||||
sym_table = ptr;
|
||||
return ptr;
|
||||
@@ -2066,7 +2065,7 @@ yylex (void)
|
||||
@{
|
||||
int c;
|
||||
|
||||
/* Ignore whitespace, get first nonwhite character. */
|
||||
/* Ignore white space, get first nonwhite character. */
|
||||
while ((c = getchar ()) == ' ' || c == '\t');
|
||||
|
||||
if (c == EOF)
|
||||
@@ -2117,7 +2116,7 @@ yylex (void)
|
||||
@}
|
||||
@end group
|
||||
@group
|
||||
while (c != EOF && isalnum (c));
|
||||
while (isalnum (c));
|
||||
|
||||
ungetc (c, stdin);
|
||||
symbuf[i] = '\0';
|
||||
@@ -2137,7 +2136,7 @@ yylex (void)
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
This program is both powerful and flexible. You may easily add new
|
||||
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.
|
||||
|
||||
@@ -2346,8 +2345,8 @@ your program will confuse other readers.
|
||||
|
||||
All the usual escape sequences used in character literals in C can be
|
||||
used in Bison as well, but you must not use the null character as a
|
||||
character literal because its numeric code, zero, is the code @code{yylex}
|
||||
returns for end-of-input (@pxref{Calling Convention, ,Calling Convention
|
||||
character literal because its numeric code, zero, signifies
|
||||
end-of-input (@pxref{Calling Convention, ,Calling Convention
|
||||
for @code{yylex}}).
|
||||
|
||||
@item
|
||||
@@ -2384,12 +2383,15 @@ How you choose to write a terminal symbol has no effect on its
|
||||
grammatical meaning. That depends only on where it appears in rules and
|
||||
on when the parser function returns that symbol.
|
||||
|
||||
The value returned by @code{yylex} is always one of the terminal symbols
|
||||
(or 0 for end-of-input). Whichever way you write the token type in the
|
||||
grammar rules, you write it the same way in the definition of @code{yylex}.
|
||||
The numeric code for a character token type is simply the numeric code of
|
||||
the character, so @code{yylex} can use the identical character constant to
|
||||
generate the requisite code. Each named token type becomes a C macro in
|
||||
The value returned by @code{yylex} is always one of the terminal
|
||||
symbols, except that a zero or negative value signifies end-of-input.
|
||||
Whichever way you write the token type in the grammar rules, you write
|
||||
it the same way in the definition of @code{yylex}. The numeric code
|
||||
for a character token type is simply the positive numeric code of the
|
||||
character, so @code{yylex} can use the identical value to generate the
|
||||
requisite code, though you may need to convert it to @code{unsigned
|
||||
char} to avoid sign-extension on hosts where @code{char} is signed.
|
||||
Each named token type becomes a C macro in
|
||||
the parser file, so @code{yylex} can use the name to stand for the code.
|
||||
(This is why periods don't make sense in terminal symbols.)
|
||||
@xref{Calling Convention, ,Calling Convention for @code{yylex}}.
|
||||
@@ -2400,15 +2402,23 @@ option when you run Bison, so that it will write these macro definitions
|
||||
into a separate header file @file{@var{name}.tab.h} which you can include
|
||||
in the other source files that need it. @xref{Invocation, ,Invoking Bison}.
|
||||
|
||||
The @code{yylex} function must use the same character set and encoding
|
||||
that was used by Bison. For example, if you run Bison in an
|
||||
If you want to write a grammar that is portable to any Standard C
|
||||
host, you must use only non-null character tokens taken from the basic
|
||||
execution character set of Standard C. This set consists of the ten
|
||||
digits, the 52 lower- and upper-case English letters, and the
|
||||
characters in the following C-language string:
|
||||
|
||||
@example
|
||||
"\a\b\t\n\v\f\r !\"#%&'()*+,-./:;<=>?[\\]^_@{|@}~"
|
||||
@end example
|
||||
|
||||
The @code{yylex} function and Bison must use a consistent character
|
||||
set and encoding for character tokens. For example, if you run Bison in an
|
||||
@sc{ascii} environment, but then compile and run the resulting program
|
||||
in an environment that uses an incompatible character set like
|
||||
@sc{ebcdic}, the resulting program will probably not work because the
|
||||
@sc{ebcdic}, the resulting program may not work because the
|
||||
tables generated by Bison will assume @sc{ascii} numeric values for
|
||||
character tokens. Portable grammars should avoid non-@sc{ascii}
|
||||
character tokens, as implementations in practice often use different
|
||||
and incompatible extensions in this area. However, it is standard
|
||||
character tokens. It is standard
|
||||
practice for software distributions to contain C source files that
|
||||
were generated by Bison in an @sc{ascii} environment, so installers on
|
||||
platforms that are incompatible with @sc{ascii} must rebuild those
|
||||
@@ -2453,8 +2463,8 @@ exp: exp '+' exp
|
||||
says that two groupings of type @code{exp}, with a @samp{+} token in between,
|
||||
can be combined into a larger grouping of type @code{exp}.
|
||||
|
||||
Whitespace in rules is significant only to separate symbols. You can add
|
||||
extra whitespace as you wish.
|
||||
White space in rules is significant only to separate symbols. You can add
|
||||
extra white space as you wish.
|
||||
|
||||
Scattered among the components can be @var{actions} that determine
|
||||
the semantics of the rule. An action looks like this:
|
||||
@@ -2959,7 +2969,7 @@ actually does to implement mid-rule actions.
|
||||
@cindex position, textual
|
||||
|
||||
Though grammar rules and semantic actions are enough to write a fully
|
||||
functional parser, it can be useful to process some additionnal informations,
|
||||
functional parser, it can be useful to process some additional information,
|
||||
especially symbol locations.
|
||||
|
||||
@c (terminal or not) ?
|
||||
@@ -3006,7 +3016,7 @@ Actions are not only useful for defining language semantics, but also for
|
||||
describing the behavior of the output parser with locations.
|
||||
|
||||
The most obvious way for building locations of syntactic groupings is very
|
||||
similar to the way semantic values are computed. In a given rule, several
|
||||
similar to the way semantic values are computed. In a given rule, several
|
||||
constructs can be used to access the locations of the elements being matched.
|
||||
The location of the @var{n}th component of the right hand side is
|
||||
@code{@@@var{n}}, while the location of the left hand side grouping is
|
||||
@@ -3037,11 +3047,11 @@ exp: @dots{}
|
||||
@end example
|
||||
|
||||
As for semantic values, there is a default action for locations that is
|
||||
run each time a rule is matched. It sets the beginning of @code{@@$} to the
|
||||
run each time a rule is matched. It sets the beginning of @code{@@$} to the
|
||||
beginning of the first symbol, and the end of @code{@@$} to the end of the
|
||||
last symbol.
|
||||
|
||||
With this default action, the location tracking can be fully automatic. The
|
||||
With this default action, the location tracking can be fully automatic. The
|
||||
example above simply rewrites this way:
|
||||
|
||||
@example
|
||||
@@ -3066,19 +3076,19 @@ exp: @dots{}
|
||||
@subsection Default Action for Locations
|
||||
@vindex YYLLOC_DEFAULT
|
||||
|
||||
Actually, actions are not the best place to compute locations. Since
|
||||
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
|
||||
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.
|
||||
|
||||
The @code{YYLLOC_DEFAULT} macro takes three parameters. The first one is
|
||||
the location of the grouping (the result of the computation). The second one
|
||||
The @code{YYLLOC_DEFAULT} macro takes three parameters. The first one is
|
||||
the location of the grouping (the result of the computation). The second one
|
||||
is an array holding locations of all right hand side elements of the rule
|
||||
being matched. The last one is the size of the right hand side rule.
|
||||
being matched. The last one is the size of the right hand side rule.
|
||||
|
||||
By default, it is defined this way for simple LALR(1) parsers:
|
||||
|
||||
@@ -3109,7 +3119,7 @@ When defining @code{YYLLOC_DEFAULT}, you should consider that:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
All arguments are free of side-effects. However, only the first one (the
|
||||
All arguments are free of side-effects. However, only the first one (the
|
||||
result) should be modified by @code{YYLLOC_DEFAULT}.
|
||||
|
||||
@item
|
||||
@@ -3597,7 +3607,7 @@ The number of parser states (@pxref{Parser States}).
|
||||
@item %verbose
|
||||
Write an extra output file containing verbose descriptions of the
|
||||
parser states and what is done for each type of look-ahead token in
|
||||
that state. @xref{Understanding, , Understanding Your Parser}, for more
|
||||
that state. @xref{Understanding, , Understanding Your Parser}, for more
|
||||
information.
|
||||
|
||||
|
||||
@@ -3722,8 +3732,9 @@ that need it. @xref{Invocation, ,Invoking Bison}.
|
||||
@node Calling Convention
|
||||
@subsection Calling Convention for @code{yylex}
|
||||
|
||||
The value that @code{yylex} returns must be the numeric code for the type
|
||||
of token it has just found, or 0 for end-of-input.
|
||||
The value that @code{yylex} returns must be the positive numeric code
|
||||
for the type of token it has just found; a zero or negative value
|
||||
signifies end-of-input.
|
||||
|
||||
When a token is referred to in the grammar rules by a name, that name
|
||||
in the parser file becomes a C macro whose definition is the proper
|
||||
@@ -3732,8 +3743,9 @@ to indicate that type. @xref{Symbols}.
|
||||
|
||||
When a token is referred to in the grammar rules by a character literal,
|
||||
the numeric code for that character is also the code for the token type.
|
||||
So @code{yylex} can simply return that character code. The null character
|
||||
must not be used this way, because its code is zero and that is what
|
||||
So @code{yylex} can simply return that character code, possibly converted
|
||||
to @code{unsigned char} to avoid sign-extension. The null character
|
||||
must not be used this way, because its code is zero and that
|
||||
signifies end-of-input.
|
||||
|
||||
Here is an example showing these things:
|
||||
@@ -3743,13 +3755,13 @@ int
|
||||
yylex (void)
|
||||
@{
|
||||
@dots{}
|
||||
if (c == EOF) /* Detect end of file. */
|
||||
if (c == EOF) /* Detect end-of-input. */
|
||||
return 0;
|
||||
@dots{}
|
||||
if (c == '+' || c == '-')
|
||||
return c; /* Assume token type for `+' is '+'. */
|
||||
return c; /* Assume token type for `+' is '+'. */
|
||||
@dots{}
|
||||
return INT; /* Return the type of the token. */
|
||||
return INT; /* Return the type of the token. */
|
||||
@dots{}
|
||||
@}
|
||||
@end example
|
||||
@@ -3784,8 +3796,8 @@ for (i = 0; i < YYNTOKENS; i++)
|
||||
@{
|
||||
if (yytname[i] != 0
|
||||
&& yytname[i][0] == '"'
|
||||
&& strncmp (yytname[i] + 1, token_buffer,
|
||||
strlen (token_buffer))
|
||||
&& ! strncmp (yytname[i] + 1, token_buffer,
|
||||
strlen (token_buffer))
|
||||
&& yytname[i][strlen (token_buffer) + 1] == '"'
|
||||
&& yytname[i][strlen (token_buffer) + 2] == 0)
|
||||
break;
|
||||
@@ -3809,8 +3821,8 @@ Thus, if the type is @code{int} (the default), you might write this in
|
||||
@example
|
||||
@group
|
||||
@dots{}
|
||||
yylval = value; /* Put value onto Bison stack. */
|
||||
return INT; /* Return the type of the token. */
|
||||
yylval = value; /* Put value onto Bison stack. */
|
||||
return INT; /* Return the type of the token. */
|
||||
@dots{}
|
||||
@end group
|
||||
@end example
|
||||
@@ -3837,8 +3849,8 @@ then the code in @code{yylex} might look like this:
|
||||
@example
|
||||
@group
|
||||
@dots{}
|
||||
yylval.intval = value; /* Put value onto Bison stack. */
|
||||
return INT; /* Return the type of the token. */
|
||||
yylval.intval = value; /* Put value onto Bison stack. */
|
||||
return INT; /* Return the type of the token. */
|
||||
@dots{}
|
||||
@end group
|
||||
@end example
|
||||
@@ -4989,7 +5001,7 @@ error recovery. A simple and useful strategy is simply to skip the rest of
|
||||
the current input line or current statement if an error is detected:
|
||||
|
||||
@example
|
||||
stmnt: error ';' /* on error, skip until ';' is read */
|
||||
stmnt: error ';' /* On error, skip until ';' is read. */
|
||||
@end example
|
||||
|
||||
It is also useful to recover to the matching close-delimiter of an
|
||||
@@ -5783,10 +5795,11 @@ Here @var{infile} is the grammar file name, which usually ends in
|
||||
@samp{.y}. The parser file's name is made by replacing the @samp{.y}
|
||||
with @samp{.tab.c}. Thus, the @samp{bison foo.y} filename yields
|
||||
@file{foo.tab.c}, and the @samp{bison hack/foo.y} filename yields
|
||||
@file{hack/foo.tab.c}. It's is also possible, in case you are writing
|
||||
@file{hack/foo.tab.c}. It's also possible, in case you are writing
|
||||
C++ code instead of C in your grammar file, to name it @file{foo.ypp}
|
||||
or @file{foo.y++}. Then, the output files will take an extention like
|
||||
the given one as input (repectively @file{foo.tab.cpp} and @file{foo.tab.c++}).
|
||||
or @file{foo.y++}. Then, the output files will take an extension like
|
||||
the given one as input (respectively @file{foo.tab.cpp} and
|
||||
@file{foo.tab.c++}).
|
||||
This feature takes effect with all options that manipulate filenames like
|
||||
@samp{-o} or @samp{-d}.
|
||||
|
||||
@@ -5796,10 +5809,10 @@ For example :
|
||||
bison -d @var{infile.yxx}
|
||||
@end example
|
||||
@noindent
|
||||
will produce @file{infile.tab.cxx} and @file{infile.tab.hxx}. and
|
||||
will produce @file{infile.tab.cxx} and @file{infile.tab.hxx}, and
|
||||
|
||||
@example
|
||||
bison -d @var{infile.y} -o @var{output.c++}
|
||||
bison -d -o @var{output.c++} @var{infile.y}
|
||||
@end example
|
||||
@noindent
|
||||
will produce @file{output.c++} and @file{outfile.h++}.
|
||||
@@ -5908,7 +5921,7 @@ Same as above, but save in the file @var{defines-file}.
|
||||
@item -b @var{file-prefix}
|
||||
@itemx --file-prefix=@var{prefix}
|
||||
Pretend that @code{%verbose} was specified, i.e, specify prefix to use
|
||||
for all Bison output file names. @xref{Decl Summary}.
|
||||
for all Bison output file names. @xref{Decl Summary}.
|
||||
|
||||
@item -r @var{things}
|
||||
@itemx --report=@var{things}
|
||||
@@ -5935,7 +5948,7 @@ For instance, on the following grammar
|
||||
@itemx --verbose
|
||||
Pretend that @code{%verbose} was specified, i.e, write an extra output
|
||||
file containing verbose descriptions of the grammar and
|
||||
parser. @xref{Decl Summary}.
|
||||
parser. @xref{Decl Summary}.
|
||||
|
||||
@item -o @var{filename}
|
||||
@itemx --output=@var{filename}
|
||||
@@ -5946,12 +5959,12 @@ described under the @samp{-v} and @samp{-d} options.
|
||||
|
||||
@item -g
|
||||
Output a VCG definition of the LALR(1) grammar automaton computed by
|
||||
Bison. If the grammar file is @file{foo.y}, the VCG output file will
|
||||
Bison. If the grammar file is @file{foo.y}, the VCG output file will
|
||||
be @file{foo.vcg}.
|
||||
|
||||
@item --graph=@var{graph-file}
|
||||
The behaviour of @var{--graph} is the same than @samp{-g}. The only
|
||||
difference is that it has an optionnal argument which is the name of
|
||||
The behavior of @var{--graph} is the same than @samp{-g}. The only
|
||||
difference is that it has an optional argument which is the name of
|
||||
the output graph filename.
|
||||
@end table
|
||||
|
||||
@@ -6116,7 +6129,7 @@ Macro to discard a value from the parser stack and fake a look-ahead
|
||||
token. @xref{Action Features, ,Special Features for Use in Actions}.
|
||||
|
||||
@item YYDEBUG
|
||||
Macro to define to equip the parser with tracing code. @xref{Tracing,
|
||||
Macro to define to equip the parser with tracing code. @xref{Tracing,
|
||||
,Tracing Your Parser}.
|
||||
|
||||
@item YYERROR
|
||||
@@ -6159,9 +6172,9 @@ Macro whose value indicates whether the parser is recovering from a
|
||||
syntax error. @xref{Action Features, ,Special Features for Use in Actions}.
|
||||
|
||||
@item YYSTACK_USE_ALLOCA
|
||||
Macro used to control the use of @code{alloca}. If defined to @samp{0},
|
||||
Macro used to control the use of @code{alloca}. If defined to @samp{0},
|
||||
the parser will not use @code{alloca} but @code{malloc} when trying to
|
||||
grow its internal stacks. Do @emph{not} define @code{YYSTACK_USE_ALLOCA}
|
||||
grow its internal stacks. Do @emph{not} define @code{YYSTACK_USE_ALLOCA}
|
||||
to anything else.
|
||||
|
||||
@item YYSTYPE
|
||||
@@ -6233,7 +6246,7 @@ Bison declaration to assign a precedence to a rule that is used at parse
|
||||
time to resolve reduce/reduce conflicts. @xref{GLR Parsers}.
|
||||
|
||||
@item %file-prefix="@var{prefix}"
|
||||
Bison declaration to set the prefix of the output files. @xref{Decl
|
||||
Bison declaration to set the prefix of the output files. @xref{Decl
|
||||
Summary}.
|
||||
|
||||
@item %glr-parser
|
||||
@@ -6245,7 +6258,7 @@ Bison declaration to produce a GLR parser. @xref{GLR Parsers}.
|
||||
@c
|
||||
@c @item %header-extension
|
||||
@c Bison declaration to specify the generated parser header file extension
|
||||
@c if required. @xref{Decl Summary}.
|
||||
@c if required. @xref{Decl Summary}.
|
||||
|
||||
@item %left
|
||||
Bison declaration to assign left associativity to token(s).
|
||||
@@ -6258,7 +6271,7 @@ function is applied to the two semantic values to get a single result.
|
||||
@xref{GLR Parsers}.
|
||||
|
||||
@item %name-prefix="@var{prefix}"
|
||||
Bison declaration to rename the external symbols. @xref{Decl Summary}.
|
||||
Bison declaration to rename the external symbols. @xref{Decl Summary}.
|
||||
|
||||
@item %no-lines
|
||||
Bison declaration to avoid generating @code{#line} directives in the
|
||||
@@ -6269,7 +6282,7 @@ Bison declaration to assign non-associativity to token(s).
|
||||
@xref{Precedence Decl, ,Operator Precedence}.
|
||||
|
||||
@item %output="@var{filename}"
|
||||
Bison declaration to set the name of the parser file. @xref{Decl
|
||||
Bison declaration to set the name of the parser file. @xref{Decl
|
||||
Summary}.
|
||||
|
||||
@item %prec
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = ansi2knr
|
||||
|
||||
CFLAGS = @CFLAGS@ $(WARNING_CFLAGS)
|
||||
AM_CFLAGS = $(WARNING_CFLAGS)
|
||||
|
||||
noinst_LIBRARIES = libbison.a
|
||||
|
||||
|
||||
+505
-213
@@ -22,43 +22,49 @@
|
||||
#endif
|
||||
|
||||
#include "abitset.h"
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/* This file implements fixed size bitsets stored as an array
|
||||
of words. Any unused bits in the last word must be zero. */
|
||||
|
||||
typedef struct abitset_struct
|
||||
{
|
||||
unsigned int n_bits; /* Number of bits. */
|
||||
bitset_word words[1]; /* The array of bits. */
|
||||
}
|
||||
*abitset;
|
||||
|
||||
|
||||
struct bitset_struct
|
||||
{
|
||||
struct bbitset_struct b;
|
||||
struct abitset_struct a;
|
||||
};
|
||||
|
||||
static void abitset_unused_clear PARAMS ((bitset));
|
||||
static void abitset_ones PARAMS ((bitset));
|
||||
static void abitset_zero PARAMS ((bitset));
|
||||
static int abitset_empty_p PARAMS ((bitset));
|
||||
static void abitset_copy1 PARAMS ((bitset, bitset));
|
||||
static void abitset_not PARAMS ((bitset, bitset));
|
||||
static int abitset_equal_p PARAMS ((bitset, bitset));
|
||||
static int abitset_subset_p PARAMS ((bitset, bitset));
|
||||
static int abitset_disjoint_p PARAMS ((bitset, bitset));
|
||||
static void abitset_and PARAMS ((bitset, bitset, bitset));
|
||||
static int abitset_and_cmp PARAMS ((bitset, bitset, bitset));
|
||||
static void abitset_andn PARAMS ((bitset, bitset, bitset));
|
||||
static int abitset_andn_cmp PARAMS ((bitset, bitset, bitset));
|
||||
static void abitset_or PARAMS ((bitset, bitset, bitset));
|
||||
static int abitset_or_cmp PARAMS ((bitset, bitset, bitset));
|
||||
static void abitset_xor PARAMS ((bitset, bitset, bitset));
|
||||
static int abitset_xor_cmp PARAMS ((bitset, bitset, bitset));
|
||||
static void abitset_and_or PARAMS ((bitset, bitset, bitset, bitset));
|
||||
static int abitset_and_or_cmp PARAMS ((bitset, bitset, bitset, bitset));
|
||||
static void abitset_andn_or PARAMS ((bitset, bitset, bitset, bitset));
|
||||
static int abitset_andn_or_cmp PARAMS ((bitset, bitset, bitset, bitset));
|
||||
static void abitset_or_and PARAMS ((bitset, bitset, bitset, bitset));
|
||||
static int abitset_or_and_cmp PARAMS ((bitset, bitset, bitset, bitset));
|
||||
static void abitset_copy PARAMS ((bitset, bitset));
|
||||
|
||||
static int abitset_small_list PARAMS ((bitset, bitset_bindex *, bitset_bindex,
|
||||
bitset_bindex *));
|
||||
static bitset_bindex abitset_small_list PARAMS ((bitset, bitset_bindex *,
|
||||
bitset_bindex,
|
||||
bitset_bindex *));
|
||||
|
||||
static void abitset_set PARAMS ((bitset, bitset_bindex));
|
||||
static void abitset_reset PARAMS ((bitset, bitset_bindex));
|
||||
static int abitset_test PARAMS ((bitset, bitset_bindex));
|
||||
static int abitset_size PARAMS ((bitset));
|
||||
static int abitset_op1 PARAMS ((bitset, enum bitset_ops));
|
||||
static int abitset_op2 PARAMS ((bitset, bitset, enum bitset_ops));
|
||||
static int abitset_op3 PARAMS ((bitset, bitset, bitset, enum bitset_ops));
|
||||
static int abitset_op4 PARAMS ((bitset, bitset, bitset, bitset,
|
||||
enum bitset_ops));
|
||||
static int abitset_list PARAMS ((bitset, bitset_bindex *, bitset_bindex,
|
||||
bitset_bindex *));
|
||||
static int abitset_reverse_list
|
||||
static bitset_bindex abitset_size PARAMS ((bitset));
|
||||
static bitset_bindex abitset_list PARAMS ((bitset, bitset_bindex *,
|
||||
bitset_bindex, bitset_bindex *));
|
||||
static bitset_bindex abitset_list_reverse
|
||||
PARAMS ((bitset, bitset_bindex *, bitset_bindex, bitset_bindex *));
|
||||
|
||||
#define ABITSET_N_WORDS(N) (((N) + BITSET_WORD_BITS - 1) / BITSET_WORD_BITS)
|
||||
@@ -67,7 +73,7 @@ PARAMS ((bitset, bitset_bindex *, bitset_bindex, bitset_bindex *));
|
||||
|
||||
|
||||
/* Return size in bits of bitset SRC. */
|
||||
static int
|
||||
static bitset_bindex
|
||||
abitset_size (src)
|
||||
bitset src;
|
||||
{
|
||||
@@ -78,7 +84,7 @@ abitset_size (src)
|
||||
/* Find list of up to NUM bits set in BSET starting from and including
|
||||
*NEXT and store in array LIST. Return with actual number of bits
|
||||
found and with *NEXT indicating where search stopped. */
|
||||
static int
|
||||
static bitset_bindex
|
||||
abitset_small_list (src, list, num, next)
|
||||
bitset src;
|
||||
bitset_bindex *list;
|
||||
@@ -143,7 +149,8 @@ abitset_set (dst, bitno)
|
||||
bitset dst ATTRIBUTE_UNUSED;
|
||||
bitset_bindex bitno ATTRIBUTE_UNUSED;
|
||||
{
|
||||
/* This should never occur for abitsets. */
|
||||
/* This should never occur for abitsets since we should always
|
||||
hit the cache. */
|
||||
abort ();
|
||||
}
|
||||
|
||||
@@ -154,7 +161,8 @@ abitset_reset (dst, bitno)
|
||||
bitset dst ATTRIBUTE_UNUSED;
|
||||
bitset_bindex bitno ATTRIBUTE_UNUSED;
|
||||
{
|
||||
/* This should never occur for abitsets. */
|
||||
/* This should never occur for abitsets since we should always
|
||||
hit the cache. */
|
||||
abort ();
|
||||
}
|
||||
|
||||
@@ -165,7 +173,8 @@ abitset_test (src, bitno)
|
||||
bitset src ATTRIBUTE_UNUSED;
|
||||
bitset_bindex bitno ATTRIBUTE_UNUSED;
|
||||
{
|
||||
/* This should never occur for abitsets. */
|
||||
/* This should never occur for abitsets since we should always
|
||||
hit the cache. */
|
||||
abort ();
|
||||
return 0;
|
||||
}
|
||||
@@ -175,8 +184,8 @@ abitset_test (src, bitno)
|
||||
from and including NEXT and store in array LIST. Return with
|
||||
actual number of bits found and with *NEXT indicating where search
|
||||
stopped. */
|
||||
static int
|
||||
abitset_reverse_list (src, list, num, next)
|
||||
static bitset_bindex
|
||||
abitset_list_reverse (src, list, num, next)
|
||||
bitset src;
|
||||
bitset_bindex *list;
|
||||
bitset_bindex num;
|
||||
@@ -188,7 +197,6 @@ abitset_reverse_list (src, list, num, next)
|
||||
bitset_windex windex;
|
||||
unsigned int bitcnt;
|
||||
bitset_bindex bitoff;
|
||||
bitset_word word;
|
||||
bitset_word *srcp = ABITSET_WORDS (src);
|
||||
bitset_bindex n_bits = ABITSET_N_BITS (src);
|
||||
|
||||
@@ -210,6 +218,8 @@ abitset_reverse_list (src, list, num, next)
|
||||
|
||||
do
|
||||
{
|
||||
bitset_word word;
|
||||
|
||||
word = srcp[windex] << (BITSET_WORD_BITS - 1 - bitcnt);
|
||||
for (; word; bitcnt--)
|
||||
{
|
||||
@@ -237,7 +247,7 @@ abitset_reverse_list (src, list, num, next)
|
||||
/* Find list of up to NUM bits set in BSET starting from and including
|
||||
*NEXT and store in array LIST. Return with actual number of bits
|
||||
found and with *NEXT indicating where search stopped. */
|
||||
static int
|
||||
static bitset_bindex
|
||||
abitset_list (src, list, num, next)
|
||||
bitset src;
|
||||
bitset_bindex *list;
|
||||
@@ -354,277 +364,559 @@ abitset_unused_clear (dst)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
abitset_op1 (dst, op)
|
||||
static void
|
||||
abitset_ones (dst)
|
||||
bitset dst;
|
||||
enum bitset_ops op;
|
||||
{
|
||||
unsigned int i;
|
||||
bitset_word *dstp = ABITSET_WORDS (dst);
|
||||
unsigned int bytes;
|
||||
size_t bytes;
|
||||
|
||||
bytes = sizeof (bitset_word) * dst->b.csize;
|
||||
|
||||
switch (op)
|
||||
{
|
||||
case BITSET_OP_ZERO:
|
||||
memset (dstp, 0, bytes);
|
||||
break;
|
||||
memset (dstp, -1, bytes);
|
||||
abitset_unused_clear (dst);
|
||||
}
|
||||
|
||||
case BITSET_OP_ONES:
|
||||
memset (dstp, -1, bytes);
|
||||
abitset_unused_clear (dst);
|
||||
break;
|
||||
|
||||
case BITSET_OP_EMPTY_P:
|
||||
for (i = 0; i < dst->b.csize; i++)
|
||||
if (dstp[i])
|
||||
return 0;
|
||||
break;
|
||||
static void
|
||||
abitset_zero (dst)
|
||||
bitset dst;
|
||||
{
|
||||
bitset_word *dstp = ABITSET_WORDS (dst);
|
||||
size_t bytes;
|
||||
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
bytes = sizeof (bitset_word) * dst->b.csize;
|
||||
|
||||
memset (dstp, 0, bytes);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
abitset_empty_p (dst)
|
||||
bitset dst;
|
||||
{
|
||||
bitset_windex i;
|
||||
bitset_word *dstp = ABITSET_WORDS (dst);
|
||||
|
||||
for (i = 0; i < dst->b.csize; i++)
|
||||
if (dstp[i])
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
abitset_op2 (dst, src, op)
|
||||
static void
|
||||
abitset_copy1 (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
enum bitset_ops op;
|
||||
{
|
||||
unsigned int i;
|
||||
bitset_word *srcp = ABITSET_WORDS (src);
|
||||
bitset_word *dstp = ABITSET_WORDS (dst);
|
||||
bitset_windex size = dst->b.csize;
|
||||
|
||||
switch (op)
|
||||
{
|
||||
case BITSET_OP_COPY:
|
||||
if (srcp == dstp)
|
||||
break;
|
||||
memcpy (dstp, srcp, sizeof (bitset_word) * size);
|
||||
break;
|
||||
if (srcp == dstp)
|
||||
return;
|
||||
memcpy (dstp, srcp, sizeof (bitset_word) * size);
|
||||
}
|
||||
|
||||
case BITSET_OP_NOT:
|
||||
for (i = 0; i < size; i++)
|
||||
*dstp++ = ~(*srcp++);
|
||||
abitset_unused_clear (dst);
|
||||
break;
|
||||
|
||||
case BITSET_OP_EQUAL_P:
|
||||
for (i = 0; i < size; i++)
|
||||
if (*srcp++ != *dstp++)
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case BITSET_OP_SUBSET_P:
|
||||
for (i = 0; i < size; i++, dstp++, srcp++)
|
||||
if (*dstp != (*srcp | *dstp))
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case BITSET_OP_DISJOINT_P:
|
||||
for (i = 0; i < size; i++)
|
||||
if (*srcp++ & *dstp++)
|
||||
return 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
static void
|
||||
abitset_not (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
{
|
||||
bitset_windex i;
|
||||
bitset_word *srcp = ABITSET_WORDS (src);
|
||||
bitset_word *dstp = ABITSET_WORDS (dst);
|
||||
bitset_windex size = dst->b.csize;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
*dstp++ = ~(*srcp++);
|
||||
abitset_unused_clear (dst);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
abitset_equal_p (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
{
|
||||
bitset_windex i;
|
||||
bitset_word *srcp = ABITSET_WORDS (src);
|
||||
bitset_word *dstp = ABITSET_WORDS (dst);
|
||||
bitset_windex size = dst->b.csize;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
if (*srcp++ != *dstp++)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
abitset_op3 (dst, src1, src2, op)
|
||||
abitset_subset_p (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
{
|
||||
bitset_windex i;
|
||||
bitset_word *srcp = ABITSET_WORDS (src);
|
||||
bitset_word *dstp = ABITSET_WORDS (dst);
|
||||
bitset_windex size = dst->b.csize;
|
||||
|
||||
for (i = 0; i < size; i++, dstp++, srcp++)
|
||||
if (*dstp != (*srcp | *dstp))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
abitset_disjoint_p (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
{
|
||||
bitset_windex i;
|
||||
bitset_word *srcp = ABITSET_WORDS (src);
|
||||
bitset_word *dstp = ABITSET_WORDS (dst);
|
||||
bitset_windex size = dst->b.csize;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
if (*srcp++ & *dstp++)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
abitset_and (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
enum bitset_ops op;
|
||||
{
|
||||
unsigned int i;
|
||||
bitset_windex i;
|
||||
bitset_word *src1p = ABITSET_WORDS (src1);
|
||||
bitset_word *src2p = ABITSET_WORDS (src2);
|
||||
bitset_word *dstp = ABITSET_WORDS (dst);
|
||||
bitset_windex size = dst->b.csize;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
*dstp++ = *src1p++ & *src2p++;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
abitset_and_cmp (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
bitset_windex i;
|
||||
int changed = 0;
|
||||
bitset_word *src1p = ABITSET_WORDS (src1);
|
||||
bitset_word *src2p = ABITSET_WORDS (src2);
|
||||
bitset_word *dstp = ABITSET_WORDS (dst);
|
||||
bitset_windex size = dst->b.csize;
|
||||
|
||||
switch (op)
|
||||
for (i = 0; i < size; i++, dstp++)
|
||||
{
|
||||
case BITSET_OP_OR:
|
||||
for (i = 0; i < size; i++, dstp++)
|
||||
bitset_word tmp = *src1p++ & *src2p++;
|
||||
|
||||
if (*dstp != tmp)
|
||||
{
|
||||
bitset_word tmp = *src1p++ | *src2p++;
|
||||
|
||||
if (*dstp != tmp)
|
||||
{
|
||||
changed = 1;
|
||||
*dstp = tmp;
|
||||
}
|
||||
changed = 1;
|
||||
*dstp = tmp;
|
||||
}
|
||||
break;
|
||||
|
||||
case BITSET_OP_AND:
|
||||
for (i = 0; i < size; i++, dstp++)
|
||||
{
|
||||
bitset_word tmp = *src1p++ & *src2p++;
|
||||
|
||||
if (*dstp != tmp)
|
||||
{
|
||||
changed = 1;
|
||||
*dstp = tmp;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case BITSET_OP_XOR:
|
||||
for (i = 0; i < size; i++, dstp++)
|
||||
{
|
||||
bitset_word tmp = *src1p++ ^ *src2p++;
|
||||
|
||||
if (*dstp != tmp)
|
||||
{
|
||||
changed = 1;
|
||||
*dstp = tmp;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case BITSET_OP_ANDN:
|
||||
for (i = 0; i < size; i++, dstp++)
|
||||
{
|
||||
bitset_word tmp = *src1p++ & ~(*src2p++);
|
||||
|
||||
if (*dstp != tmp)
|
||||
{
|
||||
changed = 1;
|
||||
*dstp = tmp;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
abitset_andn (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
bitset_windex i;
|
||||
bitset_word *src1p = ABITSET_WORDS (src1);
|
||||
bitset_word *src2p = ABITSET_WORDS (src2);
|
||||
bitset_word *dstp = ABITSET_WORDS (dst);
|
||||
bitset_windex size = dst->b.csize;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
*dstp++ = *src1p++ & ~(*src2p++);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
abitset_op4 (dst, src1, src2, src3, op)
|
||||
abitset_andn_cmp (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
bitset_windex i;
|
||||
int changed = 0;
|
||||
bitset_word *src1p = ABITSET_WORDS (src1);
|
||||
bitset_word *src2p = ABITSET_WORDS (src2);
|
||||
bitset_word *dstp = ABITSET_WORDS (dst);
|
||||
bitset_windex size = dst->b.csize;
|
||||
|
||||
for (i = 0; i < size; i++, dstp++)
|
||||
{
|
||||
bitset_word tmp = *src1p++ & ~(*src2p++);
|
||||
|
||||
if (*dstp != tmp)
|
||||
{
|
||||
changed = 1;
|
||||
*dstp = tmp;
|
||||
}
|
||||
}
|
||||
return changed;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
abitset_or (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
bitset_windex i;
|
||||
bitset_word *src1p = ABITSET_WORDS (src1);
|
||||
bitset_word *src2p = ABITSET_WORDS (src2);
|
||||
bitset_word *dstp = ABITSET_WORDS (dst);
|
||||
bitset_windex size = dst->b.csize;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
*dstp++ = *src1p++ | *src2p++;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
abitset_or_cmp (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
bitset_windex i;
|
||||
int changed = 0;
|
||||
bitset_word *src1p = ABITSET_WORDS (src1);
|
||||
bitset_word *src2p = ABITSET_WORDS (src2);
|
||||
bitset_word *dstp = ABITSET_WORDS (dst);
|
||||
bitset_windex size = dst->b.csize;
|
||||
|
||||
for (i = 0; i < size; i++, dstp++)
|
||||
{
|
||||
bitset_word tmp = *src1p++ | *src2p++;
|
||||
|
||||
if (*dstp != tmp)
|
||||
{
|
||||
changed = 1;
|
||||
*dstp = tmp;
|
||||
}
|
||||
}
|
||||
return changed;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
abitset_xor (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
bitset_windex i;
|
||||
bitset_word *src1p = ABITSET_WORDS (src1);
|
||||
bitset_word *src2p = ABITSET_WORDS (src2);
|
||||
bitset_word *dstp = ABITSET_WORDS (dst);
|
||||
bitset_windex size = dst->b.csize;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
*dstp++ = *src1p++ ^ *src2p++;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
abitset_xor_cmp (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
bitset_windex i;
|
||||
int changed = 0;
|
||||
bitset_word *src1p = ABITSET_WORDS (src1);
|
||||
bitset_word *src2p = ABITSET_WORDS (src2);
|
||||
bitset_word *dstp = ABITSET_WORDS (dst);
|
||||
bitset_windex size = dst->b.csize;
|
||||
|
||||
for (i = 0; i < size; i++, dstp++)
|
||||
{
|
||||
bitset_word tmp = *src1p++ ^ *src2p++;
|
||||
|
||||
if (*dstp != tmp)
|
||||
{
|
||||
changed = 1;
|
||||
*dstp = tmp;
|
||||
}
|
||||
}
|
||||
return changed;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
abitset_and_or (dst, src1, src2, src3)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
bitset src3;
|
||||
enum bitset_ops op;
|
||||
{
|
||||
unsigned int i;
|
||||
bitset_windex i;
|
||||
bitset_word *src1p = ABITSET_WORDS (src1);
|
||||
bitset_word *src2p = ABITSET_WORDS (src2);
|
||||
bitset_word *src3p = ABITSET_WORDS (src3);
|
||||
bitset_word *dstp = ABITSET_WORDS (dst);
|
||||
bitset_windex size = dst->b.csize;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
*dstp++ = (*src1p++ & *src2p++) | *src3p++;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
abitset_and_or_cmp (dst, src1, src2, src3)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
bitset src3;
|
||||
{
|
||||
bitset_windex i;
|
||||
int changed = 0;
|
||||
bitset_word *src1p = ABITSET_WORDS (src1);
|
||||
bitset_word *src2p = ABITSET_WORDS (src2);
|
||||
bitset_word *src3p = ABITSET_WORDS (src3);
|
||||
bitset_word *dstp = ABITSET_WORDS (dst);
|
||||
bitset_windex size = dst->b.csize;
|
||||
|
||||
switch (op)
|
||||
|
||||
for (i = 0; i < size; i++, dstp++)
|
||||
{
|
||||
case BITSET_OP_OR_AND:
|
||||
for (i = 0; i < size; i++, dstp++)
|
||||
bitset_word tmp = (*src1p++ & *src2p++) | *src3p++;
|
||||
|
||||
if (*dstp != tmp)
|
||||
{
|
||||
bitset_word tmp = (*src1p++ | *src2p++) & *src3p++;
|
||||
|
||||
if (*dstp != tmp)
|
||||
{
|
||||
changed = 1;
|
||||
*dstp = tmp;
|
||||
}
|
||||
changed = 1;
|
||||
*dstp = tmp;
|
||||
}
|
||||
break;
|
||||
|
||||
case BITSET_OP_AND_OR:
|
||||
for (i = 0; i < size; i++, dstp++)
|
||||
{
|
||||
bitset_word tmp = (*src1p++ & *src2p++) | *src3p++;
|
||||
|
||||
if (*dstp != tmp)
|
||||
{
|
||||
changed = 1;
|
||||
*dstp = tmp;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case BITSET_OP_ANDN_OR:
|
||||
for (i = 0; i < size; i++, dstp++)
|
||||
{
|
||||
bitset_word tmp = (*src1p++ & ~(*src2p++)) | *src3p++;
|
||||
|
||||
if (*dstp != tmp)
|
||||
{
|
||||
changed = 1;
|
||||
*dstp = tmp;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
abitset_andn_or (dst, src1, src2, src3)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
bitset src3;
|
||||
{
|
||||
bitset_windex i;
|
||||
bitset_word *src1p = ABITSET_WORDS (src1);
|
||||
bitset_word *src2p = ABITSET_WORDS (src2);
|
||||
bitset_word *src3p = ABITSET_WORDS (src3);
|
||||
bitset_word *dstp = ABITSET_WORDS (dst);
|
||||
bitset_windex size = dst->b.csize;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
*dstp++ = (*src1p++ & ~(*src2p++)) | *src3p++;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
abitset_andn_or_cmp (dst, src1, src2, src3)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
bitset src3;
|
||||
{
|
||||
bitset_windex i;
|
||||
int changed = 0;
|
||||
bitset_word *src1p = ABITSET_WORDS (src1);
|
||||
bitset_word *src2p = ABITSET_WORDS (src2);
|
||||
bitset_word *src3p = ABITSET_WORDS (src3);
|
||||
bitset_word *dstp = ABITSET_WORDS (dst);
|
||||
bitset_windex size = dst->b.csize;
|
||||
|
||||
for (i = 0; i < size; i++, dstp++)
|
||||
{
|
||||
bitset_word tmp = (*src1p++ & ~(*src2p++)) | *src3p++;
|
||||
|
||||
if (*dstp != tmp)
|
||||
{
|
||||
changed = 1;
|
||||
*dstp = tmp;
|
||||
}
|
||||
}
|
||||
return changed;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
abitset_or_and (dst, src1, src2, src3)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
bitset src3;
|
||||
{
|
||||
bitset_windex i;
|
||||
bitset_word *src1p = ABITSET_WORDS (src1);
|
||||
bitset_word *src2p = ABITSET_WORDS (src2);
|
||||
bitset_word *src3p = ABITSET_WORDS (src3);
|
||||
bitset_word *dstp = ABITSET_WORDS (dst);
|
||||
bitset_windex size = dst->b.csize;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
*dstp++ = (*src1p++ | *src2p++) & *src3p++;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
abitset_or_and_cmp (dst, src1, src2, src3)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
bitset src3;
|
||||
{
|
||||
bitset_windex i;
|
||||
int changed = 0;
|
||||
bitset_word *src1p = ABITSET_WORDS (src1);
|
||||
bitset_word *src2p = ABITSET_WORDS (src2);
|
||||
bitset_word *src3p = ABITSET_WORDS (src3);
|
||||
bitset_word *dstp = ABITSET_WORDS (dst);
|
||||
bitset_windex size = dst->b.csize;
|
||||
|
||||
for (i = 0; i < size; i++, dstp++)
|
||||
{
|
||||
bitset_word tmp = (*src1p++ | *src2p++) & *src3p++;
|
||||
|
||||
if (*dstp != tmp)
|
||||
{
|
||||
changed = 1;
|
||||
*dstp = tmp;
|
||||
}
|
||||
}
|
||||
return changed;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
abitset_copy (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
{
|
||||
if (BITSET_COMPATIBLE_ (dst, src))
|
||||
abitset_copy1 (dst, src);
|
||||
else
|
||||
bitset_copy_ (dst, src);
|
||||
}
|
||||
|
||||
|
||||
/* Vector of operations for single word bitsets. */
|
||||
struct bitset_ops_struct abitset_small_ops = {
|
||||
struct bitset_vtable abitset_small_vtable = {
|
||||
abitset_set,
|
||||
abitset_reset,
|
||||
bitset_toggle_,
|
||||
abitset_test,
|
||||
abitset_size,
|
||||
abitset_op1,
|
||||
abitset_op2,
|
||||
abitset_op3,
|
||||
abitset_op4,
|
||||
bitset_count_,
|
||||
abitset_empty_p,
|
||||
abitset_ones,
|
||||
abitset_zero,
|
||||
abitset_copy,
|
||||
abitset_disjoint_p,
|
||||
abitset_equal_p,
|
||||
abitset_not,
|
||||
abitset_subset_p,
|
||||
abitset_and,
|
||||
abitset_and_cmp,
|
||||
abitset_andn,
|
||||
abitset_andn_cmp,
|
||||
abitset_or,
|
||||
abitset_or_cmp,
|
||||
abitset_xor,
|
||||
abitset_xor_cmp,
|
||||
abitset_and_or,
|
||||
abitset_and_or_cmp,
|
||||
abitset_andn_or,
|
||||
abitset_andn_or_cmp,
|
||||
abitset_or_and,
|
||||
abitset_or_and_cmp,
|
||||
abitset_small_list,
|
||||
abitset_reverse_list,
|
||||
abitset_list_reverse,
|
||||
NULL,
|
||||
BITSET_ARRAY
|
||||
};
|
||||
|
||||
|
||||
/* Vector of operations for multiple word bitsets. */
|
||||
struct bitset_ops_struct abitset_ops = {
|
||||
struct bitset_vtable abitset_vtable = {
|
||||
abitset_set,
|
||||
abitset_reset,
|
||||
bitset_toggle_,
|
||||
abitset_test,
|
||||
abitset_size,
|
||||
abitset_op1,
|
||||
abitset_op2,
|
||||
abitset_op3,
|
||||
abitset_op4,
|
||||
bitset_count_,
|
||||
abitset_empty_p,
|
||||
abitset_ones,
|
||||
abitset_zero,
|
||||
abitset_copy,
|
||||
abitset_disjoint_p,
|
||||
abitset_equal_p,
|
||||
abitset_not,
|
||||
abitset_subset_p,
|
||||
abitset_and,
|
||||
abitset_and_cmp,
|
||||
abitset_andn,
|
||||
abitset_andn_cmp,
|
||||
abitset_or,
|
||||
abitset_or_cmp,
|
||||
abitset_xor,
|
||||
abitset_xor_cmp,
|
||||
abitset_and_or,
|
||||
abitset_and_or_cmp,
|
||||
abitset_andn_or,
|
||||
abitset_andn_or_cmp,
|
||||
abitset_or_and,
|
||||
abitset_or_and_cmp,
|
||||
abitset_list,
|
||||
abitset_reverse_list,
|
||||
abitset_list_reverse,
|
||||
NULL,
|
||||
BITSET_ARRAY
|
||||
};
|
||||
|
||||
|
||||
int
|
||||
size_t
|
||||
abitset_bytes (n_bits)
|
||||
bitset_bindex n_bits;
|
||||
{
|
||||
unsigned int bytes, size;
|
||||
bitset_windex size;
|
||||
size_t bytes;
|
||||
size_t header_size = offsetof (union bitset_union, a.words);
|
||||
struct bitset_align_struct { char a; union bitset_union b; };
|
||||
size_t bitset_alignment = offsetof (struct bitset_align_struct, b);
|
||||
|
||||
size = ABITSET_N_WORDS (n_bits);
|
||||
bytes = size * sizeof (bitset_word);
|
||||
return sizeof (struct bitset_struct) + bytes - sizeof (bitset_word);
|
||||
bytes = header_size + size * sizeof (bitset_word);
|
||||
|
||||
/* Align the size properly for a vector of abitset objects. */
|
||||
if (header_size % bitset_alignment != 0
|
||||
|| sizeof (bitset_word) % bitset_alignment != 0)
|
||||
{
|
||||
bytes += bitset_alignment - 1;
|
||||
bytes -= bytes % bitset_alignment;
|
||||
}
|
||||
|
||||
return bytes;
|
||||
}
|
||||
|
||||
|
||||
@@ -642,9 +934,9 @@ abitset_init (bset, n_bits)
|
||||
There is probably little merit if using caching since
|
||||
the small bitset will always fit in the cache. */
|
||||
if (size == 1)
|
||||
bset->b.ops = &abitset_small_ops;
|
||||
bset->b.vtable = &abitset_small_vtable;
|
||||
else
|
||||
bset->b.ops = &abitset_ops;
|
||||
bset->b.vtable = &abitset_vtable;
|
||||
|
||||
bset->b.cindex = 0;
|
||||
bset->b.csize = size;
|
||||
|
||||
+2
-2
@@ -19,9 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#ifndef _ABITSET_H
|
||||
#define _ABITSET_H
|
||||
|
||||
#include "bbitset.h"
|
||||
#include "bitset.h"
|
||||
|
||||
extern int abitset_bytes PARAMS ((bitset_bindex));
|
||||
extern size_t abitset_bytes PARAMS ((bitset_bindex));
|
||||
|
||||
extern bitset abitset_init PARAMS ((bitset, bitset_bindex));
|
||||
|
||||
|
||||
+194
-130
@@ -25,12 +25,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
/* Use the following types for function parameters where the
|
||||
corresponding enum would be the correct type if we could use
|
||||
prototyped function definitions. Standard C says that one cannot
|
||||
portably use an enum as a parameter of an old-style function
|
||||
definition that is also declared with a prototype. */
|
||||
|
||||
typedef int enum_bitset_ops;
|
||||
typedef int enum_bitset_type;
|
||||
|
||||
/* Currently we support three flavours of bitsets:
|
||||
BITSET_ARRAY: Array of bits (fixed size, faster).
|
||||
BITSET_ARRAY: Array of bits (fixed size, fast for dense bitsets).
|
||||
BITSET_LIST: Linked list of array of bits (variable size, least storage
|
||||
for large very sparse sets).
|
||||
for large very sparse sets).
|
||||
BITSET_TABLE: Expandable table of pointers to array of bits
|
||||
(variable size, less storage for large sparse sets).
|
||||
(variable size, less storage for large sparse sets).
|
||||
|
||||
BITSET_STATS: Wrapper bitset for internal use only.
|
||||
*/
|
||||
@@ -38,6 +47,8 @@ enum bitset_type {BITSET_ARRAY, BITSET_LIST, BITSET_TABLE, BITSET_TYPE_NUM,
|
||||
BITSET_STATS};
|
||||
#define BITSET_TYPE_NAMES {"abitset", "lbitset", "ebitset"}
|
||||
|
||||
extern const char * const bitset_type_names[];
|
||||
|
||||
enum bitset_alloc_type {BITSET_MALLOC, BITSET_OBALLOC};
|
||||
|
||||
/* Non-zero to use inline functions instead of macros. */
|
||||
@@ -49,13 +60,23 @@ typedef unsigned long bitset_word;
|
||||
|
||||
/* Bit index. In theory we might need a type wider than size_t, but
|
||||
in practice we lose at most a factor of CHAR_BIT by going with
|
||||
size_t, and that is good enough. */
|
||||
size_t, and that is good enough. If this type is changed to be
|
||||
wider than size_t, the code needs to be modified to check for
|
||||
overflow when converting bit counts to byte or word counts.
|
||||
The bit and word index types must be unsigned. */
|
||||
typedef size_t bitset_bindex;
|
||||
|
||||
/* Word index. */
|
||||
typedef size_t bitset_windex;
|
||||
|
||||
#define BITSET_INDEX_MAX ((bitset_word) 1 << (BITSET_WORD_BITS - 1))
|
||||
/* Maximum values for commonly-used unsigned types. BITSET_SIZE_MAX
|
||||
always equals SIZE_MAX, but some older systems lack SIZE_MAX. */
|
||||
#define BITSET_BINDEX_MAX ((bitset_bindex) -1)
|
||||
|
||||
/* Limit max word index to the maximum value of a signed integer
|
||||
to simplify cache disabling. */
|
||||
#define BITSET_WINDEX_MAX (((bitset_windex) -1) >> 1)
|
||||
#define BITSET_SIZE_MAX ((size_t) -1)
|
||||
|
||||
#define BITSET_MSB ((bitset_word) 1 << (BITSET_WORD_BITS - 1))
|
||||
|
||||
@@ -68,111 +89,9 @@ enum bitset_ops {BITSET_OP_ZERO, BITSET_OP_ONES,
|
||||
BITSET_OP_AND, BITSET_OP_OR, BITSET_OP_XOR, BITSET_OP_ANDN,
|
||||
BITSET_OP_OR_AND, BITSET_OP_AND_OR, BITSET_OP_ANDN_OR};
|
||||
|
||||
/* Return size in bits of bitset SRC. */
|
||||
#define BITSET_SIZE_(SRC) (SRC)->b.ops->size (SRC)
|
||||
|
||||
/* Return type of bitset SRC. */
|
||||
#define BITSET_TYPE_(DST) (DST)->b.ops->type
|
||||
|
||||
/* Set bit BITNO in bitset DST. */
|
||||
#define BITSET_SET_(DST, BITNO) (DST)->b.ops->set (DST, BITNO)
|
||||
|
||||
/* Reset bit BITNO in bitset DST. */
|
||||
#define BITSET_RESET_(DST, BITNO) (DST)->b.ops->reset (DST, BITNO)
|
||||
|
||||
/* Return non-zero if bit BITNO in bitset SRC is set. */
|
||||
#define BITSET_TEST_(SRC, BITNO) (SRC)->b.ops->test (SRC, BITNO)
|
||||
|
||||
/* Free bitset SRC. */
|
||||
#define BITSET_FREE_(SRC)\
|
||||
((SRC)->b.ops->free ? (SRC)->b.ops->free (SRC) :(void)0)
|
||||
|
||||
/* Perform operation OP on DST. */
|
||||
#define BITSET_OP1_(DST, OP) (DST)->b.ops->op1 (DST, OP)
|
||||
|
||||
/* Perform operation OP on SRC and store in DST. */
|
||||
#define BITSET_OP2_(DST, SRC, OP) (DST)->b.ops->op2 (DST, SRC, OP)
|
||||
|
||||
/* DST = SRC1 OP SRC2. */
|
||||
#define BITSET_OP3_(DST, SRC1, SRC2, OP) \
|
||||
(DST)->b.ops->op3 (DST, SRC1, SRC2, OP)
|
||||
|
||||
/* DST = (SRC1 OP1 SRC2) OP2 SRC3. */
|
||||
#define BITSET_OP4_(DST, SRC1, SRC2, SRC3, OP) \
|
||||
(DST)->b.ops->op4 (DST, SRC1, SRC2, SRC3, OP)
|
||||
|
||||
/* DST = 0. */
|
||||
#define BITSET_ZERO_(DST) BITSET_OP1_ (DST, BITSET_OP_ZERO);
|
||||
|
||||
/* DST = ~0. */
|
||||
#define BITSET_ONES_(DST) BITSET_OP1_ (DST, BITSET_OP_ONES);
|
||||
|
||||
/* Return SRC == 0. */
|
||||
#define BITSET_EMPTY_P_(SRC) BITSET_OP1_ (SRC, BITSET_OP_EMPTY_P);
|
||||
|
||||
/* Return DST == SRC. */
|
||||
#define BITSET_EQUAL_P_(DST, SRC) BITSET_OP2_ (DST, SRC, BITSET_OP_EQUAL_P)
|
||||
|
||||
/* Return DST == DST | SRC. */
|
||||
#define BITSET_SUBSET_P_(DST, SRC) BITSET_OP2_ (DST, SRC, BITSET_OP_SUBSET_P)
|
||||
|
||||
/* Return DST & SRC == 0. */
|
||||
#define BITSET_DISJOINT_P_(DST, SRC)\
|
||||
BITSET_OP2_ (DST, SRC, BITSET_OP_DISJOINT_P)
|
||||
|
||||
/* DST = SRC. */
|
||||
#define BITSET_COPY_(DST, SRC) BITSET_OP2_ (DST, SRC, BITSET_OP_COPY)
|
||||
|
||||
/* DST = ~SRC. */
|
||||
#define BITSET_NOT_(DST, SRC) BITSET_OP2_ (DST, SRC, BITSET_OP_NOT)
|
||||
|
||||
/* DST = SRC1 | SRC2. */
|
||||
#define BITSET_OR_(DST, SRC1, SRC2) BITSET_OP3_ (DST, SRC1, SRC2,\
|
||||
BITSET_OP_OR)
|
||||
|
||||
/* DST = SRC1 ^ SRC2. */
|
||||
#define BITSET_XOR_(DST, SRC1, SRC2) BITSET_OP3_ (DST, SRC1, SRC2,\
|
||||
BITSET_OP_XOR)
|
||||
|
||||
/* DST = SRC1 & SRC2. */
|
||||
#define BITSET_AND_(DST, SRC1, SRC2) BITSET_OP3_ (DST, SRC1, SRC2, \
|
||||
BITSET_OP_AND)
|
||||
|
||||
/* DST = SRC1 & ~SRC2. */
|
||||
#define BITSET_ANDN_(DST, SRC1, SRC2) BITSET_OP3_ (DST, SRC1, SRC2, \
|
||||
BITSET_OP_ANDN)
|
||||
|
||||
/* DST = (SRC1 & SRC2) | SRC3. Return non-zero if
|
||||
DST != (SRC1 & SRC2) | SRC3. */
|
||||
#define BITSET_AND_OR_(DST, SRC1, SRC2, SRC3)\
|
||||
BITSET_OP4_ (DST, SRC1, SRC2, SRC3, BITSET_OP_AND_OR)
|
||||
|
||||
/* DST = (SRC1 | SRC2) & SRC3. Return non-zero if
|
||||
DST != (SRC1 | SRC2) & SRC3. */
|
||||
#define BITSET_OR_AND_(DST, SRC1, SRC2, SRC3)\
|
||||
BITSET_OP4_ (DST, SRC1, SRC2, SRC3, BITSET_OP_OR_AND)
|
||||
|
||||
/* DST = (SRC1 & ~SRC2) | SRC3. Return non-zero if
|
||||
DST != (SRC1 & ~SRC2) | SRC3. */
|
||||
#define BITSET_ANDN_OR_(DST, SRC1, SRC2, SRC3)\
|
||||
BITSET_OP4_ (DST, SRC1, SRC2, SRC3, BITSET_OP_ANDN_OR)
|
||||
|
||||
/* Find list of up to NUM bits set in BSET starting from and including
|
||||
*NEXT. Return with actual number of bits found and with *NEXT
|
||||
indicating where search stopped. */
|
||||
#define BITSET_LIST_(BSET, LIST, NUM, NEXT) \
|
||||
(BSET)->b.ops->list (BSET, LIST, NUM, NEXT)
|
||||
|
||||
/* Find reverse list of up to NUM bits set in BSET starting from and
|
||||
including NEXT. Return with actual number of bits found and with
|
||||
*NEXT indicating where search stopped. */
|
||||
#define BITSET_REVERSE_LIST_(BSET, LIST, NUM, NEXT) \
|
||||
(BSET)->b.ops->reverse_list (BSET, LIST, NUM, NEXT)
|
||||
|
||||
|
||||
struct bbitset_struct
|
||||
{
|
||||
struct bitset_ops_struct *ops;
|
||||
const struct bitset_vtable * vtable;
|
||||
bitset_windex cindex; /* Cache word index. */
|
||||
bitset_windex csize; /* Cache size in words. */
|
||||
bitset_word *cdata; /* Cache data pointer. */
|
||||
@@ -184,33 +103,55 @@ struct bbitset_struct
|
||||
};
|
||||
|
||||
|
||||
typedef struct bitset_struct *bitset;
|
||||
typedef union bitset_union *bitset;
|
||||
|
||||
|
||||
/* The contents of this structure should be considered private. */
|
||||
struct bitset_ops_struct
|
||||
struct bitset_vtable
|
||||
{
|
||||
void (*set) PARAMS ((struct bitset_struct *, bitset_bindex));
|
||||
void (*reset) PARAMS ((struct bitset_struct *, bitset_bindex));
|
||||
int (*test) PARAMS ((struct bitset_struct *, bitset_bindex));
|
||||
int (*size) PARAMS ((struct bitset_struct *));
|
||||
int (*op1) PARAMS ((struct bitset_struct *, enum bitset_ops));
|
||||
int (*op2) PARAMS ((struct bitset_struct *, struct bitset_struct *,
|
||||
enum bitset_ops));
|
||||
int (*op3) PARAMS ((struct bitset_struct *, struct bitset_struct *,
|
||||
struct bitset_struct *, enum bitset_ops));
|
||||
int (*op4) PARAMS ((struct bitset_struct *, struct bitset_struct *,
|
||||
struct bitset_struct *, struct bitset_struct *,
|
||||
enum bitset_ops));
|
||||
int (*list) PARAMS ((struct bitset_struct *, bitset_bindex *,
|
||||
bitset_bindex, bitset_bindex *));
|
||||
int (*reverse_list) PARAMS ((struct bitset_struct *, bitset_bindex *,
|
||||
bitset_bindex, bitset_bindex *));
|
||||
void (*free) PARAMS ((struct bitset_struct *));
|
||||
void (*set) PARAMS ((bitset, bitset_bindex));
|
||||
void (*reset) PARAMS ((bitset, bitset_bindex));
|
||||
int (*toggle) PARAMS ((bitset, bitset_bindex));
|
||||
int (*test) PARAMS ((bitset, bitset_bindex));
|
||||
bitset_bindex (*size) PARAMS ((bitset));
|
||||
bitset_bindex (*count) PARAMS ((bitset));
|
||||
|
||||
int (*empty_p) PARAMS ((bitset));
|
||||
void (*ones) PARAMS ((bitset));
|
||||
void (*zero) PARAMS ((bitset));
|
||||
|
||||
void (*copy) PARAMS ((bitset, bitset));
|
||||
int (*disjoint_p) PARAMS ((bitset, bitset));
|
||||
int (*equal_p) PARAMS ((bitset, bitset));
|
||||
void (*not) PARAMS ((bitset, bitset));
|
||||
int (*subset_p) PARAMS ((bitset, bitset));
|
||||
|
||||
void (*and) PARAMS ((bitset, bitset, bitset));
|
||||
int (*and_cmp) PARAMS ((bitset, bitset, bitset));
|
||||
void (*andn) PARAMS ((bitset, bitset, bitset));
|
||||
int (*andn_cmp) PARAMS ((bitset, bitset, bitset));
|
||||
void (*or) PARAMS ((bitset, bitset, bitset));
|
||||
int (*or_cmp) PARAMS ((bitset, bitset, bitset));
|
||||
void (*xor) PARAMS ((bitset, bitset, bitset));
|
||||
int (*xor_cmp) PARAMS ((bitset, bitset, bitset));
|
||||
|
||||
void (*and_or) PARAMS ((bitset, bitset, bitset, bitset));
|
||||
int (*and_or_cmp) PARAMS ((bitset, bitset, bitset, bitset));
|
||||
void (*andn_or) PARAMS ((bitset, bitset, bitset, bitset));
|
||||
int (*andn_or_cmp) PARAMS ((bitset, bitset, bitset, bitset));
|
||||
void (*or_and) PARAMS ((bitset, bitset, bitset, bitset));
|
||||
int (*or_and_cmp) PARAMS ((bitset, bitset, bitset, bitset));
|
||||
|
||||
bitset_bindex (*list) PARAMS ((bitset, bitset_bindex *,
|
||||
bitset_bindex, bitset_bindex *));
|
||||
bitset_bindex (*list_reverse) PARAMS ((bitset,
|
||||
bitset_bindex *, bitset_bindex,
|
||||
bitset_bindex *));
|
||||
void (*free) PARAMS ((bitset));
|
||||
enum bitset_type type;
|
||||
};
|
||||
|
||||
#define BITSET_COMPATIBLE_(BSET1, BSET2) ((BSET1)->b.ops == (BSET2)->b.ops)
|
||||
#define BITSET_COMPATIBLE_(BSET1, BSET2) ((BSET1)->b.vtable == (BSET2)->b.vtable)
|
||||
|
||||
#define BITSET_CHECK2_(DST, SRC) \
|
||||
if (!BITSET_COMPATIBLE_ (DST, SRC)) abort ();
|
||||
@@ -224,7 +165,130 @@ if (!BITSET_COMPATIBLE_ (DST, SRC1) || !BITSET_COMPATIBLE_ (DST, SRC2) \
|
||||
|| !BITSET_COMPATIBLE_ (DST, SRC3)) abort ();
|
||||
|
||||
|
||||
extern int bitset_op4 PARAMS ((bitset, bitset, bitset, bitset,
|
||||
enum bitset_ops op));
|
||||
/* Return size in bits of bitset SRC. */
|
||||
#define BITSET_SIZE_(SRC) (SRC)->b.vtable->size (SRC)
|
||||
|
||||
/* Return number of bits set in bitset SRC. */
|
||||
#define BITSET_COUNT_(SRC) (SRC)->b.vtable->count (SRC)
|
||||
|
||||
/* Return type of bitset SRC. */
|
||||
#define BITSET_TYPE_(DST) (DST)->b.vtable->type
|
||||
|
||||
/* Set bit BITNO in bitset DST. */
|
||||
#define BITSET_SET_(DST, BITNO) (DST)->b.vtable->set (DST, BITNO)
|
||||
|
||||
/* Reset bit BITNO in bitset DST. */
|
||||
#define BITSET_RESET_(DST, BITNO) (DST)->b.vtable->reset (DST, BITNO)
|
||||
|
||||
/* Toggle bit BITNO in bitset DST. */
|
||||
#define BITSET_TOGGLE_(DST, BITNO) (DST)->b.vtable->toggle (DST, BITNO)
|
||||
|
||||
/* Return non-zero if bit BITNO in bitset SRC is set. */
|
||||
#define BITSET_TEST_(SRC, BITNO) (SRC)->b.vtable->test (SRC, BITNO)
|
||||
|
||||
/* Free bitset SRC. */
|
||||
#define BITSET_FREE_(SRC)\
|
||||
((SRC)->b.vtable->free ? (SRC)->b.vtable->free (SRC) :(void)0)
|
||||
|
||||
|
||||
/* Return SRC == 0. */
|
||||
#define BITSET_EMPTY_P_(SRC) (SRC)->b.vtable->empty_p (SRC)
|
||||
|
||||
/* DST = ~0. */
|
||||
#define BITSET_ONES_(DST) (DST)->b.vtable->ones (DST)
|
||||
|
||||
/* DST = 0. */
|
||||
#define BITSET_ZERO_(DST) (DST)->b.vtable->zero (DST)
|
||||
|
||||
|
||||
|
||||
/* DST = SRC. */
|
||||
#define BITSET_COPY_(DST, SRC) (SRC)->b.vtable->copy (DST, SRC)
|
||||
|
||||
/* Return DST & SRC == 0. */
|
||||
#define BITSET_DISJOINT_P_(DST, SRC) (SRC)->b.vtable->disjoint_p (DST, SRC)
|
||||
|
||||
/* Return DST == SRC. */
|
||||
#define BITSET_EQUAL_P_(DST, SRC) (SRC)->b.vtable->equal_p (DST, SRC)
|
||||
|
||||
/* DST = ~SRC. */
|
||||
#define BITSET_NOT_(DST, SRC) (SRC)->b.vtable->not (DST, SRC)
|
||||
|
||||
/* Return DST == DST | SRC. */
|
||||
#define BITSET_SUBSET_P_(DST, SRC) (SRC)->b.vtable->subset_p (DST, SRC)
|
||||
|
||||
|
||||
/* DST = SRC1 & SRC2. */
|
||||
#define BITSET_AND_(DST, SRC1, SRC2) (SRC1)->b.vtable->and (DST, SRC1, SRC2)
|
||||
#define BITSET_AND_CMP_(DST, SRC1, SRC2) (SRC1)->b.vtable->and_cmp (DST, SRC1, SRC2)
|
||||
|
||||
/* DST = SRC1 & ~SRC2. */
|
||||
#define BITSET_ANDN_(DST, SRC1, SRC2) (SRC1)->b.vtable->andn (DST, SRC1, SRC2)
|
||||
#define BITSET_ANDN_CMP_(DST, SRC1, SRC2) (SRC1)->b.vtable->andn_cmp (DST, SRC1, SRC2)
|
||||
|
||||
/* DST = SRC1 | SRC2. */
|
||||
#define BITSET_OR_(DST, SRC1, SRC2) (SRC1)->b.vtable->or (DST, SRC1, SRC2)
|
||||
#define BITSET_OR_CMP_(DST, SRC1, SRC2) (SRC1)->b.vtable->or_cmp (DST, SRC1, SRC2)
|
||||
|
||||
/* DST = SRC1 ^ SRC2. */
|
||||
#define BITSET_XOR_(DST, SRC1, SRC2) (SRC1)->b.vtable->xor (DST, SRC1, SRC2)
|
||||
#define BITSET_XOR_CMP_(DST, SRC1, SRC2) (SRC1)->b.vtable->xor_cmp (DST, SRC1, SRC2)
|
||||
|
||||
|
||||
|
||||
/* DST = (SRC1 & SRC2) | SRC3. Return non-zero if
|
||||
DST != (SRC1 & SRC2) | SRC3. */
|
||||
#define BITSET_AND_OR_(DST, SRC1, SRC2, SRC3) \
|
||||
(SRC1)->b.vtable->and_or (DST, SRC1, SRC2, SRC3)
|
||||
#define BITSET_AND_OR_CMP_(DST, SRC1, SRC2, SRC3) \
|
||||
(SRC1)->b.vtable->and_or_cmp (DST, SRC1, SRC2, SRC3)
|
||||
|
||||
/* DST = (SRC1 & ~SRC2) | SRC3. Return non-zero if
|
||||
DST != (SRC1 & ~SRC2) | SRC3. */
|
||||
#define BITSET_ANDN_OR_(DST, SRC1, SRC2, SRC3) \
|
||||
(SRC1)->b.vtable->andn_or (DST, SRC1, SRC2, SRC3)
|
||||
#define BITSET_ANDN_OR_CMP_(DST, SRC1, SRC2, SRC3) \
|
||||
(SRC1)->b.vtable->andn_or_cmp (DST, SRC1, SRC2, SRC3)
|
||||
|
||||
/* DST = (SRC1 | SRC2) & SRC3. Return non-zero if
|
||||
DST != (SRC1 | SRC2) & SRC3. */
|
||||
#define BITSET_OR_AND_(DST, SRC1, SRC2, SRC3) \
|
||||
(SRC1)->b.vtable->or_and (DST, SRC1, SRC2, SRC3)
|
||||
#define BITSET_OR_AND_CMP_(DST, SRC1, SRC2, SRC3) \
|
||||
(SRC1)->b.vtable->or_and_cmp (DST, SRC1, SRC2, SRC3)
|
||||
|
||||
|
||||
/* Find list of up to NUM bits set in BSET starting from and including
|
||||
*NEXT. Return with actual number of bits found and with *NEXT
|
||||
indicating where search stopped. */
|
||||
#define BITSET_LIST_(BSET, LIST, NUM, NEXT) \
|
||||
(BSET)->b.vtable->list (BSET, LIST, NUM, NEXT)
|
||||
|
||||
/* Find reverse list of up to NUM bits set in BSET starting from and
|
||||
including NEXT. Return with actual number of bits found and with
|
||||
*NEXT indicating where search stopped. */
|
||||
#define BITSET_LIST_REVERSE_(BSET, LIST, NUM, NEXT) \
|
||||
(BSET)->b.vtable->list_reverse (BSET, LIST, NUM, NEXT)
|
||||
|
||||
|
||||
/* Private functions for bitset implementations. */
|
||||
|
||||
extern int bitset_toggle_ PARAMS ((bitset, bitset_bindex));
|
||||
|
||||
extern bitset_bindex bitset_count_ PARAMS ((bitset));
|
||||
|
||||
extern int bitset_copy_ PARAMS ((bitset, bitset));
|
||||
|
||||
extern void bitset_and_or_ PARAMS ((bitset, bitset, bitset, bitset));
|
||||
|
||||
extern int bitset_and_or_cmp_ PARAMS ((bitset, bitset, bitset, bitset));
|
||||
|
||||
extern void bitset_andn_or_ PARAMS ((bitset, bitset, bitset, bitset));
|
||||
|
||||
extern int bitset_andn_or_cmp_ PARAMS ((bitset, bitset, bitset, bitset));
|
||||
|
||||
extern void bitset_or_and_ PARAMS ((bitset, bitset, bitset, bitset));
|
||||
|
||||
extern int bitset_or_and_cmp_ PARAMS ((bitset, bitset, bitset, bitset));
|
||||
|
||||
#endif /* _BBITSET_H */
|
||||
|
||||
+144
-207
@@ -28,17 +28,20 @@
|
||||
#include "bitset_stats.h"
|
||||
#include "obstack.h"
|
||||
|
||||
const char * const bitset_type_names[] = BITSET_TYPE_NAMES;
|
||||
|
||||
static void bitset_print PARAMS ((FILE *, bitset, int));
|
||||
static int bitset_op4_cmp PARAMS ((bitset, bitset, bitset, bitset, int));
|
||||
|
||||
|
||||
/* Return number of bytes required to create a N_BIT bitset
|
||||
of TYPE. The bitset may grow to require more bytes than this. */
|
||||
int
|
||||
size_t
|
||||
bitset_bytes (type, n_bits)
|
||||
enum bitset_type type;
|
||||
enum_bitset_type type;
|
||||
bitset_bindex n_bits;
|
||||
{
|
||||
unsigned int bytes;
|
||||
size_t bytes;
|
||||
|
||||
if (bitset_stats_enabled)
|
||||
return bitset_stats_bytes ();
|
||||
@@ -70,7 +73,7 @@ bitset
|
||||
bitset_init (bset, n_bits, type)
|
||||
bitset bset;
|
||||
bitset_bindex n_bits;
|
||||
enum bitset_type type;
|
||||
enum_bitset_type type;
|
||||
{
|
||||
if (bitset_stats_enabled)
|
||||
return bitset_stats_init (bset, n_bits, type);
|
||||
@@ -108,10 +111,8 @@ bitset_type_choose (n_bits, attr)
|
||||
if (attr & BITSET_SPARSE && attr & BITSET_DENSE)
|
||||
abort ();
|
||||
|
||||
/* Note that sometimes we will be asked for a zero length
|
||||
fixed size bitset. */
|
||||
|
||||
/* Choose the type of bitset. */
|
||||
/* Choose the type of bitset. Note that sometimes we will be asked
|
||||
for a zero length fixed size bitset. */
|
||||
|
||||
type = BITSET_ARRAY;
|
||||
/* Currently, the simple bitsets do not support a variable size. */
|
||||
@@ -130,9 +131,9 @@ bitset_type_choose (n_bits, attr)
|
||||
bitset
|
||||
bitset_alloc (n_bits, type)
|
||||
bitset_bindex n_bits;
|
||||
enum bitset_type type;
|
||||
enum_bitset_type type;
|
||||
{
|
||||
unsigned int bytes;
|
||||
size_t bytes;
|
||||
bitset bset;
|
||||
|
||||
bytes = bitset_bytes (type, n_bits);
|
||||
@@ -152,9 +153,9 @@ bitset
|
||||
bitset_obstack_alloc (bobstack, n_bits, type)
|
||||
struct obstack *bobstack;
|
||||
bitset_bindex n_bits;
|
||||
enum bitset_type type;
|
||||
enum_bitset_type type;
|
||||
{
|
||||
unsigned int bytes;
|
||||
size_t bytes;
|
||||
bitset bset;
|
||||
|
||||
bytes = bitset_bytes (type, n_bits);
|
||||
@@ -215,9 +216,22 @@ bitset_type_get (bset)
|
||||
}
|
||||
|
||||
|
||||
/* Return name of bitset type. */
|
||||
const char *
|
||||
bitset_type_name_get (bset)
|
||||
bitset bset;
|
||||
{
|
||||
enum bitset_type type;
|
||||
|
||||
type = bitset_type_get (bset);
|
||||
|
||||
return bitset_type_names[type];
|
||||
}
|
||||
|
||||
|
||||
/* Find next bit set in SRC starting from and including BITNO.
|
||||
Return -1 if SRC empty. */
|
||||
int
|
||||
Return BITSET_BINDEX_MAX if SRC empty. */
|
||||
bitset_bindex
|
||||
bitset_next (src, bitno)
|
||||
bitset src;
|
||||
bitset_bindex bitno;
|
||||
@@ -226,14 +240,14 @@ bitset_next (src, bitno)
|
||||
bitset_bindex next = bitno;
|
||||
|
||||
if (!bitset_list (src, &val, 1, &next))
|
||||
return -1;
|
||||
return BITSET_BINDEX_MAX;
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
/* Find previous bit set in SRC starting from and including BITNO.
|
||||
Return -1 if SRC empty. */
|
||||
int
|
||||
Return BITSET_BINDEX_MAX if SRC empty. */
|
||||
bitset_bindex
|
||||
bitset_prev (src, bitno)
|
||||
bitset src;
|
||||
bitset_bindex bitno;
|
||||
@@ -241,14 +255,14 @@ bitset_prev (src, bitno)
|
||||
bitset_bindex val;
|
||||
bitset_bindex next = bitno;
|
||||
|
||||
if (!bitset_reverse_list (src, &val, 1, &next))
|
||||
return -1;
|
||||
if (!bitset_list_reverse (src, &val, 1, &next))
|
||||
return BITSET_BINDEX_MAX;
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
/* Find first set bit. */
|
||||
int
|
||||
bitset_bindex
|
||||
bitset_first (src)
|
||||
bitset src;
|
||||
{
|
||||
@@ -257,7 +271,7 @@ bitset_first (src)
|
||||
|
||||
|
||||
/* Find last set bit. */
|
||||
int
|
||||
bitset_bindex
|
||||
bitset_last (src)
|
||||
bitset src;
|
||||
{
|
||||
@@ -280,27 +294,6 @@ bitset_only_set_p (src, bitno)
|
||||
}
|
||||
|
||||
|
||||
/* Toggle bit BITNO in bitset BSET and return non-zero if now set. */
|
||||
int
|
||||
bitset_toggle (bset, bitno)
|
||||
bitset bset;
|
||||
bitset_bindex bitno;
|
||||
{
|
||||
/* This routine is for completeness. It could be optimized if
|
||||
required. */
|
||||
if (bitset_test (bset, bitno))
|
||||
{
|
||||
bitset_reset (bset, bitno);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
bitset_set (bset, bitno);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Print contents of bitset BSET to FILE. */
|
||||
static void
|
||||
bitset_print (file, bset, verbose)
|
||||
@@ -308,11 +301,13 @@ bitset_print (file, bset, verbose)
|
||||
bitset bset;
|
||||
int verbose;
|
||||
{
|
||||
unsigned int i, pos;
|
||||
unsigned int pos;
|
||||
bitset_bindex i;
|
||||
bitset_iterator iter;
|
||||
|
||||
if (verbose)
|
||||
fprintf (file, "n_bits = %d, set = {", bitset_size (bset));
|
||||
fprintf (file, "n_bits = %lu, set = {",
|
||||
(unsigned long) bitset_size (bset));
|
||||
|
||||
pos = 30;
|
||||
BITSET_FOR_EACH (iter, bset, i, 0)
|
||||
@@ -332,48 +327,57 @@ bitset_print (file, bset, verbose)
|
||||
}
|
||||
|
||||
|
||||
/* DST = SRC. Return non-zero if DST != SRC. */
|
||||
int
|
||||
bitset_copy (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
/* Dump bitset BSET to FILE. */
|
||||
void
|
||||
bitset_dump (file, bset)
|
||||
FILE *file;
|
||||
bitset bset;
|
||||
{
|
||||
unsigned int i;
|
||||
bitset_iterator iter;
|
||||
|
||||
if (BITSET_COMPATIBLE_ (dst, src))
|
||||
return BITSET_COPY_ (dst, src);
|
||||
|
||||
/* Convert bitset types. We assume that the DST bitset
|
||||
is large enough to hold the SRC bitset. */
|
||||
bitset_zero (dst);
|
||||
BITSET_FOR_EACH (iter, src, i, 0)
|
||||
{
|
||||
bitset_set (dst, i);
|
||||
};
|
||||
|
||||
return 1;
|
||||
bitset_print (file, bset, 0);
|
||||
}
|
||||
|
||||
|
||||
/* Return size in bits of bitset SRC. */
|
||||
int
|
||||
bitset_size (src)
|
||||
bitset src;
|
||||
|
||||
/* Release memory associated with bitsets. */
|
||||
void
|
||||
bitset_release_memory ()
|
||||
{
|
||||
return BITSET_SIZE_ (src);
|
||||
lbitset_release_memory ();
|
||||
ebitset_release_memory ();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Toggle bit BITNO in bitset BSET and return non-zero if not set. */
|
||||
int
|
||||
bitset_toggle_ (bset, bitno)
|
||||
bitset bset;
|
||||
bitset_bindex bitno;
|
||||
{
|
||||
/* This routine is for completeness. It could be optimized if
|
||||
required. */
|
||||
if (bitset_test (bset, bitno))
|
||||
{
|
||||
bitset_reset (bset, bitno);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
bitset_set (bset, bitno);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Return number of bits set in bitset SRC. */
|
||||
int
|
||||
bitset_count (src)
|
||||
bitset_bindex
|
||||
bitset_count_ (src)
|
||||
bitset src;
|
||||
{
|
||||
bitset_bindex list[BITSET_LIST_SIZE];
|
||||
bitset_bindex next;
|
||||
int num;
|
||||
int count;
|
||||
bitset_bindex num;
|
||||
bitset_bindex count;
|
||||
|
||||
/* This could be greatly sped up by adding a count method for each
|
||||
bitset implementation that uses a direct technique (based on
|
||||
@@ -388,148 +392,64 @@ bitset_count (src)
|
||||
}
|
||||
|
||||
|
||||
/* DST = 0. */
|
||||
/* DST = SRC. Return non-zero if DST != SRC.
|
||||
This is a fallback for the case where SRC and DST are different
|
||||
bitset types. */
|
||||
int
|
||||
bitset_zero (dst)
|
||||
bitset dst;
|
||||
{
|
||||
return BITSET_ZERO_ (dst);
|
||||
}
|
||||
|
||||
|
||||
/* DST = ~0. */
|
||||
int
|
||||
bitset_ones (dst)
|
||||
bitset dst;
|
||||
{
|
||||
return BITSET_ONES_ (dst);
|
||||
}
|
||||
|
||||
|
||||
/* Return SRC == 0. */
|
||||
int
|
||||
bitset_empty_p (src)
|
||||
bitset src;
|
||||
{
|
||||
return BITSET_EMPTY_P_ (src);
|
||||
}
|
||||
|
||||
|
||||
/* Return DST == DST | SRC. */
|
||||
int
|
||||
bitset_subset_p (dst, src)
|
||||
bitset_copy_ (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
{
|
||||
return BITSET_SUBSET_P_ (dst, src);
|
||||
}
|
||||
bitset_bindex i;
|
||||
bitset_iterator iter;
|
||||
|
||||
/* Convert bitset types. We assume that the DST bitset
|
||||
is large enough to hold the SRC bitset. */
|
||||
bitset_zero (dst);
|
||||
BITSET_FOR_EACH (iter, src, i, 0)
|
||||
{
|
||||
bitset_set (dst, i);
|
||||
};
|
||||
|
||||
/* Return DST == SRC. */
|
||||
int
|
||||
bitset_equal_p (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
{
|
||||
return BITSET_EQUAL_P_ (dst, src);
|
||||
}
|
||||
|
||||
|
||||
/* Return DST & SRC == 0. */
|
||||
int
|
||||
bitset_disjoint_p (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
{
|
||||
return BITSET_DISJOINT_P_ (dst, src);
|
||||
}
|
||||
|
||||
|
||||
/* DST = ~SRC. */
|
||||
int
|
||||
bitset_not (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
{
|
||||
return BITSET_NOT_ (dst, src);
|
||||
}
|
||||
|
||||
|
||||
/* DST = SRC1 | SRC2. Return non-zero if DST != SRC1 | SRC2. */
|
||||
int
|
||||
bitset_or (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
return BITSET_OR_ (dst, src1, src2);
|
||||
}
|
||||
|
||||
|
||||
/* DST = SRC1 & SRC2. Return non-zero if DST != SRC1 & SRC2. */
|
||||
int
|
||||
bitset_and (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
return BITSET_AND_ (dst, src1, src2);
|
||||
}
|
||||
|
||||
|
||||
/* DST = SRC1 ^ SRC2. Return non-zero if DST != SRC1 ^ SRC2. */
|
||||
int
|
||||
bitset_xor (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
return BITSET_XOR_ (dst, src1, src2);
|
||||
}
|
||||
|
||||
|
||||
/* DST = SRC1 & ~SRC2. Return non-zero if DST != SRC1 & ~SRC2. */
|
||||
int
|
||||
bitset_andn (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
return BITSET_ANDN_ (dst, src1, src2);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* This is a fallback for implementations that do not support
|
||||
four operand operations. */
|
||||
int
|
||||
bitset_op4 (dst, src1, src2, src3, op)
|
||||
static inline int
|
||||
bitset_op4_cmp (dst, src1, src2, src3, op)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
bitset src3;
|
||||
enum bitset_ops op;
|
||||
enum_bitset_ops op;
|
||||
{
|
||||
int changed = 0;
|
||||
int stats_enabled_save;
|
||||
bitset tmp;
|
||||
|
||||
/* Create temporary bitset. */
|
||||
stats_enabled_save = bitset_stats_enabled;
|
||||
bitset_stats_enabled = 0;
|
||||
tmp = bitset_alloc (0, bitset_type_get (dst));
|
||||
bitset_stats_enabled = stats_enabled_save;
|
||||
|
||||
switch (op)
|
||||
{
|
||||
case BITSET_OP_OR_AND:
|
||||
BITSET_OR_ (tmp, src1, src2);
|
||||
changed = BITSET_AND_ (dst, src3, tmp);
|
||||
bitset_or (tmp, src1, src2);
|
||||
changed = bitset_and_cmp (dst, src3, tmp);
|
||||
break;
|
||||
|
||||
case BITSET_OP_AND_OR:
|
||||
BITSET_AND_ (tmp, src1, src2);
|
||||
changed = BITSET_OR_ (dst, src3, tmp);
|
||||
bitset_and (tmp, src1, src2);
|
||||
changed = bitset_or_cmp (dst, src3, tmp);
|
||||
break;
|
||||
|
||||
case BITSET_OP_ANDN_OR:
|
||||
BITSET_ANDN_ (tmp, src1, src2);
|
||||
changed = BITSET_OR_ (dst, src3, tmp);
|
||||
bitset_andn (tmp, src1, src2);
|
||||
changed = bitset_or_cmp (dst, src3, tmp);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -541,52 +461,78 @@ bitset_op4 (dst, src1, src2, src3, op)
|
||||
}
|
||||
|
||||
|
||||
/* DST = (SRC1 | SRC2) & SRC3. Return non-zero if
|
||||
DST != (SRC1 | SRC2) & SRC3. */
|
||||
int
|
||||
bitset_or_and (dst, src1, src2, src3)
|
||||
/* DST = (SRC1 & SRC2) | SRC3. */
|
||||
void
|
||||
bitset_and_or_ (dst, src1, src2, src3)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
bitset src3;
|
||||
{
|
||||
return BITSET_OR_AND_ (dst, src1, src2, src3);
|
||||
bitset_and_or_cmp_ (dst, src1, src2, src3);
|
||||
}
|
||||
|
||||
|
||||
/* DST = (SRC1 & SRC2) | SRC3. Return non-zero if
|
||||
DST != (SRC1 & SRC2) | SRC3. */
|
||||
int
|
||||
bitset_and_or (dst, src1, src2, src3)
|
||||
bitset_and_or_cmp_ (dst, src1, src2, src3)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
bitset src3;
|
||||
{
|
||||
return BITSET_AND_OR_ (dst, src1, src2, src3);
|
||||
return bitset_op4_cmp (dst, src1, src2, src3, BITSET_OP_AND_OR);
|
||||
}
|
||||
|
||||
|
||||
/* DST = (SRC1 & ~SRC2) | SRC3. */
|
||||
void
|
||||
bitset_andn_or_ (dst, src1, src2, src3)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
bitset src3;
|
||||
{
|
||||
bitset_andn_or_cmp_ (dst, src1, src2, src3);
|
||||
}
|
||||
|
||||
|
||||
/* DST = (SRC1 & ~SRC2) | SRC3. Return non-zero if
|
||||
DST != (SRC1 & ~SRC2) | SRC3. */
|
||||
int
|
||||
bitset_andn_or (dst, src1, src2, src3)
|
||||
bitset_andn_or_cmp_ (dst, src1, src2, src3)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
bitset src3;
|
||||
{
|
||||
return BITSET_ANDN_OR_ (dst, src1, src2, src3);
|
||||
return bitset_op4_cmp (dst, src1, src2, src3, BITSET_OP_ANDN_OR);
|
||||
}
|
||||
|
||||
|
||||
/* Dump bitset BSET to FILE. */
|
||||
/* DST = (SRC1 | SRC2) & SRC3. */
|
||||
void
|
||||
bitset_dump (file, bset)
|
||||
FILE *file;
|
||||
bitset bset;
|
||||
bitset_or_and_ (dst, src1, src2, src3)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
bitset src3;
|
||||
{
|
||||
bitset_print (file, bset, 0);
|
||||
bitset_or_and_cmp_ (dst, src1, src2, src3);
|
||||
}
|
||||
|
||||
|
||||
/* DST = (SRC1 | SRC2) & SRC3. Return non-zero if
|
||||
DST != (SRC1 | SRC2) & SRC3. */
|
||||
int
|
||||
bitset_or_and_cmp_ (dst, src1, src2, src3)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
bitset src3;
|
||||
{
|
||||
return bitset_op4_cmp (dst, src1, src2, src3, BITSET_OP_OR_AND);
|
||||
}
|
||||
|
||||
|
||||
@@ -598,12 +544,3 @@ debug_bitset (bset)
|
||||
if (bset)
|
||||
bitset_print (stderr, bset, 1);
|
||||
}
|
||||
|
||||
|
||||
/* Release memory associated with bitsets. */
|
||||
void
|
||||
bitset_release_memory ()
|
||||
{
|
||||
lbitset_release_memory ();
|
||||
ebitset_release_memory ();
|
||||
}
|
||||
|
||||
+166
-67
@@ -32,16 +32,46 @@ enum bitset_attr {BITSET_FIXED = 1, /* Bitset size fixed. */
|
||||
BITSET_DENSE = 4, /* Bitset dense. */
|
||||
BITSET_SPARSE = 8, /* Bitset sparse. */
|
||||
BITSET_FRUGAL = 16, /* Prefer most compact. */
|
||||
BITSET_GREEDY = 32}; /* Prefer fastest. */
|
||||
BITSET_GREEDY = 32}; /* Prefer fastest at memory expense. */
|
||||
|
||||
typedef unsigned int bitset_attrs;
|
||||
|
||||
/* The contents of the structure should be considered to be private.
|
||||
While I would like to make this structure opaque, it needs to be
|
||||
visible for the inline bit set/test functions. */
|
||||
struct bitset_struct
|
||||
/* The contents of the union should be considered to be private.
|
||||
While I would like to make this union opaque, it needs to be
|
||||
visible for the inline bit set/test functions, and for delegation
|
||||
to the proper implementation. */
|
||||
union bitset_union
|
||||
{
|
||||
/* This must be the first member of every other structure that is a
|
||||
member of this union. */
|
||||
struct bbitset_struct b;
|
||||
|
||||
struct abitset_struct
|
||||
{
|
||||
struct bbitset_struct b;
|
||||
bitset_bindex n_bits; /* Number of bits. */
|
||||
bitset_word words[1]; /* The array of bits. */
|
||||
} a;
|
||||
|
||||
struct ebitset_struct
|
||||
{
|
||||
struct bbitset_struct b;
|
||||
bitset_windex size; /* Number of elements. */
|
||||
struct ebitset_elt_struct **elts; /* Expanding array of ptrs to elts. */
|
||||
} e;
|
||||
|
||||
struct lbitset_struct
|
||||
{
|
||||
struct bbitset_struct b;
|
||||
struct lbitset_elt_struct *head; /* First element in linked list. */
|
||||
struct lbitset_elt_struct *tail; /* Last element in linked list. */
|
||||
} l;
|
||||
|
||||
struct bitset_stats_struct
|
||||
{
|
||||
struct bbitset_struct b;
|
||||
bitset bset;
|
||||
} s;
|
||||
};
|
||||
|
||||
|
||||
@@ -51,16 +81,16 @@ typedef struct
|
||||
{
|
||||
bitset_bindex list[BITSET_LIST_SIZE];
|
||||
bitset_bindex next;
|
||||
int num;
|
||||
int i;
|
||||
bitset_bindex num;
|
||||
bitset_bindex i;
|
||||
} bitset_iterator;
|
||||
|
||||
|
||||
/* Return bytes required for bitset of desired type and size. */
|
||||
extern int bitset_bytes PARAMS ((enum bitset_type, bitset_bindex));
|
||||
extern size_t bitset_bytes PARAMS ((enum_bitset_type, bitset_bindex));
|
||||
|
||||
/* Initialise a bitset with desired type and size. */
|
||||
extern bitset bitset_init PARAMS ((bitset, bitset_bindex, enum bitset_type));
|
||||
extern bitset bitset_init PARAMS ((bitset, bitset_bindex, enum_bitset_type));
|
||||
|
||||
/* Select an implementation type based on the desired bitset size
|
||||
and attributes. */
|
||||
@@ -68,7 +98,7 @@ extern enum bitset_type bitset_type_choose PARAMS ((bitset_bindex,
|
||||
bitset_attrs));
|
||||
|
||||
/* Create a bitset of desired type and size. The bitset is zeroed. */
|
||||
extern bitset bitset_alloc PARAMS ((bitset_bindex, enum bitset_type));
|
||||
extern bitset bitset_alloc PARAMS ((bitset_bindex, enum_bitset_type));
|
||||
|
||||
/* Free bitset. */
|
||||
extern void bitset_free PARAMS ((bitset));
|
||||
@@ -76,7 +106,7 @@ extern void bitset_free PARAMS ((bitset));
|
||||
/* Create a bitset of desired type and size using an obstack. The
|
||||
bitset is zeroed. */
|
||||
extern bitset bitset_obstack_alloc PARAMS ((struct obstack *bobstack,
|
||||
bitset_bindex, enum bitset_type));
|
||||
bitset_bindex, enum_bitset_type));
|
||||
|
||||
/* Free bitset allocated on obstack. */
|
||||
extern void bitset_obstack_free PARAMS ((bitset));
|
||||
@@ -84,15 +114,12 @@ extern void bitset_obstack_free PARAMS ((bitset));
|
||||
/* Create a bitset of desired size and attributes. The bitset is zeroed. */
|
||||
extern bitset bitset_create PARAMS ((bitset_bindex, bitset_attrs));
|
||||
|
||||
/* Return size in bits of bitset SRC. */
|
||||
extern int bitset_size PARAMS ((bitset));
|
||||
|
||||
/* Return number of bits set in bitset SRC. */
|
||||
extern int bitset_count PARAMS ((bitset));
|
||||
|
||||
/* Return bitset type. */
|
||||
extern enum bitset_type bitset_type_get PARAMS ((bitset));
|
||||
|
||||
/* Return bitset type name. */
|
||||
extern const char *bitset_type_name_get PARAMS ((bitset));
|
||||
|
||||
#if BITSET_INLINE
|
||||
static inline void bitset_set PARAMS ((bitset, bitset_bindex));
|
||||
static inline void bitset_reset PARAMS ((bitset, bitset_bindex));
|
||||
@@ -169,9 +196,9 @@ do \
|
||||
bitset_windex _index = _bitno / BITSET_WORD_BITS; \
|
||||
bitset_windex _offset = _index - (bset)->b.cindex; \
|
||||
\
|
||||
if (_offset < (bset)->b.csize) \
|
||||
if (_offset < (bset)->b.csize) \
|
||||
(bset)->b.cdata[_offset] &= \
|
||||
~((bitset_word) 1 << (_bitno % BITSET_WORD_BITS)); \
|
||||
~((bitset_word) 1 << (_bitno % BITSET_WORD_BITS)); \
|
||||
else \
|
||||
BITSET_RESET_ ((bset), _bitno); \
|
||||
} while (0)
|
||||
@@ -179,98 +206,148 @@ do \
|
||||
|
||||
/* Test bit BITNO in bitset BSET. */
|
||||
#define bitset_test(bset, bitno) \
|
||||
(((((bitno) / BITSET_WORD_BITS) - (bset)->b.cindex) < (bset)->b.csize) \
|
||||
? (((int) \
|
||||
((bset)->b.cdata[(((bitno) / BITSET_WORD_BITS) - (bset)->b.cindex)] \
|
||||
>> ((bitno) % BITSET_WORD_BITS))) \
|
||||
& 1) \
|
||||
: BITSET_TEST_ ((bset), (bitno)))
|
||||
(((((bitno) / BITSET_WORD_BITS) - (bset)->b.cindex) < (bset)->b.csize) \
|
||||
? ((bset)->b.cdata[(((bitno) / BITSET_WORD_BITS) - (bset)->b.cindex)] \
|
||||
>> ((bitno) % BITSET_WORD_BITS)) & 1 \
|
||||
: (unsigned int) BITSET_TEST_ ((bset), (bitno)))
|
||||
#endif
|
||||
|
||||
|
||||
/* Toggle bit BITNO in bitset BSET and return non-zero if now set. */
|
||||
extern int bitset_toggle PARAMS ((bitset, bitset_bindex));
|
||||
#define bitset_toggle(bset, bitno) BITSET_TOGGLE_ (bset, bitno)
|
||||
|
||||
/* DST = 0. */
|
||||
extern int bitset_zero PARAMS ((bitset));
|
||||
/* Return size in bits of bitset SRC. */
|
||||
#define bitset_size(SRC) BITSET_SIZE_ (SRC)
|
||||
|
||||
/* Return number of bits set in bitset SRC. */
|
||||
#define bitset_count(SRC) BITSET_COUNT_ (SRC)
|
||||
|
||||
|
||||
/* Return SRC == 0. */
|
||||
#define bitset_empty_p(SRC) BITSET_EMPTY_P_ (SRC)
|
||||
|
||||
/* DST = ~0. */
|
||||
extern int bitset_ones PARAMS ((bitset));
|
||||
#define bitset_ones(DST) BITSET_ONES_ (DST)
|
||||
|
||||
/* Return non-zero if all bits in bitset SRC are reset. */
|
||||
extern int bitset_empty_p PARAMS ((bitset));
|
||||
/* DST = 0. */
|
||||
#define bitset_zero(DST) BITSET_ZERO_ (DST)
|
||||
|
||||
/* Return DST == DST | SRC. */
|
||||
extern int bitset_subset_p PARAMS ((bitset, bitset));
|
||||
|
||||
/* Return DST == SRC. */
|
||||
extern int bitset_equal_p PARAMS ((bitset, bitset));
|
||||
|
||||
/* DST = SRC. */
|
||||
#define bitset_copy(DST, SRC) BITSET_COPY_ (DST, SRC)
|
||||
|
||||
/* Return DST & SRC == 0. */
|
||||
extern int bitset_disjoint_p PARAMS ((bitset, bitset));
|
||||
#define bitset_disjoint_p(DST, SRC) BITSET_DISJOINT_P_ (DST, SRC)
|
||||
|
||||
/* DST == SRC. */
|
||||
extern int bitset_copy PARAMS ((bitset, bitset));
|
||||
/* Return DST == SRC. */
|
||||
#define bitset_equal_p(DST, SRC) BITSET_EQUAL_P_ (DST, SRC)
|
||||
|
||||
/* DST = ~SRC. */
|
||||
extern int bitset_not PARAMS ((bitset, bitset));
|
||||
#define bitset_not(DST, SRC) BITSET_NOT_ (DST, SRC)
|
||||
|
||||
/* DST = SRC1 | SRC2. Return non-zero if DST != SRC1 | SRC2. */
|
||||
extern int bitset_or PARAMS ((bitset, bitset, bitset));
|
||||
/* Return DST == DST | SRC. */
|
||||
#define bitset_subset_p(DST, SRC) BITSET_SUBSET_P_ (DST, SRC)
|
||||
|
||||
|
||||
|
||||
/* DST = SRC1 & SRC2. */
|
||||
#define bitset_and(DST, SRC1, SRC2) BITSET_AND_ (DST, SRC1, SRC2)
|
||||
|
||||
/* DST = SRC1 & SRC2. Return non-zero if DST != SRC1 & SRC2. */
|
||||
extern int bitset_and PARAMS ((bitset, bitset, bitset));
|
||||
#define bitset_and_cmp(DST, SRC1, SRC2) BITSET_AND_CMP_ (DST, SRC1, SRC2)
|
||||
|
||||
/* DST = SRC1 ^ SRC2. Return non-zero if DST != SRC1 ^ SRC2. */
|
||||
extern int bitset_xor PARAMS ((bitset, bitset, bitset));
|
||||
/* DST = SRC1 & ~SRC2. */
|
||||
#define bitset_andn(DST, SRC1, SRC2) BITSET_ANDN_ (DST, SRC1, SRC2)
|
||||
|
||||
/* DST = SRC1 & ~SRC2. Return non-zero if DST != SRC1 & ~SRC2. */
|
||||
extern int bitset_andn PARAMS ((bitset, bitset, bitset));
|
||||
#define bitset_andn_cmp(DST, SRC1, SRC2) BITSET_ANDN_CMP_ (DST, SRC1, SRC2)
|
||||
|
||||
/* DST = (SRC1 | SRC2) & SRC3. Return non-zero if
|
||||
DST != (SRC1 | SRC2) & SRC3. */
|
||||
extern int bitset_or_and PARAMS ((bitset, bitset, bitset, bitset));
|
||||
/* DST = SRC1 | SRC2. */
|
||||
#define bitset_or(DST, SRC1, SRC2) BITSET_OR_ (DST, SRC1, SRC2)
|
||||
|
||||
/* DST = SRC1 | SRC2. Return non-zero if DST != SRC1 | SRC2. */
|
||||
#define bitset_or_cmp(DST, SRC1, SRC2) BITSET_OR_CMP_ (DST, SRC1, SRC2)
|
||||
|
||||
/* DST = SRC1 ^ SRC2. */
|
||||
#define bitset_xor(DST, SRC1, SRC2) BITSET_XOR_ (DST, SRC1, SRC2)
|
||||
|
||||
/* DST = SRC1 ^ SRC2. Return non-zero if DST != SRC1 ^ SRC2. */
|
||||
#define bitset_xor_cmp(DST, SRC1, SRC2) BITSET_XOR_CMP_ (DST, SRC1, SRC2)
|
||||
|
||||
|
||||
|
||||
/* DST = (SRC1 & SRC2) | SRC3. */
|
||||
#define bitset_and_or(DST, SRC1, SRC2, SRC3) \
|
||||
BITSET_AND_OR_ (DST, SRC1, SRC2, SRC3)
|
||||
|
||||
/* DST = (SRC1 & SRC2) | SRC3. Return non-zero if
|
||||
DST != (SRC1 & SRC2) | SRC3. */
|
||||
extern int bitset_and_or PARAMS ((bitset, bitset, bitset, bitset));
|
||||
#define bitset_and_or_cmp(DST, SRC1, SRC2, SRC3) \
|
||||
BITSET_AND_OR_CMP_ (DST, SRC1, SRC2, SRC3)
|
||||
|
||||
/* DST = (SRC1 & ~SRC2) | SRC3. */
|
||||
#define bitset_andn_or(DST, SRC1, SRC2, SRC3) \
|
||||
BITSET_ANDN_OR_ (DST, SRC1, SRC2, SRC3)
|
||||
|
||||
/* DST = (SRC1 & ~SRC2) | SRC3. Return non-zero if
|
||||
DST != (SRC1 & ~SRC2) | SRC3. */
|
||||
extern int bitset_andn_or PARAMS ((bitset, bitset, bitset, bitset));
|
||||
#define bitset_andn_or_cmp(DST, SRC1, SRC2, SRC3) \
|
||||
BITSET_ANDN_OR_CMP_ (DST, SRC1, SRC2, SRC3)
|
||||
|
||||
/* Find next bit set in BSET starting from and including BITNO. */
|
||||
extern int bitset_next PARAMS ((bitset, bitset_bindex));
|
||||
/* DST = (SRC1 | SRC2) & SRC3. */
|
||||
#define bitset_or_and(DST, SRC1, SRC2, SRC3)\
|
||||
BITSET_OR_AND_ (DST, SRC1, SRC2, SRC3)
|
||||
|
||||
/* Find previous bit set in BSET starting from and including BITNO. */
|
||||
extern int bitset_prev PARAMS ((bitset, bitset_bindex));
|
||||
|
||||
/* Return non-zero if BITNO in SRC is the only set bit. */
|
||||
extern int bitset_only_set_p PARAMS ((bitset, bitset_bindex));
|
||||
/* DST = (SRC1 | SRC2) & SRC3. Return non-zero if
|
||||
DST != (SRC1 | SRC2) & SRC3. */
|
||||
#define bitset_or_and_cmp(DST, SRC1, SRC2, SRC3)\
|
||||
BITSET_OR_AND_CMP_ (DST, SRC1, SRC2, SRC3)
|
||||
|
||||
/* Find list of up to NUM bits set in BSET starting from and including
|
||||
*NEXT. Return with actual number of bits found and with *NEXT
|
||||
indicating where search stopped. */
|
||||
#define bitset_list(BSET, LIST, NUM, NEXT) \
|
||||
BITSET_LIST_ (BSET, LIST, NUM, NEXT)
|
||||
BITSET_LIST_ (BSET, LIST, NUM, NEXT)
|
||||
|
||||
/* Find reverse list of up to NUM bits set in BSET starting from and
|
||||
including NEXT. Return with actual number of bits found and with
|
||||
*NEXT indicating where search stopped. */
|
||||
#define bitset_reverse_list(BSET, LIST, NUM, NEXT) \
|
||||
BITSET_REVERSE_LIST_ (BSET, LIST, NUM, NEXT)
|
||||
#define bitset_list_reverse(BSET, LIST, NUM, NEXT) \
|
||||
BITSET_LIST_REVERSE_ (BSET, LIST, NUM, NEXT)
|
||||
|
||||
|
||||
/* Find next set bit. */
|
||||
extern bitset_bindex bitset_next PARAMS ((bitset, bitset_bindex));
|
||||
|
||||
/* Find previous set bit. */
|
||||
extern bitset_bindex bitset_prev PARAMS ((bitset, bitset_bindex));
|
||||
|
||||
/* Find first set bit. */
|
||||
extern int bitset_first PARAMS ((bitset));
|
||||
extern bitset_bindex bitset_first PARAMS ((bitset));
|
||||
|
||||
/* Find last set bit. */
|
||||
extern int bitset_last PARAMS ((bitset));
|
||||
extern bitset_bindex bitset_last PARAMS ((bitset));
|
||||
|
||||
/* Return nonzero if this is the only set bit. */
|
||||
extern int bitset_only_set_p PARAMS ((bitset, bitset_bindex));
|
||||
|
||||
/* Dump bitset. */
|
||||
extern void bitset_dump PARAMS ((FILE *, bitset));
|
||||
|
||||
/* Loop over all elements of BSET, starting with MIN, setting BIT
|
||||
to the index of each set bit. */
|
||||
to the index of each set bit. For example, the following will print
|
||||
the bits set in a bitset:
|
||||
|
||||
bitset_bindex i;
|
||||
bitset_iterator iter;
|
||||
|
||||
bitset_zero (dst);
|
||||
BITSET_FOR_EACH (iter, src, i, 0)
|
||||
{
|
||||
printf ("%ld ", i);
|
||||
};
|
||||
*/
|
||||
#define BITSET_FOR_EACH(ITER, BSET, BIT, MIN) \
|
||||
for (ITER.next = (MIN), ITER.num = BITSET_LIST_SIZE; \
|
||||
(ITER.num == BITSET_LIST_SIZE) \
|
||||
@@ -280,7 +357,18 @@ extern void bitset_dump PARAMS ((FILE *, bitset));
|
||||
|
||||
|
||||
/* Loop over all elements of BSET, in reverse order starting with
|
||||
MIN, setting BIT to the index of each set bit. */
|
||||
MIN, setting BIT to the index of each set bit. For example, the
|
||||
following will print the bits set in a bitset in reverse order:
|
||||
|
||||
bitset_bindex i;
|
||||
bitset_iterator iter;
|
||||
|
||||
bitset_zero (dst);
|
||||
BITSET_FOR_EACH_REVERSE (iter, src, i, 0)
|
||||
{
|
||||
printf ("%ld ", i);
|
||||
};
|
||||
*/
|
||||
#define BITSET_FOR_EACH_REVERSE(ITER, BSET, BIT, MIN) \
|
||||
for (ITER.next = (MIN), ITER.num = BITSET_LIST_SIZE; \
|
||||
(ITER.num == BITSET_LIST_SIZE) \
|
||||
@@ -291,14 +379,25 @@ extern void bitset_dump PARAMS ((FILE *, bitset));
|
||||
|
||||
/* Define set operations in terms of logical operations. */
|
||||
|
||||
#define bitset_diff(DST, SRC1, SRC2) bitset_andn (DST, SRC1, SRC2)
|
||||
#define bitset_diff(DST, SRC1, SRC2) bitset_andn (DST, SRC1, SRC2)
|
||||
#define bitset_diff_cmp(DST, SRC1, SRC2) bitset_andn_cmp (DST, SRC1, SRC2)
|
||||
|
||||
#define bitset_intersection(DST, SRC1, SRC2) bitset_and (DST, SRC1, SRC2)
|
||||
#define bitset_intersection(DST, SRC1, SRC2) bitset_and (DST, SRC1, SRC2)
|
||||
#define bitset_intersection_cmp(DST, SRC1, SRC2) bitset_and_cmp (DST, SRC1, SRC2)
|
||||
|
||||
#define bitset_union(DST, SRC1, SRC2) bitset_or (DST, SRC1, SRC2)
|
||||
#define bitset_union(DST, SRC1, SRC2) bitset_or (DST, SRC1, SRC2)
|
||||
#define bitset_union_cmp(DST, SRC1, SRC2) bitset_or_cmp (DST, SRC1, SRC2)
|
||||
|
||||
/* Symmetrical difference. */
|
||||
#define bitset_symdiff(DST, SRC1, SRC2) bitset_xor (DST, SRC1, SRC2)
|
||||
#define bitset_symdiff_cmp(DST, SRC1, SRC2) bitset_xor_cmp (DST, SRC1, SRC2)
|
||||
|
||||
/* Union of difference. */
|
||||
#define bitset_diff_union(DST, SRC1, SRC2, SRC3) \
|
||||
bitset_andn_or (DST, SRC1, SRC2, SRC3)
|
||||
#define bitset_diff_union_cmp(DST, SRC1, SRC2, SRC3) \
|
||||
bitset_andn_or_cmp (DST, SRC1, SRC2, SRC3)
|
||||
|
||||
|
||||
|
||||
/* Release any memory tied up with bitsets. */
|
||||
|
||||
+307
-74
@@ -75,19 +75,6 @@
|
||||
bitset_stats_info->types[BITSET_TYPE_ (BSET)].list_density[(I)]++
|
||||
|
||||
|
||||
typedef struct bitset_stats_struct
|
||||
{
|
||||
bitset bset;
|
||||
} *bitset_stats;
|
||||
|
||||
|
||||
struct bitset_struct
|
||||
{
|
||||
struct bbitset_struct b;
|
||||
struct bitset_stats_struct s;
|
||||
};
|
||||
|
||||
|
||||
struct bitset_type_info_struct
|
||||
{
|
||||
unsigned int allocs;
|
||||
@@ -118,16 +105,36 @@ int bitset_stats_enabled = 0;
|
||||
|
||||
static void bitset_stats_set PARAMS ((bitset, bitset_bindex));
|
||||
static void bitset_stats_reset PARAMS ((bitset, bitset_bindex));
|
||||
static int bitset_stats_toggle PARAMS ((bitset, bitset_bindex));
|
||||
static int bitset_stats_test PARAMS ((bitset, bitset_bindex));
|
||||
static int bitset_stats_size PARAMS ((bitset));
|
||||
static int bitset_stats_op1 PARAMS ((bitset, enum bitset_ops));
|
||||
static int bitset_stats_op2 PARAMS ((bitset, bitset, enum bitset_ops));
|
||||
static int bitset_stats_op3 PARAMS ((bitset, bitset, bitset, enum bitset_ops));
|
||||
static int bitset_stats_op4 PARAMS ((bitset, bitset, bitset, bitset,
|
||||
enum bitset_ops));
|
||||
static int bitset_stats_list PARAMS ((bitset, bitset_bindex *, bitset_bindex,
|
||||
bitset_bindex *));
|
||||
static int bitset_stats_reverse_list
|
||||
static bitset_bindex bitset_stats_size PARAMS ((bitset));
|
||||
static bitset_bindex bitset_stats_count PARAMS ((bitset));
|
||||
static int bitset_stats_empty_p PARAMS ((bitset));
|
||||
static void bitset_stats_ones PARAMS ((bitset));
|
||||
static void bitset_stats_zero PARAMS ((bitset));
|
||||
static void bitset_stats_copy PARAMS ((bitset, bitset));
|
||||
static int bitset_stats_disjoint_p PARAMS ((bitset, bitset));
|
||||
static int bitset_stats_equal_p PARAMS ((bitset, bitset));
|
||||
static void bitset_stats_not PARAMS ((bitset, bitset));
|
||||
static int bitset_stats_subset_p PARAMS ((bitset, bitset));
|
||||
static void bitset_stats_and PARAMS ((bitset, bitset, bitset));
|
||||
static int bitset_stats_and_cmp PARAMS ((bitset, bitset, bitset));
|
||||
static void bitset_stats_andn PARAMS ((bitset, bitset, bitset));
|
||||
static int bitset_stats_andn_cmp PARAMS ((bitset, bitset, bitset));
|
||||
static void bitset_stats_or PARAMS ((bitset, bitset, bitset));
|
||||
static int bitset_stats_or_cmp PARAMS ((bitset, bitset, bitset));
|
||||
static void bitset_stats_xor PARAMS ((bitset, bitset, bitset));
|
||||
static int bitset_stats_xor_cmp PARAMS ((bitset, bitset, bitset));
|
||||
static void bitset_stats_and_or PARAMS ((bitset, bitset, bitset, bitset));
|
||||
static int bitset_stats_and_or_cmp PARAMS ((bitset, bitset, bitset, bitset));
|
||||
static void bitset_stats_andn_or PARAMS ((bitset, bitset, bitset, bitset));
|
||||
static int bitset_stats_andn_or_cmp PARAMS ((bitset, bitset, bitset, bitset));
|
||||
static void bitset_stats_or_and PARAMS ((bitset, bitset, bitset, bitset));
|
||||
static int bitset_stats_or_and_cmp PARAMS ((bitset, bitset, bitset, bitset));
|
||||
static bitset_bindex bitset_stats_list PARAMS ((bitset, bitset_bindex *,
|
||||
bitset_bindex,
|
||||
bitset_bindex *));
|
||||
static bitset_bindex bitset_stats_list_reverse
|
||||
PARAMS ((bitset, bitset_bindex *, bitset_bindex, bitset_bindex *));
|
||||
static void bitset_stats_free PARAMS ((bitset));
|
||||
static void bitset_percent_histogram_print PARAMS ((FILE *, const char *,
|
||||
@@ -164,7 +171,7 @@ bitset_percent_histogram_print (file, name, msg, n_bins, bins)
|
||||
|
||||
fprintf (file, "%s %s", name, msg);
|
||||
for (i = 0; i < n_bins; i++)
|
||||
fprintf (file, "%.0f-%.0f%%\t%8d (%5.1f%%)\n",
|
||||
fprintf (file, "%.0f-%.0f%%\t%8u (%5.1f%%)\n",
|
||||
i * 100.0 / n_bins,
|
||||
(i + 1) * 100.0 / n_bins, bins[i],
|
||||
(100.0 * bins[i]) / total);
|
||||
@@ -183,7 +190,6 @@ bitset_log_histogram_print (file, name, msg, n_bins, bins)
|
||||
unsigned int i;
|
||||
unsigned int total;
|
||||
unsigned int max_width;
|
||||
unsigned int last_bin;
|
||||
|
||||
total = 0;
|
||||
for (i = 0; i < n_bins; i++)
|
||||
@@ -192,22 +198,25 @@ bitset_log_histogram_print (file, name, msg, n_bins, bins)
|
||||
if (!total)
|
||||
return;
|
||||
|
||||
/* Determine number of useful bins. */
|
||||
for (i = n_bins; i > 3 && ! bins[i - 1]; i--)
|
||||
continue;
|
||||
last_bin = i - 1;
|
||||
n_bins = i;
|
||||
|
||||
/* 2 * ceil (log10 (2) * (N - 1)) + 1. */
|
||||
max_width = 2 * (unsigned int) (0.30103 * (n_bins - 1) + 0.9999) + 1;
|
||||
|
||||
fprintf (file, "%s %s", name, msg);
|
||||
for (i = 0; i < 2; i++)
|
||||
fprintf (file, "%*d\t%8d (%5.1f%%)\n",
|
||||
fprintf (file, "%*d\t%8u (%5.1f%%)\n",
|
||||
max_width, i, bins[i], 100.0 * bins[i] / total);
|
||||
|
||||
for (; i <= last_bin; i++)
|
||||
fprintf (file, "%*d-%d\t%8d (%5.1f%%)\n",
|
||||
for (; i < n_bins; i++)
|
||||
fprintf (file, "%*lu-%lu\t%8u (%5.1f%%)\n",
|
||||
max_width - ((unsigned int) (0.30103 * (i) + 0.9999) + 1),
|
||||
1 << (i - 1), (1 << i) - 1, bins[i],
|
||||
(unsigned long) 1 << (i - 1),
|
||||
((unsigned long) 1 << i) - 1,
|
||||
bins[i],
|
||||
(100.0 * bins[i]) / total);
|
||||
}
|
||||
|
||||
@@ -223,20 +232,20 @@ bitset_stats_print_1 (file, name, stats)
|
||||
return;
|
||||
|
||||
fprintf (file, "%s:\n", name);
|
||||
fprintf (file, _("%d bitset_allocs, %d freed (%.2f%%).\n"),
|
||||
fprintf (file, _("%u bitset_allocs, %u freed (%.2f%%).\n"),
|
||||
stats->allocs, stats->frees,
|
||||
stats->allocs ? 100.0 * stats->frees / stats->allocs : 0);
|
||||
fprintf (file, _("%d bitset_sets, %d cached (%.2f%%)\n"),
|
||||
fprintf (file, _("%u bitset_sets, %u cached (%.2f%%)\n"),
|
||||
stats->sets, stats->cache_sets,
|
||||
stats->sets ? 100.0 * stats->cache_sets / stats->sets : 0);
|
||||
fprintf (file, _("%d bitset_resets, %d cached (%.2f%%)\n"),
|
||||
fprintf (file, _("%u bitset_resets, %u cached (%.2f%%)\n"),
|
||||
stats->resets, stats->cache_resets,
|
||||
stats->resets ? 100.0 * stats->cache_resets / stats->resets : 0);
|
||||
fprintf (file, _("%d bitset_tests, %d cached (%.2f%%)\n"),
|
||||
fprintf (file, _("%u bitset_tests, %u cached (%.2f%%)\n"),
|
||||
stats->tests, stats->cache_tests,
|
||||
stats->tests ? 100.0 * stats->cache_tests / stats->tests : 0);
|
||||
|
||||
fprintf (file, _("%d bitset_lists\n"), stats->lists);
|
||||
fprintf (file, _("%u bitset_lists\n"), stats->lists);
|
||||
|
||||
bitset_log_histogram_print (file, name, _("count log histogram\n"),
|
||||
BITSET_LOG_COUNT_BINS, stats->list_counts);
|
||||
@@ -256,7 +265,6 @@ bitset_stats_print (file, verbose)
|
||||
int verbose ATTRIBUTE_UNUSED;
|
||||
{
|
||||
int i;
|
||||
static const char *names[] = BITSET_TYPE_NAMES;
|
||||
|
||||
if (!bitset_stats_info)
|
||||
return;
|
||||
@@ -264,10 +272,11 @@ bitset_stats_print (file, verbose)
|
||||
fprintf (file, _("Bitset statistics:\n\n"));
|
||||
|
||||
if (bitset_stats_info->runs > 1)
|
||||
fprintf (file, _("Accumulated runs = %d\n"), bitset_stats_info->runs);
|
||||
fprintf (file, _("Accumulated runs = %u\n"), bitset_stats_info->runs);
|
||||
|
||||
for (i = 0; i < BITSET_TYPE_NUM; i++)
|
||||
bitset_stats_print_1 (file, names[i], &bitset_stats_info->types[i]);
|
||||
bitset_stats_print_1 (file, bitset_type_names[i],
|
||||
&bitset_stats_info->types[i]);
|
||||
}
|
||||
|
||||
|
||||
@@ -404,6 +413,15 @@ bitset_stats_reset (dst, bitno)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
bitset_stats_toggle (src, bitno)
|
||||
bitset src;
|
||||
bitset_bindex bitno;
|
||||
{
|
||||
return BITSET_TOGGLE_ (src->s.bset, bitno);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
bitset_stats_test (src, bitno)
|
||||
bitset src;
|
||||
@@ -425,7 +443,7 @@ bitset_stats_test (src, bitno)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
static bitset_bindex
|
||||
bitset_stats_size (src)
|
||||
bitset src;
|
||||
{
|
||||
@@ -433,61 +451,255 @@ bitset_stats_size (src)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
bitset_stats_op1 (dst, op)
|
||||
bitset dst;
|
||||
enum bitset_ops op;
|
||||
static bitset_bindex
|
||||
bitset_stats_count (src)
|
||||
bitset src;
|
||||
{
|
||||
return BITSET_OP1_ (dst->s.bset, op);
|
||||
return BITSET_COUNT_ (src->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
bitset_stats_op2 (dst, src, op)
|
||||
bitset_stats_empty_p (dst)
|
||||
bitset dst;
|
||||
{
|
||||
return BITSET_EMPTY_P_ (dst->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
bitset_stats_ones (dst)
|
||||
bitset dst;
|
||||
{
|
||||
BITSET_ONES_ (dst->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
bitset_stats_zero (dst)
|
||||
bitset dst;
|
||||
{
|
||||
BITSET_ZERO_ (dst->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
bitset_stats_copy (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
enum bitset_ops op;
|
||||
{
|
||||
BITSET_CHECK2_ (dst, src);
|
||||
return BITSET_OP2_ (dst->s.bset, src->s.bset, op);
|
||||
BITSET_COPY_ (dst->s.bset, src->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
bitset_stats_op3 (dst, src1, src2, op)
|
||||
bitset_stats_disjoint_p (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
{
|
||||
BITSET_CHECK2_ (dst, src);
|
||||
return BITSET_DISJOINT_P_ (dst->s.bset, src->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
bitset_stats_equal_p (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
{
|
||||
BITSET_CHECK2_ (dst, src);
|
||||
return BITSET_EQUAL_P_ (dst->s.bset, src->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
bitset_stats_not (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
{
|
||||
BITSET_CHECK2_ (dst, src);
|
||||
BITSET_NOT_ (dst->s.bset, src->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
bitset_stats_subset_p (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
{
|
||||
BITSET_CHECK2_ (dst, src);
|
||||
return BITSET_SUBSET_P_ (dst->s.bset, src->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
bitset_stats_and (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
enum bitset_ops op;
|
||||
{
|
||||
BITSET_CHECK3_ (dst, src1, src2);
|
||||
return BITSET_OP3_ (dst->s.bset, src1->s.bset, src2->s.bset, op);
|
||||
BITSET_AND_ (dst->s.bset, src1->s.bset, src2->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
bitset_stats_op4 (dst, src1, src2, src3, op)
|
||||
bitset_stats_and_cmp (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
BITSET_CHECK3_ (dst, src1, src2);
|
||||
return BITSET_AND_CMP_ (dst->s.bset, src1->s.bset, src2->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
bitset_stats_andn (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
BITSET_CHECK3_ (dst, src1, src2);
|
||||
BITSET_ANDN_ (dst->s.bset, src1->s.bset, src2->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
bitset_stats_andn_cmp (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
BITSET_CHECK3_ (dst, src1, src2);
|
||||
return BITSET_ANDN_CMP_ (dst->s.bset, src1->s.bset, src2->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
bitset_stats_or (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
BITSET_CHECK3_ (dst, src1, src2);
|
||||
BITSET_OR_ (dst->s.bset, src1->s.bset, src2->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
bitset_stats_or_cmp (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
BITSET_CHECK3_ (dst, src1, src2);
|
||||
return BITSET_OR_CMP_ (dst->s.bset, src1->s.bset, src2->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
bitset_stats_xor (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
BITSET_CHECK3_ (dst, src1, src2);
|
||||
BITSET_XOR_ (dst->s.bset, src1->s.bset, src2->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
bitset_stats_xor_cmp (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
BITSET_CHECK3_ (dst, src1, src2);
|
||||
return BITSET_XOR_CMP_ (dst->s.bset, src1->s.bset, src2->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
bitset_stats_and_or (dst, src1, src2, src3)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
bitset src3;
|
||||
enum bitset_ops op;
|
||||
{
|
||||
BITSET_CHECK4_ (dst, src1, src2, src3);
|
||||
|
||||
/* This is a bit of a hack. If the implementation handles
|
||||
a four operand operation then vector to it, passing
|
||||
the enclosed bitsets. Otherwise use the fallback
|
||||
bitset_op4 routine. */
|
||||
if (dst->s.bset->b.ops->op4 != bitset_op4)
|
||||
return BITSET_OP4_ (dst->s.bset, src1->s.bset, src2->s.bset,
|
||||
src3->s.bset, op);
|
||||
|
||||
return bitset_op4 (dst, src1, src2, src3, op);
|
||||
BITSET_AND_OR_ (dst->s.bset, src1->s.bset, src2->s.bset, src3->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
bitset_stats_and_or_cmp (dst, src1, src2, src3)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
bitset src3;
|
||||
{
|
||||
BITSET_CHECK4_ (dst, src1, src2, src3);
|
||||
|
||||
return BITSET_AND_OR_CMP_ (dst->s.bset, src1->s.bset, src2->s.bset, src3->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
bitset_stats_andn_or (dst, src1, src2, src3)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
bitset src3;
|
||||
{
|
||||
BITSET_CHECK4_ (dst, src1, src2, src3);
|
||||
|
||||
BITSET_ANDN_OR_ (dst->s.bset, src1->s.bset, src2->s.bset, src3->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
bitset_stats_andn_or_cmp (dst, src1, src2, src3)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
bitset src3;
|
||||
{
|
||||
BITSET_CHECK4_ (dst, src1, src2, src3);
|
||||
|
||||
return BITSET_ANDN_OR_CMP_ (dst->s.bset, src1->s.bset, src2->s.bset, src3->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
bitset_stats_or_and (dst, src1, src2, src3)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
bitset src3;
|
||||
{
|
||||
BITSET_CHECK4_ (dst, src1, src2, src3);
|
||||
|
||||
BITSET_OR_AND_ (dst->s.bset, src1->s.bset, src2->s.bset, src3->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
bitset_stats_or_and_cmp (dst, src1, src2, src3)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
bitset src3;
|
||||
{
|
||||
BITSET_CHECK4_ (dst, src1, src2, src3);
|
||||
|
||||
return BITSET_OR_AND_CMP_ (dst->s.bset, src1->s.bset, src2->s.bset, src3->s.bset);
|
||||
}
|
||||
|
||||
|
||||
static bitset_bindex
|
||||
bitset_stats_list (bset, list, num, next)
|
||||
bitset bset;
|
||||
bitset_bindex *list;
|
||||
@@ -529,14 +741,14 @@ bitset_stats_list (bset, list, num, next)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
bitset_stats_reverse_list (bset, list, num, next)
|
||||
static bitset_bindex
|
||||
bitset_stats_list_reverse (bset, list, num, next)
|
||||
bitset bset;
|
||||
bitset_bindex *list;
|
||||
bitset_bindex num;
|
||||
bitset_bindex *next;
|
||||
{
|
||||
return BITSET_REVERSE_LIST_ (bset->s.bset, list, num, next);
|
||||
return BITSET_LIST_REVERSE_ (bset->s.bset, list, num, next);
|
||||
}
|
||||
|
||||
|
||||
@@ -549,17 +761,37 @@ bitset_stats_free (bset)
|
||||
}
|
||||
|
||||
|
||||
struct bitset_ops_struct bitset_stats_ops = {
|
||||
struct bitset_vtable bitset_stats_vtable = {
|
||||
bitset_stats_set,
|
||||
bitset_stats_reset,
|
||||
bitset_stats_toggle,
|
||||
bitset_stats_test,
|
||||
bitset_stats_size,
|
||||
bitset_stats_op1,
|
||||
bitset_stats_op2,
|
||||
bitset_stats_op3,
|
||||
bitset_stats_op4,
|
||||
bitset_stats_count,
|
||||
bitset_stats_empty_p,
|
||||
bitset_stats_ones,
|
||||
bitset_stats_zero,
|
||||
bitset_stats_copy,
|
||||
bitset_stats_disjoint_p,
|
||||
bitset_stats_equal_p,
|
||||
bitset_stats_not,
|
||||
bitset_stats_subset_p,
|
||||
bitset_stats_and,
|
||||
bitset_stats_and_cmp,
|
||||
bitset_stats_andn,
|
||||
bitset_stats_andn_cmp,
|
||||
bitset_stats_or,
|
||||
bitset_stats_or_cmp,
|
||||
bitset_stats_xor,
|
||||
bitset_stats_xor_cmp,
|
||||
bitset_stats_and_or,
|
||||
bitset_stats_and_or_cmp,
|
||||
bitset_stats_andn_or,
|
||||
bitset_stats_andn_or_cmp,
|
||||
bitset_stats_or_and,
|
||||
bitset_stats_or_and_cmp,
|
||||
bitset_stats_list,
|
||||
bitset_stats_reverse_list,
|
||||
bitset_stats_list_reverse,
|
||||
bitset_stats_free,
|
||||
BITSET_STATS
|
||||
};
|
||||
@@ -574,9 +806,10 @@ bitset_stats_type_get (bset)
|
||||
}
|
||||
|
||||
|
||||
int bitset_stats_bytes (void)
|
||||
size_t
|
||||
bitset_stats_bytes (void)
|
||||
{
|
||||
return sizeof (struct bitset_struct);
|
||||
return sizeof (struct bitset_stats_struct);
|
||||
}
|
||||
|
||||
|
||||
@@ -584,12 +817,12 @@ bitset
|
||||
bitset_stats_init (bset, n_bits, type)
|
||||
bitset bset;
|
||||
bitset_bindex n_bits;
|
||||
enum bitset_type type;
|
||||
enum_bitset_type type;
|
||||
{
|
||||
unsigned int bytes;
|
||||
size_t bytes;
|
||||
bitset sbset;
|
||||
|
||||
bset->b.ops = &bitset_stats_ops;
|
||||
bset->b.vtable = &bitset_stats_vtable;
|
||||
|
||||
/* Disable cache. */
|
||||
bset->b.cindex = 0;
|
||||
|
||||
+2
-2
@@ -25,9 +25,9 @@ extern int bitset_stats_enabled;
|
||||
|
||||
extern enum bitset_type bitset_stats_type_get PARAMS ((bitset));
|
||||
|
||||
extern int bitset_stats_bytes PARAMS ((void));
|
||||
extern size_t bitset_stats_bytes PARAMS ((void));
|
||||
|
||||
extern bitset bitset_stats_init PARAMS ((bitset, bitset_bindex,
|
||||
enum bitset_type));
|
||||
enum_bitset_type));
|
||||
|
||||
#endif
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
/* Bitset vectors.
|
||||
Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison.
|
||||
|
||||
@@ -32,8 +32,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
void
|
||||
bitsetv_matrix_dump (FILE * out, const char *title, bitsetv bset)
|
||||
{
|
||||
size_t i, j;
|
||||
size_t hsize = bitset_size (bset[0]);
|
||||
bitset_bindex i, j;
|
||||
bitset_bindex hsize = bitset_size (bset[0]);
|
||||
|
||||
/* Title. */
|
||||
fprintf (out, "%s BEGIN\n", title);
|
||||
@@ -45,7 +45,7 @@ bitsetv_matrix_dump (FILE * out, const char *title, bitsetv bset)
|
||||
putc ('\n', out);
|
||||
fputs (" ", out);
|
||||
for (i = 0; i < hsize; ++i)
|
||||
fprintf (out, "%d", i % 10);
|
||||
fprintf (out, "%d", (int) (i % 10));
|
||||
putc ('\n', out);
|
||||
|
||||
/* Bar. */
|
||||
@@ -57,7 +57,7 @@ bitsetv_matrix_dump (FILE * out, const char *title, bitsetv bset)
|
||||
/* Contents. */
|
||||
for (i = 0; bset[i]; ++i)
|
||||
{
|
||||
fprintf (out, "%2d|", i);
|
||||
fprintf (out, "%2lu|", (unsigned long) i);
|
||||
for (j = 0; j < hsize; ++j)
|
||||
fputs (bitset_test (bset[i], j) ? "1" : " ", out);
|
||||
fputs ("|\n", out);
|
||||
|
||||
+27
-22
@@ -1,5 +1,5 @@
|
||||
/* Bitset vectors.
|
||||
Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
@@ -30,25 +30,30 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
type TYPE. */
|
||||
bitset *
|
||||
bitsetv_alloc (n_vecs, n_bits, type)
|
||||
unsigned int n_vecs;
|
||||
unsigned int n_bits;
|
||||
enum bitset_type type;
|
||||
bitset_bindex n_vecs;
|
||||
bitset_bindex n_bits;
|
||||
enum_bitset_type type;
|
||||
{
|
||||
unsigned int vector_bytes;
|
||||
unsigned int bytes;
|
||||
size_t vector_bytes;
|
||||
size_t bytes;
|
||||
bitset *bsetv;
|
||||
unsigned int i;
|
||||
bitset_bindex i;
|
||||
|
||||
/* Determine number of bytes for each set. */
|
||||
bytes = bitset_bytes (type, n_bits);
|
||||
|
||||
/* If size calculation overflows, memory is exhausted. */
|
||||
if (BITSET_SIZE_MAX / (sizeof (bitset) + bytes) <= n_vecs)
|
||||
xalloc_die ();
|
||||
|
||||
/* Allocate vector table at head of bitset array. */
|
||||
vector_bytes = (n_vecs + 1) * sizeof (bitset);
|
||||
vector_bytes = (n_vecs + 1) * sizeof (bitset) + bytes - 1;
|
||||
vector_bytes -= vector_bytes % bytes;
|
||||
bsetv = (bitset *) xcalloc (1, vector_bytes + bytes * n_vecs);
|
||||
|
||||
for (i = 0; i < n_vecs; i++)
|
||||
{
|
||||
bsetv[i] = (bitset) ((char *) bsetv + vector_bytes + i * bytes);
|
||||
bsetv[i] = (bitset) (void *) ((char *) bsetv + vector_bytes + i * bytes);
|
||||
|
||||
bitset_init (bsetv[i], n_bits, type);
|
||||
}
|
||||
@@ -63,8 +68,8 @@ bitsetv_alloc (n_vecs, n_bits, type)
|
||||
attribute hints specified by ATTR. */
|
||||
bitset *
|
||||
bitsetv_create (n_vecs, n_bits, attr)
|
||||
unsigned int n_vecs;
|
||||
unsigned int n_bits;
|
||||
bitset_bindex n_vecs;
|
||||
bitset_bindex n_bits;
|
||||
unsigned int attr;
|
||||
{
|
||||
enum bitset_type type;
|
||||
@@ -79,7 +84,7 @@ void
|
||||
bitsetv_free (bsetv)
|
||||
bitset *bsetv;
|
||||
{
|
||||
unsigned int i;
|
||||
bitset_bindex i;
|
||||
|
||||
for (i = 0; bsetv[i]; i++)
|
||||
BITSET_FREE_ (bsetv[i]);
|
||||
@@ -90,9 +95,9 @@ bitsetv_free (bsetv)
|
||||
/* Zero a vector of bitsets. */
|
||||
void
|
||||
bitsetv_zero (bsetv)
|
||||
struct bitset_struct **bsetv;
|
||||
bitsetv bsetv;
|
||||
{
|
||||
unsigned int i;
|
||||
bitset_bindex i;
|
||||
|
||||
for (i = 0; bsetv[i]; i++)
|
||||
bitset_zero (bsetv[i]);
|
||||
@@ -104,7 +109,7 @@ void
|
||||
bitsetv_ones (bsetv)
|
||||
bitset *bsetv;
|
||||
{
|
||||
unsigned int i;
|
||||
bitset_bindex i;
|
||||
|
||||
for (i = 0; bsetv[i]; i++)
|
||||
bitset_ones (bsetv[i]);
|
||||
@@ -117,8 +122,8 @@ void
|
||||
bitsetv_transitive_closure (bsetv)
|
||||
bitset *bsetv;
|
||||
{
|
||||
unsigned int i;
|
||||
unsigned int j;
|
||||
bitset_bindex i;
|
||||
bitset_bindex j;
|
||||
|
||||
for (i = 0; bsetv[i]; i++)
|
||||
for (j = 0; bsetv[j]; j++)
|
||||
@@ -134,7 +139,7 @@ bitsetv_transitive_closure (bsetv)
|
||||
void
|
||||
bitsetv_reflexive_transitive_closure (bitsetv bsetv)
|
||||
{
|
||||
int i;
|
||||
bitset_bindex i;
|
||||
|
||||
bitsetv_transitive_closure (bsetv);
|
||||
for (i = 0; bsetv[i]; i++)
|
||||
@@ -150,12 +155,12 @@ bitsetv_dump (file, title, subtitle, bsetv)
|
||||
const char *title, *subtitle;
|
||||
bitset *bsetv;
|
||||
{
|
||||
unsigned int i;
|
||||
bitset_windex i;
|
||||
|
||||
fprintf (file, "%s\n", title);
|
||||
for (i = 0; bsetv[i]; i++)
|
||||
{
|
||||
fprintf (file, "%s %d\n", subtitle, i);
|
||||
fprintf (file, "%s %lu\n", subtitle, (unsigned long) i);
|
||||
bitset_dump (file, bsetv[i]);
|
||||
}
|
||||
|
||||
@@ -167,11 +172,11 @@ void
|
||||
debug_bitsetv (bsetv)
|
||||
bitset *bsetv;
|
||||
{
|
||||
unsigned int i;
|
||||
bitset_windex i;
|
||||
|
||||
for (i = 0; bsetv[i]; i++)
|
||||
{
|
||||
fprintf (stderr, "%d: ", i);
|
||||
fprintf (stderr, "%lu: ", (unsigned long) i);
|
||||
debug_bitset (bsetv[i]);
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -25,12 +25,12 @@ typedef bitset * bitsetv;
|
||||
|
||||
/* Create a vector of N_VECS bitsets, each of N_BITS, and of
|
||||
type TYPE. */
|
||||
extern bitsetv bitsetv_alloc PARAMS ((unsigned int, unsigned int,
|
||||
enum bitset_type));
|
||||
extern bitsetv bitsetv_alloc PARAMS ((bitset_bindex, bitset_bindex,
|
||||
enum_bitset_type));
|
||||
|
||||
/* Create a vector of N_VECS bitsets, each of N_BITS, and with
|
||||
attribute hints specified by ATTR. */
|
||||
extern bitsetv bitsetv_create PARAMS ((unsigned int, unsigned int,
|
||||
extern bitsetv bitsetv_create PARAMS ((bitset_bindex, bitset_bindex,
|
||||
unsigned int));
|
||||
|
||||
/* Free vector of bitsets. */
|
||||
|
||||
+351
-237
@@ -40,7 +40,7 @@
|
||||
be zero.
|
||||
|
||||
The bitset cache can be disabled either by setting cindex to
|
||||
some large number or by setting csize to 0. Here
|
||||
BITSET_WINDEX_MAX or by setting csize to 0. Here
|
||||
we use the former approach since cindex needs to be updated whenever
|
||||
cdata is changed.
|
||||
*/
|
||||
@@ -68,14 +68,6 @@ ebitset_elt;
|
||||
|
||||
typedef ebitset_elt *ebitset_elts;
|
||||
|
||||
/* Head of ebitset linked list. */
|
||||
typedef struct ebitset_struct
|
||||
{
|
||||
unsigned int size; /* Number of elements. */
|
||||
ebitset_elts *elts; /* Expanding array of pointers to elements. */
|
||||
}
|
||||
*ebitset;
|
||||
|
||||
|
||||
/* Number of elements to initially allocate. */
|
||||
|
||||
@@ -89,14 +81,9 @@ typedef struct ebitset_struct
|
||||
#define EBITSET_GROW_SIZE 4
|
||||
#endif
|
||||
|
||||
struct bitset_struct
|
||||
{
|
||||
struct bbitset_struct b;
|
||||
struct ebitset_struct e;
|
||||
};
|
||||
|
||||
enum ebitset_find_mode
|
||||
{ EBITSET_FIND, EBITSET_CREATE, EBITSET_SUBST };
|
||||
typedef int enum_ebitset_find_mode;
|
||||
|
||||
static ebitset_elt ebitset_zero_elts[1]; /* Elements of all zero bits. */
|
||||
|
||||
@@ -105,33 +92,45 @@ static struct obstack ebitset_obstack;
|
||||
static int ebitset_obstack_init = 0;
|
||||
static ebitset_elt *ebitset_free_list; /* Free list of bitset elements. */
|
||||
|
||||
static void ebitset_elts_grow PARAMS ((bitset, unsigned int));
|
||||
static void ebitset_elts_grow PARAMS ((bitset, bitset_windex));
|
||||
static ebitset_elt *ebitset_elt_alloc PARAMS ((void));
|
||||
static ebitset_elt *ebitset_elt_calloc PARAMS ((void));
|
||||
static void ebitset_elt_add PARAMS ((bitset, ebitset_elt *, unsigned int));
|
||||
static void ebitset_elt_remove PARAMS ((bitset, unsigned int));
|
||||
static void ebitset_elt_add PARAMS ((bitset, ebitset_elt *, bitset_windex));
|
||||
static void ebitset_elt_remove PARAMS ((bitset, bitset_windex));
|
||||
static void ebitset_elt_free PARAMS ((ebitset_elt *));
|
||||
static ebitset_elt *ebitset_elt_find PARAMS ((bitset, bitset_windex,
|
||||
enum ebitset_find_mode));
|
||||
enum_ebitset_find_mode));
|
||||
static ebitset_elt *ebitset_elt_last PARAMS ((bitset));
|
||||
static int ebitset_elt_zero_p PARAMS ((ebitset_elt *));
|
||||
|
||||
static int ebitset_weed PARAMS ((bitset));
|
||||
static bitset_windex ebitset_weed PARAMS ((bitset));
|
||||
static void ebitset_zero PARAMS ((bitset));
|
||||
static int ebitset_equal_p PARAMS ((bitset, bitset));
|
||||
static void ebitset_copy PARAMS ((bitset, bitset));
|
||||
static int ebitset_copy_compare PARAMS ((bitset, bitset));
|
||||
static void ebitset_copy_ PARAMS ((bitset, bitset));
|
||||
static int ebitset_copy_cmp PARAMS ((bitset, bitset));
|
||||
static void ebitset_set PARAMS ((bitset, bitset_bindex));
|
||||
static void ebitset_reset PARAMS ((bitset, bitset_bindex));
|
||||
static int ebitset_test PARAMS ((bitset, bitset_bindex));
|
||||
static int ebitset_size PARAMS ((bitset));
|
||||
static int ebitset_op1 PARAMS ((bitset, enum bitset_ops));
|
||||
static int ebitset_op2 PARAMS ((bitset, bitset, enum bitset_ops));
|
||||
static int ebitset_op3 PARAMS ((bitset, bitset, bitset, enum bitset_ops));
|
||||
static int ebitset_list PARAMS ((bitset, bitset_bindex *, bitset_bindex,
|
||||
bitset_bindex *));
|
||||
static int ebitset_reverse_list
|
||||
static bitset_bindex ebitset_size PARAMS ((bitset));
|
||||
static int ebitset_disjoint_p PARAMS ((bitset, bitset));
|
||||
static int ebitset_equal_p PARAMS ((bitset, bitset));
|
||||
static void ebitset_not PARAMS ((bitset, bitset));
|
||||
static int ebitset_subset_p PARAMS ((bitset, bitset));
|
||||
static int ebitset_op3_cmp PARAMS ((bitset, bitset, bitset, enum_bitset_ops));
|
||||
static void ebitset_and PARAMS ((bitset, bitset, bitset));
|
||||
static int ebitset_and_cmp PARAMS ((bitset, bitset, bitset));
|
||||
static void ebitset_andn PARAMS ((bitset, bitset, bitset));
|
||||
static int ebitset_andn_cmp PARAMS ((bitset, bitset, bitset));
|
||||
static void ebitset_or PARAMS ((bitset, bitset, bitset));
|
||||
static int ebitset_or_cmp PARAMS ((bitset, bitset, bitset));
|
||||
static void ebitset_xor PARAMS ((bitset, bitset, bitset));
|
||||
static int ebitset_xor_cmp PARAMS ((bitset, bitset, bitset));
|
||||
static void ebitset_copy PARAMS ((bitset, bitset));
|
||||
static bitset_bindex ebitset_list PARAMS ((bitset, bitset_bindex *,
|
||||
bitset_bindex, bitset_bindex *));
|
||||
static bitset_bindex ebitset_list_reverse
|
||||
PARAMS ((bitset, bitset_bindex *, bitset_bindex, bitset_bindex *));
|
||||
static void ebitset_ones PARAMS ((bitset));
|
||||
static int ebitset_empty_p PARAMS ((bitset));
|
||||
static void ebitset_free PARAMS ((bitset));
|
||||
|
||||
#define EBITSET_ELTS(BSET) ((BSET)->e.elts)
|
||||
@@ -141,10 +140,10 @@ static void ebitset_free PARAMS ((bitset));
|
||||
#define EBITSET_WORDS(ELT) ((ELT)->u.words)
|
||||
|
||||
/* Disable bitset cache and mark BSET as being zero. */
|
||||
#define EBITSET_OP_ZERO_SET(BSET) ((BSET)->b.cindex = BITSET_INDEX_MAX, \
|
||||
#define EBITSET_ZERO_SET(BSET) ((BSET)->b.cindex = BITSET_WINDEX_MAX, \
|
||||
(BSET)->b.cdata = 0)
|
||||
|
||||
#define EBITSET_CACHE_DISABLE(BSET) ((BSET)->b.cindex = BITSET_INDEX_MAX)
|
||||
#define EBITSET_CACHE_DISABLE(BSET) ((BSET)->b.cindex = BITSET_WINDEX_MAX)
|
||||
|
||||
/* Disable bitset cache and mark BSET as being possibly non-zero. */
|
||||
#define EBITSET_NONZERO_SET(BSET) \
|
||||
@@ -152,7 +151,7 @@ static void ebitset_free PARAMS ((bitset));
|
||||
|
||||
/* A conservative estimate of whether the bitset is zero.
|
||||
This is non-zero only if we know for sure that the bitset is zero. */
|
||||
#define EBITSET_OP_ZERO_P(BSET) ((BSET)->b.cdata == 0)
|
||||
#define EBITSET_ZERO_P(BSET) ((BSET)->b.cdata == 0)
|
||||
|
||||
/* Enable cache to point to element with table index EINDEX.
|
||||
The element must exist. */
|
||||
@@ -165,14 +164,17 @@ static void ebitset_free PARAMS ((bitset));
|
||||
static void
|
||||
ebitset_elts_grow (bset, size)
|
||||
bitset bset;
|
||||
unsigned int size;
|
||||
bitset_windex size;
|
||||
{
|
||||
unsigned int oldsize;
|
||||
unsigned int newsize;
|
||||
bitset_windex oldsize;
|
||||
bitset_windex newsize;
|
||||
|
||||
oldsize = EBITSET_SIZE (bset);
|
||||
newsize = oldsize + size;
|
||||
|
||||
if (BITSET_SIZE_MAX / sizeof (ebitset_elt *) < newsize)
|
||||
xalloc_die ();
|
||||
|
||||
EBITSET_ELTS (bset) = xrealloc (EBITSET_ELTS (bset),
|
||||
newsize * sizeof (ebitset_elt *));
|
||||
EBITSET_SIZE (bset) = newsize;
|
||||
@@ -261,7 +263,7 @@ ebitset_elt_free (elt)
|
||||
static inline void
|
||||
ebitset_elt_remove (bset, eindex)
|
||||
bitset bset;
|
||||
unsigned int eindex;
|
||||
bitset_windex eindex;
|
||||
{
|
||||
ebitset_elts *elts;
|
||||
ebitset_elt *elt;
|
||||
@@ -280,7 +282,7 @@ static inline void
|
||||
ebitset_elt_add (bset, elt, eindex)
|
||||
bitset bset;
|
||||
ebitset_elt *elt;
|
||||
unsigned int eindex;
|
||||
bitset_windex eindex;
|
||||
{
|
||||
ebitset_elts *elts;
|
||||
|
||||
@@ -309,11 +311,11 @@ static ebitset_elt *
|
||||
ebitset_elt_find (bset, windex, mode)
|
||||
bitset bset;
|
||||
bitset_windex windex;
|
||||
enum ebitset_find_mode mode;
|
||||
enum_ebitset_find_mode mode;
|
||||
{
|
||||
ebitset_elt *elt;
|
||||
bitset_windex size;
|
||||
unsigned int eindex;
|
||||
bitset_windex eindex;
|
||||
ebitset_elts *elts;
|
||||
|
||||
eindex = windex / EBITSET_ELT_WORDS;
|
||||
@@ -343,7 +345,7 @@ ebitset_elt_find (bset, windex, mode)
|
||||
case EBITSET_CREATE:
|
||||
if (eindex >= size)
|
||||
{
|
||||
unsigned int extra;
|
||||
bitset_windex extra;
|
||||
|
||||
extra = eindex - size + 1;
|
||||
|
||||
@@ -387,15 +389,15 @@ ebitset_elt_last (bset)
|
||||
|
||||
|
||||
/* Weed out the zero elements from the elts. */
|
||||
static inline int
|
||||
static inline bitset_windex
|
||||
ebitset_weed (bset)
|
||||
bitset bset;
|
||||
{
|
||||
ebitset_elts *elts;
|
||||
bitset_windex j;
|
||||
int count;
|
||||
bitset_windex count;
|
||||
|
||||
if (EBITSET_OP_ZERO_P (bset))
|
||||
if (EBITSET_ZERO_P (bset))
|
||||
return 0;
|
||||
|
||||
elts = EBITSET_ELTS (bset);
|
||||
@@ -421,7 +423,7 @@ ebitset_weed (bset)
|
||||
{
|
||||
/* All the bits are zero. We could shrink the elts.
|
||||
For now just mark BSET as known to be zero. */
|
||||
EBITSET_OP_ZERO_SET (bset);
|
||||
EBITSET_ZERO_SET (bset);
|
||||
}
|
||||
else
|
||||
EBITSET_NONZERO_SET (bset);
|
||||
@@ -438,7 +440,7 @@ ebitset_zero (bset)
|
||||
ebitset_elts *elts;
|
||||
bitset_windex j;
|
||||
|
||||
if (EBITSET_OP_ZERO_P (bset))
|
||||
if (EBITSET_ZERO_P (bset))
|
||||
return;
|
||||
|
||||
elts = EBITSET_ELTS (bset);
|
||||
@@ -452,7 +454,7 @@ ebitset_zero (bset)
|
||||
|
||||
/* All the bits are zero. We could shrink the elts.
|
||||
For now just mark BSET as known to be zero. */
|
||||
EBITSET_OP_ZERO_SET (bset);
|
||||
EBITSET_ZERO_SET (bset);
|
||||
}
|
||||
|
||||
|
||||
@@ -498,7 +500,7 @@ ebitset_equal_p (dst, src)
|
||||
|
||||
/* Copy bits from bitset SRC to bitset DST. */
|
||||
static inline void
|
||||
ebitset_copy (dst, src)
|
||||
ebitset_copy_ (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
{
|
||||
@@ -537,29 +539,29 @@ ebitset_copy (dst, src)
|
||||
/* Copy bits from bitset SRC to bitset DST. Return non-zero if
|
||||
bitsets different. */
|
||||
static inline int
|
||||
ebitset_copy_compare (dst, src)
|
||||
ebitset_copy_cmp (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
{
|
||||
if (src == dst)
|
||||
return 0;
|
||||
|
||||
if (EBITSET_OP_ZERO_P (dst))
|
||||
if (EBITSET_ZERO_P (dst))
|
||||
{
|
||||
ebitset_copy (dst, src);
|
||||
return !EBITSET_OP_ZERO_P (src);
|
||||
ebitset_copy_ (dst, src);
|
||||
return !EBITSET_ZERO_P (src);
|
||||
}
|
||||
|
||||
if (ebitset_equal_p (dst, src))
|
||||
return 0;
|
||||
|
||||
ebitset_copy (dst, src);
|
||||
ebitset_copy_ (dst, src);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* Return size in bits of bitset SRC. */
|
||||
static int
|
||||
static bitset_bindex
|
||||
ebitset_size (src)
|
||||
bitset src;
|
||||
{
|
||||
@@ -631,8 +633,8 @@ ebitset_free (bset)
|
||||
/* Find list of up to NUM bits set in BSET starting from and including
|
||||
*NEXT and store in array LIST. Return with actual number of bits
|
||||
found and with *NEXT indicating where search stopped. */
|
||||
static int
|
||||
ebitset_reverse_list (bset, list, num, next)
|
||||
static bitset_bindex
|
||||
ebitset_list_reverse (bset, list, num, next)
|
||||
bitset bset;
|
||||
bitset_bindex *list;
|
||||
bitset_bindex num;
|
||||
@@ -644,13 +646,13 @@ ebitset_reverse_list (bset, list, num, next)
|
||||
unsigned int bcount;
|
||||
bitset_bindex boffset;
|
||||
bitset_windex windex;
|
||||
unsigned int eindex;
|
||||
bitset_windex eindex;
|
||||
bitset_windex woffset;
|
||||
bitset_bindex count;
|
||||
bitset_windex size;
|
||||
ebitset_elts *elts;
|
||||
|
||||
if (EBITSET_OP_ZERO_P (bset))
|
||||
if (EBITSET_ZERO_P (bset))
|
||||
return 0;
|
||||
|
||||
size = EBITSET_SIZE (bset);
|
||||
@@ -678,20 +680,19 @@ ebitset_reverse_list (bset, list, num, next)
|
||||
do
|
||||
{
|
||||
ebitset_elt *elt;
|
||||
|
||||
bitset_word *srcp;
|
||||
|
||||
elt = elts[eindex];
|
||||
if (elt)
|
||||
{
|
||||
bitset_word *srcp;
|
||||
|
||||
{
|
||||
srcp = EBITSET_WORDS (elt);
|
||||
|
||||
|
||||
do
|
||||
{
|
||||
bitset_word word;
|
||||
|
||||
|
||||
word = srcp[woffset] << (BITSET_WORD_BITS - 1 - bcount);
|
||||
|
||||
|
||||
for (; word; bcount--)
|
||||
{
|
||||
if (word & BITSET_MSB)
|
||||
@@ -705,15 +706,13 @@ ebitset_reverse_list (bset, list, num, next)
|
||||
}
|
||||
word <<= 1;
|
||||
}
|
||||
|
||||
boffset -= BITSET_WORD_BITS;
|
||||
bcount = BITSET_WORD_BITS - 1;
|
||||
bcount = BITSET_WORD_BITS - 1;
|
||||
}
|
||||
while (woffset--);
|
||||
|
||||
woffset = EBITSET_ELT_WORDS;
|
||||
}
|
||||
|
||||
woffset = EBITSET_ELT_WORDS - 1;
|
||||
boffset = eindex * EBITSET_ELT_BITS - BITSET_WORD_BITS;
|
||||
}
|
||||
while (eindex--);
|
||||
@@ -726,7 +725,7 @@ ebitset_reverse_list (bset, list, num, next)
|
||||
/* Find list of up to NUM bits set in BSET starting from and including
|
||||
*NEXT and store in array LIST. Return with actual number of bits
|
||||
found and with *NEXT indicating where search stopped. */
|
||||
static int
|
||||
static bitset_bindex
|
||||
ebitset_list (bset, list, num, next)
|
||||
bitset bset;
|
||||
bitset_bindex *list;
|
||||
@@ -735,14 +734,14 @@ ebitset_list (bset, list, num, next)
|
||||
{
|
||||
bitset_bindex bitno;
|
||||
bitset_windex windex;
|
||||
unsigned int eindex;
|
||||
bitset_windex eindex;
|
||||
bitset_bindex count;
|
||||
bitset_windex size;
|
||||
ebitset_elt *elt;
|
||||
bitset_word word;
|
||||
ebitset_elts *elts;
|
||||
|
||||
if (EBITSET_OP_ZERO_P (bset))
|
||||
if (EBITSET_ZERO_P (bset))
|
||||
return 0;
|
||||
|
||||
bitno = *next;
|
||||
@@ -763,7 +762,7 @@ ebitset_list (bset, list, num, next)
|
||||
bitset_word *srcp = EBITSET_WORDS (elt);
|
||||
|
||||
windex = bitno / BITSET_WORD_BITS;
|
||||
woffset = eindex / EBITSET_ELT_WORDS;
|
||||
woffset = eindex * EBITSET_ELT_WORDS;
|
||||
|
||||
for (; (windex - woffset) < EBITSET_ELT_WORDS; windex++)
|
||||
{
|
||||
@@ -866,160 +865,149 @@ ebitset_list (bset, list, num, next)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
ebitset_op1 (dst, op)
|
||||
static void
|
||||
ebitset_ones (dst)
|
||||
bitset dst;
|
||||
enum bitset_ops op;
|
||||
{
|
||||
bitset_windex j;
|
||||
ebitset_elt *elt;
|
||||
|
||||
switch (op)
|
||||
|
||||
for (j = 0; j < EBITSET_SIZE (dst); j++)
|
||||
{
|
||||
case BITSET_OP_ZERO:
|
||||
ebitset_zero (dst);
|
||||
return 1;
|
||||
|
||||
case BITSET_OP_ONES:
|
||||
for (j = 0; j < EBITSET_SIZE (dst); j++)
|
||||
{
|
||||
/* Create new elements if they cannot be found. Perhaps
|
||||
we should just add pointers to a ones element. */
|
||||
elt =
|
||||
ebitset_elt_find (dst, j * EBITSET_ELT_WORDS, EBITSET_CREATE);
|
||||
memset (EBITSET_WORDS (elt), -1, sizeof (EBITSET_WORDS (elt)));
|
||||
}
|
||||
break;
|
||||
|
||||
case BITSET_OP_EMPTY_P:
|
||||
return !ebitset_weed (dst);
|
||||
|
||||
default:
|
||||
abort ();
|
||||
/* Create new elements if they cannot be found. Perhaps
|
||||
we should just add pointers to a ones element. */
|
||||
elt =
|
||||
ebitset_elt_find (dst, j * EBITSET_ELT_WORDS, EBITSET_CREATE);
|
||||
memset (EBITSET_WORDS (elt), -1, sizeof (EBITSET_WORDS (elt)));
|
||||
}
|
||||
|
||||
EBITSET_NONZERO_SET (dst);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
ebitset_op2 (dst, src, op)
|
||||
ebitset_empty_p (dst)
|
||||
bitset dst;
|
||||
{
|
||||
return !ebitset_weed (dst);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
ebitset_not (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
enum bitset_ops op;
|
||||
{
|
||||
unsigned int i;
|
||||
ebitset_elt *selt;
|
||||
ebitset_elt *delt;
|
||||
unsigned int i;
|
||||
bitset_windex j;
|
||||
|
||||
switch (op)
|
||||
for (j = 0; j < EBITSET_SIZE (src); j++)
|
||||
{
|
||||
case BITSET_OP_COPY:
|
||||
ebitset_copy (dst, src);
|
||||
break;
|
||||
|
||||
case BITSET_OP_NOT:
|
||||
for (j = 0; j < EBITSET_SIZE (src); j++)
|
||||
{
|
||||
/* Create new elements for dst if they cannot be found
|
||||
/* Create new elements for dst if they cannot be found
|
||||
or substitute zero elements if src elements not found. */
|
||||
selt =
|
||||
ebitset_elt_find (dst, j * EBITSET_ELT_WORDS, EBITSET_SUBST);
|
||||
delt =
|
||||
ebitset_elt_find (dst, j * EBITSET_ELT_WORDS, EBITSET_CREATE);
|
||||
selt =
|
||||
ebitset_elt_find (dst, j * EBITSET_ELT_WORDS, EBITSET_SUBST);
|
||||
delt =
|
||||
ebitset_elt_find (dst, j * EBITSET_ELT_WORDS, EBITSET_CREATE);
|
||||
|
||||
for (i = 0; i < EBITSET_ELT_WORDS; i++)
|
||||
EBITSET_WORDS (delt)[i] = ~EBITSET_WORDS (selt)[i];
|
||||
}
|
||||
break;
|
||||
|
||||
/* Return 1 if DST == SRC. */
|
||||
case BITSET_OP_EQUAL_P:
|
||||
return ebitset_equal_p (dst, src);
|
||||
|
||||
/* Return 1 if DST == DST | SRC. */
|
||||
case BITSET_OP_SUBSET_P:
|
||||
{
|
||||
ebitset_elts *selts;
|
||||
ebitset_elts *delts;
|
||||
bitset_windex ssize;
|
||||
bitset_windex dsize;
|
||||
|
||||
selts = EBITSET_ELTS (src);
|
||||
delts = EBITSET_ELTS (dst);
|
||||
|
||||
ssize = EBITSET_SIZE (src);
|
||||
dsize = EBITSET_SIZE (dst);
|
||||
|
||||
for (j = 0; j < ssize; j++)
|
||||
{
|
||||
selt = j < ssize ? selts[j] : 0;
|
||||
delt = j < dsize ? delts[j] : 0;
|
||||
|
||||
if (!selt && !delt)
|
||||
continue;
|
||||
|
||||
if (!selt)
|
||||
selt = &ebitset_zero_elts[0];
|
||||
if (!delt)
|
||||
delt = &ebitset_zero_elts[0];
|
||||
|
||||
for (i = 0; i < EBITSET_ELT_WORDS; i++)
|
||||
if (EBITSET_WORDS (delt)[i]
|
||||
!= (EBITSET_WORDS (selt)[i] | EBITSET_WORDS (delt)[i]))
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
/* Return 1 if DST & SRC == 0. */
|
||||
case BITSET_OP_DISJOINT_P:
|
||||
{
|
||||
ebitset_elts *selts;
|
||||
ebitset_elts *delts;
|
||||
bitset_windex ssize;
|
||||
bitset_windex dsize;
|
||||
|
||||
selts = EBITSET_ELTS (src);
|
||||
delts = EBITSET_ELTS (dst);
|
||||
|
||||
ssize = EBITSET_SIZE (src);
|
||||
dsize = EBITSET_SIZE (dst);
|
||||
|
||||
for (j = 0; j < ssize; j++)
|
||||
{
|
||||
selt = j < ssize ? selts[j] : 0;
|
||||
delt = j < dsize ? delts[j] : 0;
|
||||
|
||||
if (!selt || !delt)
|
||||
continue;
|
||||
|
||||
for (i = 0; i < EBITSET_ELT_WORDS; i++)
|
||||
if ((EBITSET_WORDS (selt)[i] & EBITSET_WORDS (delt)[i]))
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
abort ();
|
||||
for (i = 0; i < EBITSET_ELT_WORDS; i++)
|
||||
EBITSET_WORDS (delt)[i] = ~EBITSET_WORDS (selt)[i];
|
||||
}
|
||||
|
||||
EBITSET_NONZERO_SET (dst);
|
||||
}
|
||||
|
||||
|
||||
/* Return 1 if DST == DST | SRC. */
|
||||
static int
|
||||
ebitset_subset_p (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
{
|
||||
bitset_windex j;
|
||||
ebitset_elts *selts;
|
||||
ebitset_elts *delts;
|
||||
bitset_windex ssize;
|
||||
bitset_windex dsize;
|
||||
|
||||
selts = EBITSET_ELTS (src);
|
||||
delts = EBITSET_ELTS (dst);
|
||||
|
||||
ssize = EBITSET_SIZE (src);
|
||||
dsize = EBITSET_SIZE (dst);
|
||||
|
||||
for (j = 0; j < ssize; j++)
|
||||
{
|
||||
unsigned int i;
|
||||
ebitset_elt *selt;
|
||||
ebitset_elt *delt;
|
||||
|
||||
selt = j < ssize ? selts[j] : 0;
|
||||
delt = j < dsize ? delts[j] : 0;
|
||||
|
||||
if (!selt && !delt)
|
||||
continue;
|
||||
|
||||
if (!selt)
|
||||
selt = &ebitset_zero_elts[0];
|
||||
if (!delt)
|
||||
delt = &ebitset_zero_elts[0];
|
||||
|
||||
for (i = 0; i < EBITSET_ELT_WORDS; i++)
|
||||
if (EBITSET_WORDS (delt)[i]
|
||||
!= (EBITSET_WORDS (selt)[i] | EBITSET_WORDS (delt)[i]))
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* Return 1 if DST & SRC == 0. */
|
||||
static int
|
||||
ebitset_op3 (dst, src1, src2, op)
|
||||
ebitset_disjoint_p (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
{
|
||||
bitset_windex j;
|
||||
ebitset_elts *selts;
|
||||
ebitset_elts *delts;
|
||||
bitset_windex ssize;
|
||||
bitset_windex dsize;
|
||||
|
||||
selts = EBITSET_ELTS (src);
|
||||
delts = EBITSET_ELTS (dst);
|
||||
|
||||
ssize = EBITSET_SIZE (src);
|
||||
dsize = EBITSET_SIZE (dst);
|
||||
|
||||
for (j = 0; j < ssize; j++)
|
||||
{
|
||||
unsigned int i;
|
||||
ebitset_elt *selt;
|
||||
ebitset_elt *delt;
|
||||
|
||||
selt = j < ssize ? selts[j] : 0;
|
||||
delt = j < dsize ? delts[j] : 0;
|
||||
|
||||
if (!selt || !delt)
|
||||
continue;
|
||||
|
||||
for (i = 0; i < EBITSET_ELT_WORDS; i++)
|
||||
if ((EBITSET_WORDS (selt)[i] & EBITSET_WORDS (delt)[i]))
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int
|
||||
ebitset_op3_cmp (dst, src1, src2, op)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
enum bitset_ops op;
|
||||
enum_bitset_ops op;
|
||||
{
|
||||
bitset_windex ssize1;
|
||||
bitset_windex ssize2;
|
||||
@@ -1035,37 +1023,6 @@ ebitset_op3 (dst, src1, src2, op)
|
||||
unsigned int i;
|
||||
bitset_windex j;
|
||||
|
||||
/* Fast track common, simple cases. */
|
||||
if (EBITSET_OP_ZERO_P (src2))
|
||||
{
|
||||
if (op == BITSET_OP_AND)
|
||||
{
|
||||
ebitset_weed (dst);
|
||||
changed = EBITSET_OP_ZERO_P (dst);
|
||||
ebitset_zero (dst);
|
||||
return changed;
|
||||
}
|
||||
else if (op == BITSET_OP_ANDN || op == BITSET_OP_OR
|
||||
|| op == BITSET_OP_XOR)
|
||||
{
|
||||
return ebitset_copy_compare (dst, src1);
|
||||
}
|
||||
}
|
||||
else if (EBITSET_OP_ZERO_P (src1))
|
||||
{
|
||||
if (op == BITSET_OP_AND || op == BITSET_OP_ANDN)
|
||||
{
|
||||
ebitset_weed (dst);
|
||||
changed = EBITSET_OP_ZERO_P (dst);
|
||||
ebitset_zero (dst);
|
||||
return changed;
|
||||
}
|
||||
else if (op == BITSET_OP_OR || op == BITSET_OP_XOR)
|
||||
{
|
||||
return ebitset_copy_compare (dst, src2);
|
||||
}
|
||||
}
|
||||
|
||||
ssize1 = EBITSET_SIZE (src1);
|
||||
ssize2 = EBITSET_SIZE (src2);
|
||||
dsize = EBITSET_SIZE (dst);
|
||||
@@ -1198,29 +1155,186 @@ ebitset_op3 (dst, src1, src2, op)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
ebitset_and (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
ebitset_and_cmp (dst, src1, src2);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
ebitset_and_cmp (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
int changed;
|
||||
|
||||
if (EBITSET_ZERO_P (src2))
|
||||
{
|
||||
ebitset_weed (dst);
|
||||
changed = EBITSET_ZERO_P (dst);
|
||||
ebitset_zero (dst);
|
||||
return changed;
|
||||
}
|
||||
else if (EBITSET_ZERO_P (src1))
|
||||
{
|
||||
ebitset_weed (dst);
|
||||
changed = EBITSET_ZERO_P (dst);
|
||||
ebitset_zero (dst);
|
||||
return changed;
|
||||
}
|
||||
return ebitset_op3_cmp (dst, src1, src2, BITSET_OP_AND);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
ebitset_andn (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
ebitset_andn_cmp (dst, src1, src2);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
ebitset_andn_cmp (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
int changed;
|
||||
|
||||
if (EBITSET_ZERO_P (src2))
|
||||
{
|
||||
return ebitset_copy_cmp (dst, src1);
|
||||
}
|
||||
else if (EBITSET_ZERO_P (src1))
|
||||
{
|
||||
ebitset_weed (dst);
|
||||
changed = EBITSET_ZERO_P (dst);
|
||||
ebitset_zero (dst);
|
||||
return changed;
|
||||
}
|
||||
return ebitset_op3_cmp (dst, src1, src2, BITSET_OP_ANDN);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
ebitset_or (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
ebitset_or_cmp (dst, src1, src2);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
ebitset_or_cmp (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
if (EBITSET_ZERO_P (src2))
|
||||
{
|
||||
return ebitset_copy_cmp (dst, src1);
|
||||
}
|
||||
else if (EBITSET_ZERO_P (src1))
|
||||
{
|
||||
return ebitset_copy_cmp (dst, src2);
|
||||
}
|
||||
return ebitset_op3_cmp (dst, src1, src2, BITSET_OP_OR);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
ebitset_xor (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
ebitset_xor_cmp (dst, src1, src2);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
ebitset_xor_cmp (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
if (EBITSET_ZERO_P (src2))
|
||||
{
|
||||
return ebitset_copy_cmp (dst, src1);
|
||||
}
|
||||
else if (EBITSET_ZERO_P (src1))
|
||||
{
|
||||
return ebitset_copy_cmp (dst, src2);
|
||||
}
|
||||
return ebitset_op3_cmp (dst, src1, src2, BITSET_OP_XOR);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
ebitset_copy (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
{
|
||||
if (BITSET_COMPATIBLE_ (dst, src))
|
||||
ebitset_copy_ (dst, src);
|
||||
else
|
||||
bitset_copy_ (dst, src);
|
||||
}
|
||||
|
||||
|
||||
/* Vector of operations for linked-list bitsets. */
|
||||
struct bitset_ops_struct ebitset_ops = {
|
||||
struct bitset_vtable ebitset_vtable = {
|
||||
ebitset_set,
|
||||
ebitset_reset,
|
||||
bitset_toggle_,
|
||||
ebitset_test,
|
||||
ebitset_size,
|
||||
ebitset_op1,
|
||||
ebitset_op2,
|
||||
ebitset_op3,
|
||||
bitset_op4,
|
||||
bitset_count_,
|
||||
ebitset_empty_p,
|
||||
ebitset_ones,
|
||||
ebitset_zero,
|
||||
ebitset_copy,
|
||||
ebitset_disjoint_p,
|
||||
ebitset_equal_p,
|
||||
ebitset_not,
|
||||
ebitset_subset_p,
|
||||
ebitset_and,
|
||||
ebitset_and_cmp,
|
||||
ebitset_andn,
|
||||
ebitset_andn_cmp,
|
||||
ebitset_or,
|
||||
ebitset_or_cmp,
|
||||
ebitset_xor,
|
||||
ebitset_xor_cmp,
|
||||
bitset_and_or_,
|
||||
bitset_and_or_cmp_,
|
||||
bitset_andn_or_,
|
||||
bitset_andn_or_cmp_,
|
||||
bitset_or_and_,
|
||||
bitset_or_and_cmp_,
|
||||
ebitset_list,
|
||||
ebitset_reverse_list,
|
||||
ebitset_list_reverse,
|
||||
ebitset_free,
|
||||
BITSET_TABLE
|
||||
};
|
||||
|
||||
|
||||
/* Return size of initial structure. */
|
||||
int
|
||||
size_t
|
||||
ebitset_bytes (n_bits)
|
||||
bitset_bindex n_bits ATTRIBUTE_UNUSED;
|
||||
{
|
||||
return sizeof (struct bitset_struct);
|
||||
return sizeof (struct ebitset_struct);
|
||||
}
|
||||
|
||||
|
||||
@@ -1231,13 +1345,13 @@ ebitset_init (bset, n_bits)
|
||||
bitset bset;
|
||||
bitset_bindex n_bits;
|
||||
{
|
||||
unsigned int size;
|
||||
bitset_windex size;
|
||||
|
||||
bset->b.ops = &ebitset_ops;
|
||||
bset->b.vtable = &ebitset_vtable;
|
||||
|
||||
bset->b.csize = EBITSET_ELT_WORDS;
|
||||
|
||||
EBITSET_OP_ZERO_SET (bset);
|
||||
EBITSET_ZERO_SET (bset);
|
||||
|
||||
size = n_bits ? (n_bits + EBITSET_ELT_BITS - 1) / EBITSET_ELT_BITS
|
||||
: EBITSET_INITIAL_SIZE;
|
||||
|
||||
+2
-2
@@ -19,9 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#ifndef _EBITSET_H
|
||||
#define _EBITSET_H
|
||||
|
||||
#include "bbitset.h"
|
||||
#include "bitset.h"
|
||||
|
||||
extern int ebitset_bytes PARAMS ((bitset_bindex));
|
||||
extern size_t ebitset_bytes PARAMS ((bitset_bindex));
|
||||
|
||||
extern bitset ebitset_init PARAMS ((bitset, bitset_bindex));
|
||||
|
||||
|
||||
+381
-222
@@ -23,7 +23,9 @@
|
||||
|
||||
#include "lbitset.h"
|
||||
#include "obstack.h"
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/* This file implements linked-list bitsets. These bitsets can be of
|
||||
arbitrary length and are more efficient than arrays of bits for
|
||||
@@ -62,24 +64,9 @@ typedef struct lbitset_elt_struct
|
||||
lbitset_elt;
|
||||
|
||||
|
||||
/* Head of lbitset linked list. */
|
||||
typedef struct lbitset_struct
|
||||
{
|
||||
lbitset_elt *head; /* First element in linked list. */
|
||||
lbitset_elt *tail; /* Last element in linked list. */
|
||||
}
|
||||
*lbitset;
|
||||
|
||||
|
||||
struct bitset_struct
|
||||
{
|
||||
struct bbitset_struct b;
|
||||
struct lbitset_struct l;
|
||||
};
|
||||
|
||||
|
||||
enum lbitset_find_mode
|
||||
{ LBITSET_FIND, LBITSET_CREATE, LBITSET_SUBST };
|
||||
typedef int enum_lbitset_find_mode;
|
||||
|
||||
static lbitset_elt lbitset_zero_elts[3]; /* Elements of all zero bits. */
|
||||
|
||||
@@ -94,7 +81,7 @@ static void lbitset_elt_link PARAMS ((bitset, lbitset_elt *));
|
||||
static void lbitset_elt_unlink PARAMS ((bitset, lbitset_elt *));
|
||||
static void lbitset_elt_free PARAMS ((lbitset_elt *));
|
||||
static lbitset_elt *lbitset_elt_find PARAMS ((bitset, bitset_windex,
|
||||
enum lbitset_find_mode));
|
||||
enum_lbitset_find_mode));
|
||||
static int lbitset_elt_zero_p PARAMS ((lbitset_elt *));
|
||||
|
||||
static void lbitset_prune PARAMS ((bitset, lbitset_elt *));
|
||||
@@ -102,22 +89,34 @@ static void lbitset_weed PARAMS ((bitset));
|
||||
static void lbitset_zero PARAMS ((bitset));
|
||||
static int lbitset_equal_p PARAMS ((bitset, bitset));
|
||||
static void lbitset_copy PARAMS ((bitset, bitset));
|
||||
static int lbitset_copy_compare PARAMS ((bitset, bitset));
|
||||
static int lbitset_copy_cmp PARAMS ((bitset, bitset));
|
||||
static void lbitset_set PARAMS ((bitset, bitset_bindex));
|
||||
static void lbitset_reset PARAMS ((bitset, bitset_bindex));
|
||||
static int lbitset_test PARAMS ((bitset, bitset_bindex));
|
||||
static int lbitset_size PARAMS ((bitset));
|
||||
static int lbitset_op1 PARAMS ((bitset, enum bitset_ops));
|
||||
static int lbitset_op2 PARAMS ((bitset, bitset, enum bitset_ops));
|
||||
static int lbitset_op3 PARAMS ((bitset, bitset, bitset, enum bitset_ops));
|
||||
static int lbitset_list PARAMS ((bitset, bitset_bindex *, bitset_bindex,
|
||||
bitset_bindex *));
|
||||
static int lbitset_reverse_list
|
||||
static bitset_bindex lbitset_size PARAMS ((bitset));
|
||||
static int lbitset_op3_cmp PARAMS ((bitset, bitset, bitset, enum_bitset_ops));
|
||||
static void lbitset_and PARAMS ((bitset, bitset, bitset));
|
||||
static int lbitset_and_cmp PARAMS ((bitset, bitset, bitset));
|
||||
static void lbitset_andn PARAMS ((bitset, bitset, bitset));
|
||||
static int lbitset_andn_cmp PARAMS ((bitset, bitset, bitset));
|
||||
static void lbitset_or PARAMS ((bitset, bitset, bitset));
|
||||
static int lbitset_or_cmp PARAMS ((bitset, bitset, bitset));
|
||||
static void lbitset_xor PARAMS ((bitset, bitset, bitset));
|
||||
static int lbitset_xor_cmp PARAMS ((bitset, bitset, bitset));
|
||||
static bitset_bindex lbitset_list PARAMS ((bitset, bitset_bindex *,
|
||||
bitset_bindex, bitset_bindex *));
|
||||
static bitset_bindex lbitset_list_reverse
|
||||
PARAMS ((bitset, bitset_bindex *, bitset_bindex, bitset_bindex *));
|
||||
static int lbitset_empty_p PARAMS ((bitset));
|
||||
static void lbitset_ones PARAMS ((bitset));
|
||||
static void lbitset_not PARAMS ((bitset, bitset));
|
||||
static int lbitset_subset_p PARAMS ((bitset, bitset));
|
||||
static int lbitset_disjoint_p PARAMS ((bitset, bitset));
|
||||
static void lbitset_free PARAMS ((bitset));
|
||||
extern void debug_lbitset PARAMS ((bitset));
|
||||
|
||||
|
||||
#define LBITSET_CURRENT1(X) (lbitset_elt *)((char *)(X) + ((char *)&(((lbitset_elt *)(X))->next) - (char *)&(((lbitset_elt *)(X))->words)))
|
||||
#define LBITSET_CURRENT1(X) \
|
||||
((lbitset_elt *) (void *) ((char *) (X) - offsetof (lbitset_elt, words)))
|
||||
|
||||
#define LBITSET_CURRENT(X) LBITSET_CURRENT1((X)->b.cdata)
|
||||
|
||||
@@ -365,7 +364,7 @@ static lbitset_elt *
|
||||
lbitset_elt_find (bset, windex, mode)
|
||||
bitset bset;
|
||||
bitset_windex windex;
|
||||
enum lbitset_find_mode mode;
|
||||
enum_lbitset_find_mode mode;
|
||||
{
|
||||
lbitset_elt *elt;
|
||||
lbitset_elt *current;
|
||||
@@ -398,7 +397,7 @@ lbitset_elt_find (bset, windex, mode)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* `element' is the nearest to the one we want. If it's not the one
|
||||
/* ELT is the nearest to the one we want. If it's not the one
|
||||
we want, the one we want does not exist. */
|
||||
if (elt && (windex - elt->index) < LBITSET_ELT_WORDS)
|
||||
{
|
||||
@@ -415,7 +414,7 @@ lbitset_elt_find (bset, windex, mode)
|
||||
return 0;
|
||||
|
||||
case LBITSET_CREATE:
|
||||
windex = (windex / (unsigned) LBITSET_ELT_WORDS) * LBITSET_ELT_WORDS;
|
||||
windex -= windex % LBITSET_ELT_WORDS;
|
||||
|
||||
elt = lbitset_elt_calloc ();
|
||||
elt->index = windex;
|
||||
@@ -449,7 +448,7 @@ lbitset_weed (bset)
|
||||
|
||||
|
||||
/* Set all bits in the bitset to zero. */
|
||||
static inline void
|
||||
static void
|
||||
lbitset_zero (bset)
|
||||
bitset bset;
|
||||
{
|
||||
@@ -464,6 +463,7 @@ lbitset_zero (bset)
|
||||
}
|
||||
|
||||
|
||||
/* Return 1 if DST == SRC. */
|
||||
static inline int
|
||||
lbitset_equal_p (dst, src)
|
||||
bitset dst;
|
||||
@@ -538,7 +538,7 @@ lbitset_copy (dst, src)
|
||||
/* Copy bits from bitset SRC to bitset DST. Return non-zero if
|
||||
bitsets different. */
|
||||
static inline int
|
||||
lbitset_copy_compare (dst, src)
|
||||
lbitset_copy_cmp (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
{
|
||||
@@ -560,7 +560,7 @@ lbitset_copy_compare (dst, src)
|
||||
|
||||
|
||||
/* Return size in bits of bitset SRC. */
|
||||
static int
|
||||
static bitset_bindex
|
||||
lbitset_size (src)
|
||||
bitset src;
|
||||
{
|
||||
@@ -635,8 +635,8 @@ lbitset_free (bset)
|
||||
/* Find list of up to NUM bits set in BSET starting from and including
|
||||
*NEXT and store in array LIST. Return with actual number of bits
|
||||
found and with *NEXT indicating where search stopped. */
|
||||
static int
|
||||
lbitset_reverse_list (bset, list, num, next)
|
||||
static bitset_bindex
|
||||
lbitset_list_reverse (bset, list, num, next)
|
||||
bitset bset;
|
||||
bitset_bindex *list;
|
||||
bitset_bindex num;
|
||||
@@ -673,13 +673,24 @@ lbitset_reverse_list (bset, list, num, next)
|
||||
if (!elt)
|
||||
return 0;
|
||||
|
||||
/* If num is 1, we could speed things up with a binary search
|
||||
of the word of interest. */
|
||||
if (windex >= elt->index + LBITSET_ELT_WORDS)
|
||||
{
|
||||
/* We are trying to start in no-mans land so start
|
||||
at end of current elt. */
|
||||
bcount = BITSET_WORD_BITS - 1;
|
||||
windex = elt->index + LBITSET_ELT_WORDS - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
bcount = bitno % BITSET_WORD_BITS;
|
||||
}
|
||||
|
||||
count = 0;
|
||||
bcount = bitno % BITSET_WORD_BITS;
|
||||
boffset = windex * BITSET_WORD_BITS;
|
||||
|
||||
/* If num is 1, we could speed things up with a binary search
|
||||
of the word of interest. */
|
||||
|
||||
while (elt)
|
||||
{
|
||||
bitset_word *srcp = elt->words;
|
||||
@@ -722,7 +733,7 @@ lbitset_reverse_list (bset, list, num, next)
|
||||
/* Find list of up to NUM bits set in BSET starting from and including
|
||||
*NEXT and store in array LIST. Return with actual number of bits
|
||||
found and with *NEXT indicating where search stopped. */
|
||||
static int
|
||||
static bitset_bindex
|
||||
lbitset_list (bset, list, num, next)
|
||||
bitset bset;
|
||||
bitset_bindex *list;
|
||||
@@ -926,168 +937,161 @@ lbitset_list (bset, list, num, next)
|
||||
|
||||
|
||||
static int
|
||||
lbitset_op1 (dst, op)
|
||||
lbitset_empty_p (dst)
|
||||
bitset dst;
|
||||
enum bitset_ops op;
|
||||
{
|
||||
unsigned int i;
|
||||
bitset_windex windex;
|
||||
lbitset_elt *elt;
|
||||
|
||||
switch (op)
|
||||
{
|
||||
case BITSET_OP_ZERO:
|
||||
lbitset_zero (dst);
|
||||
break;
|
||||
|
||||
case BITSET_OP_ONES:
|
||||
/* This is a decidedly unfriendly operation for a linked list
|
||||
bitset! */
|
||||
elt = LBITSET_TAIL (dst);
|
||||
/* Ignore empty set. */
|
||||
if (!elt)
|
||||
return 0;
|
||||
|
||||
windex = elt->index;
|
||||
for (i = 0; i < windex; i += LBITSET_ELT_WORDS)
|
||||
{
|
||||
/* Create new elements if they cannot be found. */
|
||||
elt = lbitset_elt_find (dst, i, LBITSET_CREATE);
|
||||
memset (elt->words, -1, sizeof (elt->words));
|
||||
}
|
||||
break;
|
||||
|
||||
case BITSET_OP_EMPTY_P:
|
||||
lbitset_weed (dst);
|
||||
if (LBITSET_HEAD (dst))
|
||||
return 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
|
||||
lbitset_weed (dst);
|
||||
if (LBITSET_HEAD (dst))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
lbitset_op2 (dst, src, op)
|
||||
static void
|
||||
lbitset_ones (dst)
|
||||
bitset dst;
|
||||
{
|
||||
bitset_windex i;
|
||||
bitset_windex windex;
|
||||
lbitset_elt *elt;
|
||||
|
||||
/* This is a decidedly unfriendly operation for a linked list
|
||||
bitset! It makes a sparse bitset become dense. An alternative
|
||||
is to have a flag that indicates that the bitset stores the
|
||||
complement of what it indicates. */
|
||||
elt = LBITSET_TAIL (dst);
|
||||
/* Ignore empty set. */
|
||||
if (!elt)
|
||||
return;
|
||||
|
||||
windex = elt->index;
|
||||
for (i = 0; i < windex; i += LBITSET_ELT_WORDS)
|
||||
{
|
||||
/* Create new elements if they cannot be found. */
|
||||
elt = lbitset_elt_find (dst, i, LBITSET_CREATE);
|
||||
memset (elt->words, -1, sizeof (elt->words));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
lbitset_not (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
enum bitset_ops op;
|
||||
{
|
||||
lbitset_elt *elt;
|
||||
lbitset_elt *selt;
|
||||
lbitset_elt *delt;
|
||||
unsigned int i;
|
||||
bitset_windex i;
|
||||
unsigned int j;
|
||||
bitset_windex windex;
|
||||
|
||||
switch (op)
|
||||
/* This is another unfriendly operation for a linked list
|
||||
bitset! */
|
||||
elt = LBITSET_TAIL (dst);
|
||||
/* Ignore empty set. */
|
||||
if (!elt)
|
||||
return;
|
||||
|
||||
windex = elt->index;
|
||||
for (i = 0; i < windex; i += LBITSET_ELT_WORDS)
|
||||
{
|
||||
case BITSET_OP_COPY:
|
||||
lbitset_copy (dst, src);
|
||||
break;
|
||||
|
||||
case BITSET_OP_NOT:
|
||||
/* This is another unfriendly operation for a linked list
|
||||
bitset! */
|
||||
elt = LBITSET_TAIL (dst);
|
||||
/* Ignore empty set. */
|
||||
if (!elt)
|
||||
return 0;
|
||||
|
||||
windex = elt->index;
|
||||
for (i = 0; i < windex; i += LBITSET_ELT_WORDS)
|
||||
{
|
||||
/* Create new elements for dst if they cannot be found
|
||||
or substitute zero elements if src elements not found. */
|
||||
selt = lbitset_elt_find (dst, i, LBITSET_SUBST);
|
||||
delt = lbitset_elt_find (dst, i, LBITSET_CREATE);
|
||||
|
||||
for (j = 0; j < LBITSET_ELT_WORDS; j++)
|
||||
delt->words[j] = ~selt->words[j];
|
||||
}
|
||||
lbitset_weed (dst);
|
||||
break;
|
||||
|
||||
/* Return 1 if DST == SRC. */
|
||||
case BITSET_OP_EQUAL_P:
|
||||
return lbitset_equal_p (dst, src);
|
||||
break;
|
||||
|
||||
/* Return 1 if DST == DST | SRC. */
|
||||
case BITSET_OP_SUBSET_P:
|
||||
for (selt = LBITSET_HEAD (src), delt = LBITSET_HEAD (dst);
|
||||
selt || delt; selt = selt->next, delt = delt->next)
|
||||
{
|
||||
if (!selt)
|
||||
selt = &lbitset_zero_elts[0];
|
||||
else if (!delt)
|
||||
delt = &lbitset_zero_elts[0];
|
||||
else if (selt->index != delt->index)
|
||||
{
|
||||
if (selt->index < delt->index)
|
||||
{
|
||||
lbitset_zero_elts[2].next = delt;
|
||||
delt = &lbitset_zero_elts[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
lbitset_zero_elts[1].next = selt;
|
||||
selt = &lbitset_zero_elts[1];
|
||||
}
|
||||
}
|
||||
|
||||
for (j = 0; j < LBITSET_ELT_WORDS; j++)
|
||||
if (delt->words[j] != (selt->words[j] | delt->words[j]))
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
||||
/* Return 1 if DST & SRC == 0. */
|
||||
case BITSET_OP_DISJOINT_P:
|
||||
for (selt = LBITSET_HEAD (src), delt = LBITSET_HEAD (dst);
|
||||
selt && delt; selt = selt->next, delt = delt->next)
|
||||
{
|
||||
if (selt->index != delt->index)
|
||||
{
|
||||
if (selt->index < delt->index)
|
||||
{
|
||||
lbitset_zero_elts[2].next = delt;
|
||||
delt = &lbitset_zero_elts[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
lbitset_zero_elts[1].next = selt;
|
||||
selt = &lbitset_zero_elts[1];
|
||||
}
|
||||
/* Since the elements are different, there is no
|
||||
intersection of these elements. */
|
||||
continue;
|
||||
}
|
||||
|
||||
for (j = 0; j < LBITSET_ELT_WORDS; j++)
|
||||
if (selt->words[j] & delt->words[j])
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
abort ();
|
||||
/* Create new elements for dst if they cannot be found
|
||||
or substitute zero elements if src elements not found. */
|
||||
selt = lbitset_elt_find (src, i, LBITSET_SUBST);
|
||||
delt = lbitset_elt_find (dst, i, LBITSET_CREATE);
|
||||
|
||||
for (j = 0; j < LBITSET_ELT_WORDS; j++)
|
||||
delt->words[j] = ~selt->words[j];
|
||||
}
|
||||
lbitset_weed (dst);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* Return 1 if DST == DST | SRC. */
|
||||
static int
|
||||
lbitset_subset_p (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
{
|
||||
lbitset_elt *selt;
|
||||
lbitset_elt *delt;
|
||||
unsigned int j;
|
||||
|
||||
for (selt = LBITSET_HEAD (src), delt = LBITSET_HEAD (dst);
|
||||
selt || delt; selt = selt->next, delt = delt->next)
|
||||
{
|
||||
if (!selt)
|
||||
selt = &lbitset_zero_elts[0];
|
||||
else if (!delt)
|
||||
delt = &lbitset_zero_elts[0];
|
||||
else if (selt->index != delt->index)
|
||||
{
|
||||
if (selt->index < delt->index)
|
||||
{
|
||||
lbitset_zero_elts[2].next = delt;
|
||||
delt = &lbitset_zero_elts[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
lbitset_zero_elts[1].next = selt;
|
||||
selt = &lbitset_zero_elts[1];
|
||||
}
|
||||
}
|
||||
|
||||
for (j = 0; j < LBITSET_ELT_WORDS; j++)
|
||||
if (delt->words[j] != (selt->words[j] | delt->words[j]))
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* Return 1 if DST & SRC == 0. */
|
||||
static int
|
||||
lbitset_disjoint_p (dst, src)
|
||||
bitset dst;
|
||||
bitset src;
|
||||
{
|
||||
lbitset_elt *selt;
|
||||
lbitset_elt *delt;
|
||||
unsigned int j;
|
||||
|
||||
for (selt = LBITSET_HEAD (src), delt = LBITSET_HEAD (dst);
|
||||
selt && delt; selt = selt->next, delt = delt->next)
|
||||
{
|
||||
if (selt->index != delt->index)
|
||||
{
|
||||
if (selt->index < delt->index)
|
||||
{
|
||||
lbitset_zero_elts[2].next = delt;
|
||||
delt = &lbitset_zero_elts[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
lbitset_zero_elts[1].next = selt;
|
||||
selt = &lbitset_zero_elts[1];
|
||||
}
|
||||
/* Since the elements are different, there is no
|
||||
intersection of these elements. */
|
||||
continue;
|
||||
}
|
||||
|
||||
for (j = 0; j < LBITSET_ELT_WORDS; j++)
|
||||
if (selt->words[j] & delt->words[j])
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
lbitset_op3 (dst, src1, src2, op)
|
||||
lbitset_op3_cmp (dst, src1, src2, op)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
enum bitset_ops op;
|
||||
enum_bitset_ops op;
|
||||
{
|
||||
lbitset_elt *selt1 = LBITSET_HEAD (src1);
|
||||
lbitset_elt *selt2 = LBITSET_HEAD (src2);
|
||||
@@ -1104,42 +1108,11 @@ lbitset_op3 (dst, src1, src2, op)
|
||||
int changed = 0;
|
||||
unsigned int i;
|
||||
|
||||
/* Fast track common, simple cases. */
|
||||
if (!selt2)
|
||||
{
|
||||
if (op == BITSET_OP_AND)
|
||||
{
|
||||
lbitset_weed (dst);
|
||||
changed = !LBITSET_HEAD (dst);
|
||||
lbitset_zero (dst);
|
||||
return changed;
|
||||
}
|
||||
else if (op == BITSET_OP_ANDN || op == BITSET_OP_OR
|
||||
|| op == BITSET_OP_XOR)
|
||||
{
|
||||
return lbitset_copy_compare (dst, src1);
|
||||
}
|
||||
}
|
||||
else if (!selt1)
|
||||
{
|
||||
if (op == BITSET_OP_AND || op == BITSET_OP_ANDN)
|
||||
{
|
||||
lbitset_weed (dst);
|
||||
changed = !LBITSET_HEAD (dst);
|
||||
lbitset_zero (dst);
|
||||
return changed;
|
||||
}
|
||||
else if (op == BITSET_OP_OR || op == BITSET_OP_XOR)
|
||||
{
|
||||
return lbitset_copy_compare (dst, src2);
|
||||
}
|
||||
}
|
||||
|
||||
LBITSET_HEAD (dst) = 0;
|
||||
dst->b.csize = 0;
|
||||
|
||||
windex1 = (selt1) ? selt1->index : BITSET_INDEX_MAX;
|
||||
windex2 = (selt2) ? selt2->index : BITSET_INDEX_MAX;
|
||||
windex1 = (selt1) ? selt1->index : BITSET_WINDEX_MAX;
|
||||
windex2 = (selt2) ? selt2->index : BITSET_WINDEX_MAX;
|
||||
|
||||
while (selt1 || selt2)
|
||||
{
|
||||
@@ -1151,9 +1124,9 @@ lbitset_op3 (dst, src1, src2, op)
|
||||
stmp1 = selt1;
|
||||
stmp2 = selt2;
|
||||
selt1 = selt1->next;
|
||||
windex1 = (selt1) ? selt1->index : BITSET_INDEX_MAX;
|
||||
windex1 = (selt1) ? selt1->index : BITSET_WINDEX_MAX;
|
||||
selt2 = selt2->next;
|
||||
windex2 = (selt2) ? selt2->index : BITSET_INDEX_MAX;
|
||||
windex2 = (selt2) ? selt2->index : BITSET_WINDEX_MAX;
|
||||
}
|
||||
else if (windex1 < windex2)
|
||||
{
|
||||
@@ -1161,7 +1134,7 @@ lbitset_op3 (dst, src1, src2, op)
|
||||
stmp1 = selt1;
|
||||
stmp2 = &lbitset_zero_elts[0];
|
||||
selt1 = selt1->next;
|
||||
windex1 = (selt1) ? selt1->index : BITSET_INDEX_MAX;
|
||||
windex1 = (selt1) ? selt1->index : BITSET_WINDEX_MAX;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1169,7 +1142,7 @@ lbitset_op3 (dst, src1, src2, op)
|
||||
stmp1 = &lbitset_zero_elts[0];
|
||||
stmp2 = selt2;
|
||||
selt2 = selt2->next;
|
||||
windex2 = (selt2) ? selt2->index : BITSET_INDEX_MAX;
|
||||
windex2 = (selt2) ? selt2->index : BITSET_WINDEX_MAX;
|
||||
}
|
||||
|
||||
/* Find the appropriate element from DST. Begin by discarding
|
||||
@@ -1275,40 +1248,195 @@ lbitset_op3 (dst, src1, src2, op)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
lbitset_and (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
lbitset_and_cmp (dst, src1, src2);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
lbitset_and_cmp (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
lbitset_elt *selt1 = LBITSET_HEAD (src1);
|
||||
lbitset_elt *selt2 = LBITSET_HEAD (src2);
|
||||
int changed;
|
||||
|
||||
if (!selt2)
|
||||
{
|
||||
lbitset_weed (dst);
|
||||
changed = !LBITSET_HEAD (dst);
|
||||
lbitset_zero (dst);
|
||||
return changed;
|
||||
}
|
||||
else if (!selt1)
|
||||
{
|
||||
lbitset_weed (dst);
|
||||
changed = !LBITSET_HEAD (dst);
|
||||
lbitset_zero (dst);
|
||||
return changed;
|
||||
}
|
||||
return lbitset_op3_cmp (dst, src1, src2, BITSET_OP_AND);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
lbitset_andn (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
lbitset_andn_cmp (dst, src1, src2);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
lbitset_andn_cmp (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
lbitset_elt *selt1 = LBITSET_HEAD (src1);
|
||||
lbitset_elt *selt2 = LBITSET_HEAD (src2);
|
||||
int changed;
|
||||
|
||||
if (!selt2)
|
||||
{
|
||||
return lbitset_copy_cmp (dst, src1);
|
||||
}
|
||||
else if (!selt1)
|
||||
{
|
||||
lbitset_weed (dst);
|
||||
changed = !LBITSET_HEAD (dst);
|
||||
lbitset_zero (dst);
|
||||
return changed;
|
||||
}
|
||||
return lbitset_op3_cmp (dst, src1, src2, BITSET_OP_ANDN);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
lbitset_or (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
lbitset_or_cmp (dst, src1, src2);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
lbitset_or_cmp (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
lbitset_elt *selt1 = LBITSET_HEAD (src1);
|
||||
lbitset_elt *selt2 = LBITSET_HEAD (src2);
|
||||
|
||||
if (!selt2)
|
||||
{
|
||||
return lbitset_copy_cmp (dst, src1);
|
||||
}
|
||||
else if (!selt1)
|
||||
{
|
||||
return lbitset_copy_cmp (dst, src2);
|
||||
}
|
||||
return lbitset_op3_cmp (dst, src1, src2, BITSET_OP_OR);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
lbitset_xor (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
lbitset_xor_cmp (dst, src1, src2);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
lbitset_xor_cmp (dst, src1, src2)
|
||||
bitset dst;
|
||||
bitset src1;
|
||||
bitset src2;
|
||||
{
|
||||
lbitset_elt *selt1 = LBITSET_HEAD (src1);
|
||||
lbitset_elt *selt2 = LBITSET_HEAD (src2);
|
||||
|
||||
if (!selt2)
|
||||
{
|
||||
return lbitset_copy_cmp (dst, src1);
|
||||
}
|
||||
else if (!selt1)
|
||||
{
|
||||
return lbitset_copy_cmp (dst, src2);
|
||||
}
|
||||
return lbitset_op3_cmp (dst, src1, src2, BITSET_OP_XOR);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Vector of operations for linked-list bitsets. */
|
||||
struct bitset_ops_struct lbitset_ops = {
|
||||
struct bitset_vtable lbitset_vtable = {
|
||||
lbitset_set,
|
||||
lbitset_reset,
|
||||
bitset_toggle_,
|
||||
lbitset_test,
|
||||
lbitset_size,
|
||||
lbitset_op1,
|
||||
lbitset_op2,
|
||||
lbitset_op3,
|
||||
bitset_op4,
|
||||
bitset_count_,
|
||||
lbitset_empty_p,
|
||||
lbitset_ones,
|
||||
lbitset_zero,
|
||||
lbitset_copy,
|
||||
lbitset_disjoint_p,
|
||||
lbitset_equal_p,
|
||||
lbitset_not,
|
||||
lbitset_subset_p,
|
||||
lbitset_and,
|
||||
lbitset_and_cmp,
|
||||
lbitset_andn,
|
||||
lbitset_andn_cmp,
|
||||
lbitset_or,
|
||||
lbitset_or_cmp,
|
||||
lbitset_xor,
|
||||
lbitset_xor_cmp,
|
||||
bitset_and_or_,
|
||||
bitset_and_or_cmp_,
|
||||
bitset_andn_or_,
|
||||
bitset_andn_or_cmp_,
|
||||
bitset_or_and_,
|
||||
bitset_or_and_cmp_,
|
||||
lbitset_list,
|
||||
lbitset_reverse_list,
|
||||
lbitset_list_reverse,
|
||||
lbitset_free,
|
||||
BITSET_LIST
|
||||
};
|
||||
|
||||
|
||||
/* Return size of initial structure. */
|
||||
int
|
||||
size_t
|
||||
lbitset_bytes (n_bits)
|
||||
bitset_bindex n_bits ATTRIBUTE_UNUSED;
|
||||
{
|
||||
return sizeof (struct bitset_struct);
|
||||
return sizeof (struct lbitset_struct);
|
||||
}
|
||||
|
||||
|
||||
/* Initialize a bitset. */
|
||||
|
||||
bitset
|
||||
lbitset_init (bset, n_bits)
|
||||
bitset bset;
|
||||
bitset_bindex n_bits ATTRIBUTE_UNUSED;
|
||||
{
|
||||
bset->b.ops = &lbitset_ops;
|
||||
bset->b.vtable = &lbitset_vtable;
|
||||
return bset;
|
||||
}
|
||||
|
||||
@@ -1323,3 +1451,34 @@ lbitset_release_memory ()
|
||||
obstack_free (&lbitset_obstack, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Function to be called from debugger to debug lbitset. */
|
||||
void
|
||||
debug_lbitset (bset)
|
||||
bitset bset;
|
||||
{
|
||||
lbitset_elt *elt;
|
||||
unsigned int i;
|
||||
|
||||
if (!bset)
|
||||
return;
|
||||
|
||||
for (elt = LBITSET_HEAD (bset); elt; elt = elt->next)
|
||||
{
|
||||
fprintf (stderr, "Elt %lu\n", (unsigned long) elt->index);
|
||||
for (i = 0; i < LBITSET_ELT_WORDS; i++)
|
||||
{
|
||||
unsigned int j;
|
||||
bitset_word word;
|
||||
|
||||
word = elt->words[i];
|
||||
|
||||
fprintf (stderr, " Word %u:", i);
|
||||
for (j = 0; j < LBITSET_WORD_BITS; j++)
|
||||
if ((word & ((bitset_word) 1 << j)))
|
||||
fprintf (stderr, " %u", j);
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -19,9 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#ifndef _LBITSET_H
|
||||
#define _LBITSET_H
|
||||
|
||||
#include "bbitset.h"
|
||||
#include "bitset.h"
|
||||
|
||||
extern int lbitset_bytes PARAMS ((bitset_bindex));
|
||||
extern size_t lbitset_bytes PARAMS ((bitset_bindex));
|
||||
|
||||
extern bitset lbitset_init PARAMS ((bitset, bitset_bindex));
|
||||
|
||||
|
||||
+29
-19
@@ -1,27 +1,26 @@
|
||||
/* Timing variables for measuring compiler performance.
|
||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000, 2002 Free Software Foundation, Inc.
|
||||
Contributed by Alex Samuel <samuel@codesourcery.com>
|
||||
|
||||
This file is part of GCC.
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
GCC is free software; you can redistribute it and/or modify it under
|
||||
Bison is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 2, or (at your option) any later
|
||||
version.
|
||||
|
||||
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
Bison is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GCC; see the file COPYING. If not, write to the Free
|
||||
along with Bison; see the file COPYING. If not, write to the Free
|
||||
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA. */
|
||||
|
||||
#if IN_GCC
|
||||
|
||||
/* These are the original includes --akim. */
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "intl.h"
|
||||
@@ -29,9 +28,14 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
|
||||
#else
|
||||
|
||||
/* These are my replacements by hand --akim.
|
||||
There is another change below, flag with IN_GCC. */
|
||||
/* This source file is taken from the GCC source code, with slight
|
||||
modifications that are under control of the IN_GCC preprocessor
|
||||
variable. The !IN_GCC part of this file is specific to Bison. */
|
||||
|
||||
# include "../src/system.h"
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# endif
|
||||
int time_report = 0;
|
||||
|
||||
#endif
|
||||
@@ -129,7 +133,7 @@ static float clocks_to_msec;
|
||||
|
||||
/* See timevar.h for an explanation of timing variables. */
|
||||
|
||||
/* This macro evaluates to non-zero if timing variables are enabled. */
|
||||
/* This macro evaluates to nonzero if timing variables are enabled. */
|
||||
#define TIMEVAR_ENABLE (time_report)
|
||||
|
||||
/* A timing variable. */
|
||||
@@ -191,7 +195,7 @@ static void timevar_accumulate
|
||||
|
||||
/* Fill the current times into TIME. The definition of this function
|
||||
also defines any or all of the HAVE_USER_TIME, HAVE_SYS_TIME, and
|
||||
HAVA_WALL_TIME macros. */
|
||||
HAVE_WALL_TIME macros. */
|
||||
|
||||
static void
|
||||
get_time (now)
|
||||
@@ -207,18 +211,24 @@ get_time (now)
|
||||
{
|
||||
#ifdef USE_TIMES
|
||||
struct tms tms;
|
||||
now->wall = times (&tms) * ticks_to_msec;
|
||||
now->wall = times (&tms) * ticks_to_msec;
|
||||
#if IN_GCC
|
||||
now->user = tms.tms_utime * ticks_to_msec;
|
||||
now->sys = tms.tms_stime * ticks_to_msec;
|
||||
#else
|
||||
now->user = (tms.tms_utime + tms.tms_cutime) * ticks_to_msec;
|
||||
now->sys = (tms.tms_stime + tms.tms_cstime) * ticks_to_msec;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef USE_GETRUSAGE
|
||||
struct rusage rusage;
|
||||
#if IN_GCC
|
||||
getrusage (RUSAGE_SELF, &rusage);
|
||||
#else
|
||||
getrusage (RUSAGE_CHILDREN, &rusage);
|
||||
#endif
|
||||
now->user = rusage.ru_utime.tv_sec + rusage.ru_utime.tv_usec * 1e-6;
|
||||
now->sys = rusage.ru_stime.tv_sec + rusage.ru_stime.tv_usec * 1e-6;
|
||||
getrusage (RUSAGE_CHILDREN, &rusage);
|
||||
now->user += rusage.ru_utime.tv_sec + rusage.ru_utime.tv_usec * 1e-6;
|
||||
now->sys += rusage.ru_stime.tv_sec + rusage.ru_stime.tv_usec * 1e-6;
|
||||
#endif
|
||||
#ifdef USE_CLOCK
|
||||
now->user = clock () * clocks_to_msec;
|
||||
@@ -230,9 +240,9 @@ get_time (now)
|
||||
|
||||
static void
|
||||
timevar_accumulate (timer, start_time, stop_time)
|
||||
struct timevar_time_def *timer;
|
||||
struct timevar_time_def *start_time;
|
||||
struct timevar_time_def *stop_time;
|
||||
struct timevar_time_def *timer;
|
||||
struct timevar_time_def *start_time;
|
||||
struct timevar_time_def *stop_time;
|
||||
{
|
||||
timer->user += stop_time->user - start_time->user;
|
||||
timer->sys += stop_time->sys - start_time->sys;
|
||||
@@ -551,6 +561,6 @@ print_time (str, total)
|
||||
fprintf (stderr,
|
||||
_("time in %s: %ld.%06ld (%ld%%)\n"),
|
||||
str, total / 1000000, total % 1000000,
|
||||
all_time == 0 ? 0
|
||||
: (long) (((100.0 * (double) total) / (double) all_time) + .5));
|
||||
all_time == 0 ? 0
|
||||
: (long) (((100.0 * (double) total) / (double) all_time) + .5));
|
||||
}
|
||||
|
||||
+6
-6
@@ -1,22 +1,22 @@
|
||||
/* This file contains the definitions for timing variables used to -*- C -*-
|
||||
measure run-time performance of the compiler.
|
||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
Contributed by Alex Samuel <samuel@codesourcery.com>
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
Contributed by Akim Demaille <akim@freefriends.org>.
|
||||
|
||||
This file is part of GCC.
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
GCC is free software; you can redistribute it and/or modify
|
||||
Bison is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GCC is distributed in the hope that it will be useful,
|
||||
Bison is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GCC; see the file COPYING. If not, write to
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
+7
-7
@@ -2,20 +2,20 @@
|
||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
Contributed by Alex Samuel <samuel@codesourcery.com>
|
||||
|
||||
This file is part of GCC.
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
GCC is free software; you can redistribute it and/or modify it
|
||||
Bison is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GCC is distributed in the hope that it will be useful, but WITHOUT
|
||||
Bison is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GCC; see the file COPYING. If not, write to the Free
|
||||
along with Bison; see the file COPYING. If not, write to the Free
|
||||
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA. */
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
|
||||
- As a standalone timer, using timevar_start and timevar_stop.
|
||||
All time elapsed between the two calls is attributed to the
|
||||
variable.
|
||||
variable.
|
||||
*/
|
||||
|
||||
|
||||
/* This structure stores the various varieties of time that can be
|
||||
measured. Times are stored in seconds. The time may be an
|
||||
absolute time or a time difference; in the former case, the time
|
||||
@@ -67,7 +67,7 @@ struct timevar_time_def
|
||||
the contents of timevar.def. */
|
||||
|
||||
#define DEFTIMEVAR(identifier__, name__) \
|
||||
identifier__,
|
||||
identifier__,
|
||||
typedef enum
|
||||
{
|
||||
#include "timevar.def"
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@
|
||||
EXTRA_DIST = \
|
||||
dmalloc.m4 error.m4 \
|
||||
m4.m4 mbrtowc.m4 memcmp.m4 mkstemp.m4 \
|
||||
prereq.m4 strerror_r.m4 timevar.m4 warning.m4 \
|
||||
prereq.m4 timevar.m4 warning.m4 \
|
||||
gettext.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 progtest.m4
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
#serial 1003
|
||||
# Experimental replacement for the function in the latest CVS autoconf.
|
||||
# Use with the error.c file in ../lib.
|
||||
|
||||
# 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
|
||||
# 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. */
|
||||
|
||||
undefine([AC_FUNC_STRERROR_R])
|
||||
|
||||
# AC_FUNC_STRERROR_R
|
||||
# ------------------
|
||||
AC_DEFUN([AC_FUNC_STRERROR_R],
|
||||
[AC_CHECK_DECLS([strerror_r])
|
||||
AC_CHECK_FUNCS([strerror_r])
|
||||
AC_CACHE_CHECK([whether strerror_r returns char *],
|
||||
ac_cv_func_strerror_r_char_p,
|
||||
[
|
||||
ac_cv_func_strerror_r_char_p=no
|
||||
if test $ac_cv_have_decl_strerror_r = yes; then
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
|
||||
[[
|
||||
char buf[100];
|
||||
char x = *strerror_r (0, buf, sizeof buf);
|
||||
char *p = strerror_r (0, buf, sizeof buf);
|
||||
]])],
|
||||
ac_cv_func_strerror_r_char_p=yes)
|
||||
else
|
||||
# strerror_r is not declared. Choose between
|
||||
# systems that have relatively inaccessible declarations for the
|
||||
# function. BeOS and DEC UNIX 4.0 fall in this category, but the
|
||||
# former has a strerror_r that returns char*, while the latter
|
||||
# has a strerror_r that returns `int'.
|
||||
# This test should segfault on the DEC system.
|
||||
AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
|
||||
extern char *strerror_r ();],
|
||||
[[char buf[100];
|
||||
char x = *strerror_r (0, buf, sizeof buf);
|
||||
exit (!isalpha (x));]])],
|
||||
ac_cv_func_strerror_r_char_p=yes, , :)
|
||||
fi
|
||||
])
|
||||
if test $ac_cv_func_strerror_r_char_p = yes; then
|
||||
AC_DEFINE([STRERROR_R_CHAR_P], 1,
|
||||
[Define to 1 if strerror_r returns char *.])
|
||||
fi
|
||||
])# AC_FUNC_STRERROR_R
|
||||
+13
-7
@@ -1,5 +1,5 @@
|
||||
# -*-Autoconf-*-
|
||||
# Checks required to run `stage', a nonportable memory/time tracker.
|
||||
# -*- Autoconf -*-
|
||||
# Checks required to run `timevar', a time tracker.
|
||||
#
|
||||
# Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
#
|
||||
@@ -21,27 +21,33 @@
|
||||
# serial 1
|
||||
|
||||
AC_DEFUN([BISON_PREREQ_TIMEVAR],
|
||||
[AC_CHECK_HEADERS([sys/resource.h sys/times.h])
|
||||
[AC_CHECK_HEADERS([sys/resource.h sys/time.h sys/times.h])
|
||||
|
||||
AC_CHECK_FUNCS([times])
|
||||
|
||||
AC_CHECK_DECLS([getrusage, times, clock, sysconf], [], [],
|
||||
[$ac_includes_default
|
||||
#if HAVE_SYS_RESOURCE_H
|
||||
# include <sys/resource.h>
|
||||
#if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
#if HAVE_SYS_TIMES_H
|
||||
# include <sys/times.h>
|
||||
#endif
|
||||
#if HAVE_SYS_RESOURCE_H
|
||||
# include <sys/resource.h>
|
||||
#endif
|
||||
])
|
||||
|
||||
AC_CHECK_TYPES([clock_t, struct tms], [], [],
|
||||
[$ac_includes_default
|
||||
#if HAVE_SYS_RESOURCE_H
|
||||
# include <sys/resource.h>
|
||||
#if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
#if HAVE_SYS_TIMES_H
|
||||
# include <sys/times.h>
|
||||
#endif
|
||||
#if HAVE_SYS_RESOURCE_H
|
||||
# include <sys/resource.h>
|
||||
#endif
|
||||
])
|
||||
])
|
||||
|
||||
@@ -3,6 +3,7 @@ es
|
||||
et
|
||||
fr
|
||||
hr
|
||||
id
|
||||
it
|
||||
ja
|
||||
nl
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bison 1.49b\n"
|
||||
"POT-Creation-Date: 2002-09-27 16:50+0200\n"
|
||||
"PO-Revision-Date: 2002-09-05 16:15:32+0200\n"
|
||||
"Project-Id-Version: bison 1.50\n"
|
||||
"POT-Creation-Date: 2002-10-14 14:47+0200\n"
|
||||
"PO-Revision-Date: 2002-10-07 10:50:39+0200\n"
|
||||
"Last-Translator: Michael Piefel <[email protected]>\n"
|
||||
"Language-Team: German <[email protected]>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -272,7 +272,6 @@ msgstr "schiebe und gehe zu Zustand %d über\n"
|
||||
msgid "go to state %d\n"
|
||||
msgstr "gehe zu Zustand %d über\n"
|
||||
|
||||
#
|
||||
#: src/print.c:201
|
||||
msgid "error (nonassociative)\n"
|
||||
msgstr "Fehler (nicht assoziativ)\n"
|
||||
@@ -295,23 +294,23 @@ msgstr "$default"
|
||||
msgid "state %d"
|
||||
msgstr "Zustand %d"
|
||||
|
||||
#: src/print.c:453
|
||||
#: src/print.c:456
|
||||
msgid "Terminals, with rules where they appear"
|
||||
msgstr "Terminale und die Regeln, in denen sie verwendet werden"
|
||||
|
||||
#: src/print.c:480
|
||||
#: src/print.c:483
|
||||
msgid "Nonterminals, with rules where they appear"
|
||||
msgstr "Nicht-Terminal und die Regeln, in denen sie verwendet werden"
|
||||
|
||||
#: src/print.c:509
|
||||
#: src/print.c:512
|
||||
msgid " on left:"
|
||||
msgstr " auf der linken Seite:"
|
||||
|
||||
#: src/print.c:524
|
||||
#: src/print.c:527
|
||||
msgid " on right:"
|
||||
msgstr " auf der rechten Seite:"
|
||||
|
||||
#: src/print.c:552
|
||||
#: src/print.c:555
|
||||
msgid "Rules never reduced"
|
||||
msgstr "niemals reduzierte Regeln"
|
||||
|
||||
@@ -330,49 +329,49 @@ msgstr "Rückgabetyp-Konflikt in merge-Funktion %s: »%s« und »%s«"
|
||||
msgid "rule given for %s, which is a token"
|
||||
msgstr "Regel für %s vorhanden, welches aber ein Token ist"
|
||||
|
||||
#: src/reader.c:264
|
||||
#: src/reader.c:268
|
||||
#, c-format
|
||||
msgid "type clash (`%s' `%s') on default action"
|
||||
msgstr "Typkonflikt (»%s« »%s«) bei Default-Aktion"
|
||||
|
||||
#: src/reader.c:272
|
||||
#: src/reader.c:274
|
||||
msgid "empty rule for typed nonterminal, and no action"
|
||||
msgstr "leere Regel für Nicht-Terminal mit Typ und keine Aktion"
|
||||
|
||||
#: src/reader.c:343
|
||||
#: src/reader.c:344
|
||||
msgid "two @prec's in a row"
|
||||
msgstr "zwei @prec-Anweisungen nacheinander"
|
||||
|
||||
#: src/reader.c:353
|
||||
#: src/reader.c:354
|
||||
#, c-format
|
||||
msgid "%%dprec affects only GLR parsers"
|
||||
msgstr "%%dprec betrifft nur GLR-Parser"
|
||||
|
||||
#: src/reader.c:355
|
||||
#: src/reader.c:356
|
||||
#, c-format
|
||||
msgid "%%dprec must be followed by positive number"
|
||||
msgstr "%%dprec muss von positiver Zahl gefolgt sein"
|
||||
|
||||
#: src/reader.c:357
|
||||
#: src/reader.c:358
|
||||
#, c-format
|
||||
msgid "only one %%dprec allowed per rule"
|
||||
msgstr "nur ein %%dprec pro Regel erlaubt"
|
||||
|
||||
#: src/reader.c:368
|
||||
#: src/reader.c:369
|
||||
#, c-format
|
||||
msgid "%%merge affects only GLR parsers"
|
||||
msgstr "%%merge betrifft nur GLR-Parser"
|
||||
|
||||
#: src/reader.c:370
|
||||
#: src/reader.c:371
|
||||
#, c-format
|
||||
msgid "only one %%merge allowed per rule"
|
||||
msgstr "nur ein %%merge pro Regel erlaubt"
|
||||
|
||||
#: src/reader.c:513
|
||||
#: src/reader.c:514
|
||||
msgid "no rules in the input grammar"
|
||||
msgstr "Eingabegrammatik enthält keine Regeln"
|
||||
|
||||
#: src/reader.c:545
|
||||
#: src/reader.c:546
|
||||
#, c-format
|
||||
msgid "too many symbols (tokens plus nonterminals); maximum %d"
|
||||
msgstr "zu viele Symbole (Token plus Nicht-Terminale); Maximum %d"
|
||||
@@ -427,57 +426,57 @@ msgstr[1] "%d nutzlose Regeln"
|
||||
msgid "start symbol %s does not derive any sentence"
|
||||
msgstr "es lassen sich keine Sätze vom Startsymbol %s ableiten"
|
||||
|
||||
#: scan-gram.l:202
|
||||
#: scan-gram.l:211
|
||||
#, c-format
|
||||
msgid ": invalid character: `%c'\n"
|
||||
msgstr ": ungültiges Zeichen: »%c«\n"
|
||||
|
||||
#: scan-gram.l:246
|
||||
#: scan-gram.l:255
|
||||
msgid ": unexpected end of file in a comment\n"
|
||||
msgstr ": Datei endet unerwartet innerhalb eines Kommentars\n"
|
||||
|
||||
#: scan-gram.l:274 scan-gram.l:412
|
||||
#: scan-gram.l:284 scan-gram.l:423
|
||||
msgid ": unexpected end of file in a string\n"
|
||||
msgstr ": Datei endet unerwartet innerhalb einer Zeichenkette\n"
|
||||
|
||||
#: scan-gram.l:311 scan-gram.l:383
|
||||
#: scan-gram.l:322 scan-gram.l:394
|
||||
msgid ": unexpected end of file in a character\n"
|
||||
msgstr ": Datei endet unerwartet innerhalb eines Zeichens\n"
|
||||
|
||||
#: scan-gram.l:332
|
||||
#: scan-gram.l:343
|
||||
#, c-format
|
||||
msgid ": invalid escape: %s\n"
|
||||
msgstr ": unzulässiges Fluchtzeichen: %s\n"
|
||||
|
||||
#: scan-gram.l:353
|
||||
#: scan-gram.l:364
|
||||
#, c-format
|
||||
msgid ": unrecognized escape: %s\n"
|
||||
msgstr ": unbekannt Fluchtzeichen: %s\n"
|
||||
|
||||
#: scan-gram.l:473
|
||||
#: scan-gram.l:485
|
||||
msgid ": unexpected end of file in a braced code\n"
|
||||
msgstr ": Datei endet unerwartet innerhalb geklammerten Programmtexts\n"
|
||||
|
||||
#: scan-gram.l:502
|
||||
#: scan-gram.l:514
|
||||
msgid ": unexpected end of file in a prologue\n"
|
||||
msgstr ": Datei endet unerwartet innerhalb eines Prologs\n"
|
||||
|
||||
#: scan-gram.l:560
|
||||
#: scan-gram.l:572
|
||||
#, c-format
|
||||
msgid "$$ of `%s' has no declared type"
|
||||
msgstr "$$ von »%s« hat keinen deklarierten Typ"
|
||||
|
||||
#: scan-gram.l:577 scan-gram.l:664
|
||||
#: scan-gram.l:584 scan-gram.l:666
|
||||
#, c-format
|
||||
msgid "invalid value: %s%d"
|
||||
msgstr "unzulässiger Wert: %s%d"
|
||||
|
||||
#: scan-gram.l:584
|
||||
#: scan-gram.l:591
|
||||
#, c-format
|
||||
msgid "$%d of `%s' has no declared type"
|
||||
msgstr "$%d von »%s« hat keinen deklarierten Typ"
|
||||
|
||||
#: scan-gram.l:595 scan-gram.l:612 scan-gram.l:671 scan-gram.l:688
|
||||
#: scan-gram.l:602 scan-gram.l:619 scan-gram.l:673 scan-gram.l:690
|
||||
#, c-format
|
||||
msgid "%s is invalid"
|
||||
msgstr "%s ist unzulässig"
|
||||
@@ -572,69 +571,71 @@ msgstr "mehrdeutiges Argument %s für %s"
|
||||
msgid "Valid arguments are:"
|
||||
msgstr "Gültige Argumente sind:"
|
||||
|
||||
#: lib/bitset_stats.c:226
|
||||
#, c-format
|
||||
msgid "%d bitset_allocs, %d freed (%.2f%%).\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:229
|
||||
#, c-format
|
||||
msgid "%d bitset_sets, %d cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:232
|
||||
#, c-format
|
||||
msgid "%d bitset_resets, %d cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:235
|
||||
#, c-format
|
||||
msgid "%d bitset_tests, %d cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
msgid "%u bitset_allocs, %u freed (%.2f%%).\n"
|
||||
msgstr "%u bitset_allocs, %u freigegeben (%.2f%%).\n"
|
||||
|
||||
#: lib/bitset_stats.c:239
|
||||
#: lib/bitset_stats.c:238
|
||||
#, c-format
|
||||
msgid "%d bitset_lists\n"
|
||||
msgstr ""
|
||||
msgid "%u bitset_sets, %u cached (%.2f%%)\n"
|
||||
msgstr "%u bitset_sets, %u zwischengespeichert (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:241
|
||||
msgid "count log histogram\n"
|
||||
msgstr ""
|
||||
#, c-format
|
||||
msgid "%u bitset_resets, %u cached (%.2f%%)\n"
|
||||
msgstr "%u bitset_resets, %u zwischengespeichert (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:244
|
||||
#, c-format
|
||||
msgid "%u bitset_tests, %u cached (%.2f%%)\n"
|
||||
msgstr "%u bitset_tests, %u zwischengespeichert (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:248
|
||||
#, c-format
|
||||
msgid "%u bitset_lists\n"
|
||||
msgstr "%u bitset_lists\n"
|
||||
|
||||
#: lib/bitset_stats.c:250
|
||||
msgid "count log histogram\n"
|
||||
msgstr "Zähler-Histogramm\n"
|
||||
|
||||
#: lib/bitset_stats.c:253
|
||||
msgid "size log histogram\n"
|
||||
msgstr ""
|
||||
msgstr "Größe-Histogramm\n"
|
||||
|
||||
#: lib/bitset_stats.c:247
|
||||
#: lib/bitset_stats.c:256
|
||||
msgid "density histogram\n"
|
||||
msgstr ""
|
||||
msgstr "Dichte-Histogramm\n"
|
||||
|
||||
#: lib/bitset_stats.c:264
|
||||
#: lib/bitset_stats.c:272
|
||||
msgid ""
|
||||
"Bitset statistics:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Bitset-Statistiken:\n"
|
||||
"\n"
|
||||
|
||||
#: lib/bitset_stats.c:267
|
||||
#: lib/bitset_stats.c:275
|
||||
#, c-format
|
||||
msgid "Accumulated runs = %d\n"
|
||||
msgstr ""
|
||||
msgid "Accumulated runs = %u\n"
|
||||
msgstr "Gesammelte Durchläufe = %u\n"
|
||||
|
||||
#: lib/bitset_stats.c:311
|
||||
#: lib/bitset_stats.c:320
|
||||
msgid "Could not read stats file."
|
||||
msgstr ""
|
||||
msgstr "Konnte Statistik-Datei nicht lesen."
|
||||
|
||||
#: lib/bitset_stats.c:313
|
||||
#: lib/bitset_stats.c:322
|
||||
msgid "Bad stats file size.\n"
|
||||
msgstr ""
|
||||
msgstr "Ungültige Statistik-Datei-Größe.\n"
|
||||
|
||||
#: lib/bitset_stats.c:339
|
||||
#: lib/bitset_stats.c:348
|
||||
msgid "Could not write stats file."
|
||||
msgstr ""
|
||||
msgstr "Konnte Statistik-Datei nicht schreiben."
|
||||
|
||||
#: lib/bitset_stats.c:343
|
||||
#: lib/bitset_stats.c:352
|
||||
msgid "Could not open stats file for writing."
|
||||
msgstr ""
|
||||
msgstr "Konnte Statistik-Datei nicht zum Schreiben öffnen."
|
||||
|
||||
#: lib/getopt.c:662
|
||||
#, c-format
|
||||
@@ -703,20 +704,22 @@ msgstr "»"
|
||||
msgid "'"
|
||||
msgstr "«"
|
||||
|
||||
#: lib/timevar.c:466
|
||||
#: lib/timevar.c:476
|
||||
msgid ""
|
||||
"\n"
|
||||
"Execution times (seconds)\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Ausführungszeiten (Sekunden)\n"
|
||||
|
||||
#: lib/timevar.c:516
|
||||
#: lib/timevar.c:526
|
||||
msgid " TOTAL :"
|
||||
msgstr ""
|
||||
msgstr " ZUSAMMEN :"
|
||||
|
||||
#: lib/timevar.c:552
|
||||
#: lib/timevar.c:562
|
||||
#, c-format
|
||||
msgid "time in %s: %ld.%06ld (%ld%%)\n"
|
||||
msgstr ""
|
||||
msgstr "Zeit in %s: %ld.%06ld (%ld%%)\n"
|
||||
|
||||
#~ msgid "state_list_append (state = %d, symbol = %d (%s))\n"
|
||||
#~ msgstr "state_list_append (Zustand = %d, Symbol = %d (%s))\n"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GNU bison 1.49a\n"
|
||||
"POT-Creation-Date: 2002-09-27 16:50+0200\n"
|
||||
"POT-Creation-Date: 2002-10-14 14:47+0200\n"
|
||||
"PO-Revision-Date: 2002-05-02 10:19+0200\n"
|
||||
"Last-Translator: Nicolás García-Pedrajas <[email protected]>\n"
|
||||
"Language-Team: Spanish <[email protected]>\n"
|
||||
@@ -348,23 +348,23 @@ msgstr ""
|
||||
msgid "state %d"
|
||||
msgstr "estado %d"
|
||||
|
||||
#: src/print.c:453
|
||||
#: src/print.c:456
|
||||
msgid "Terminals, with rules where they appear"
|
||||
msgstr "Terminales con las reglas donde aparecen"
|
||||
|
||||
#: src/print.c:480
|
||||
#: src/print.c:483
|
||||
msgid "Nonterminals, with rules where they appear"
|
||||
msgstr "No terminales con las reglas donde aparecen"
|
||||
|
||||
#: src/print.c:509
|
||||
#: src/print.c:512
|
||||
msgid " on left:"
|
||||
msgstr " en la izquierda:"
|
||||
|
||||
#: src/print.c:524
|
||||
#: src/print.c:527
|
||||
msgid " on right:"
|
||||
msgstr " en la derecha:"
|
||||
|
||||
#: src/print.c:552
|
||||
#: src/print.c:555
|
||||
#, fuzzy
|
||||
msgid "Rules never reduced"
|
||||
msgstr "%d regla que nunca se ha reducido\n"
|
||||
@@ -384,49 +384,49 @@ msgstr ""
|
||||
msgid "rule given for %s, which is a token"
|
||||
msgstr "se ha dado una regla para %s, que es un terminal"
|
||||
|
||||
#: src/reader.c:264
|
||||
#: src/reader.c:268
|
||||
#, c-format
|
||||
msgid "type clash (`%s' `%s') on default action"
|
||||
msgstr "los tipos (`%s' `%s') no concuerdan en la acción por defecto"
|
||||
|
||||
#: src/reader.c:272
|
||||
#: src/reader.c:274
|
||||
msgid "empty rule for typed nonterminal, and no action"
|
||||
msgstr "regla vacía para un no terminal con tipo y no hay ninguna acción"
|
||||
|
||||
#: src/reader.c:343
|
||||
#: src/reader.c:344
|
||||
msgid "two @prec's in a row"
|
||||
msgstr "dos @prec en una línea"
|
||||
|
||||
#: src/reader.c:353
|
||||
#: src/reader.c:354
|
||||
#, c-format
|
||||
msgid "%%dprec affects only GLR parsers"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:355
|
||||
#: src/reader.c:356
|
||||
#, c-format
|
||||
msgid "%%dprec must be followed by positive number"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:357
|
||||
#: src/reader.c:358
|
||||
#, c-format
|
||||
msgid "only one %%dprec allowed per rule"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:368
|
||||
#: src/reader.c:369
|
||||
#, c-format
|
||||
msgid "%%merge affects only GLR parsers"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:370
|
||||
#: src/reader.c:371
|
||||
#, c-format
|
||||
msgid "only one %%merge allowed per rule"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:513
|
||||
#: src/reader.c:514
|
||||
msgid "no rules in the input grammar"
|
||||
msgstr "no hay reglas en la gramática de entrada"
|
||||
|
||||
#: src/reader.c:545
|
||||
#: src/reader.c:546
|
||||
#, c-format
|
||||
msgid "too many symbols (tokens plus nonterminals); maximum %d"
|
||||
msgstr "demasiados símbolos (terminales y no terminales); máximo %d"
|
||||
@@ -486,62 +486,62 @@ msgstr[1] "%d reglas sin uso"
|
||||
msgid "start symbol %s does not derive any sentence"
|
||||
msgstr "El símbolo de inicio (axioma) %s no deriva ninguna sentencia"
|
||||
|
||||
#: scan-gram.l:202
|
||||
#: scan-gram.l:211
|
||||
#, c-format
|
||||
msgid ": invalid character: `%c'\n"
|
||||
msgstr ""
|
||||
|
||||
#: scan-gram.l:246
|
||||
#: scan-gram.l:255
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a comment\n"
|
||||
msgstr "fin de fichero inesperado"
|
||||
|
||||
#: scan-gram.l:274 scan-gram.l:412
|
||||
#: scan-gram.l:284 scan-gram.l:423
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a string\n"
|
||||
msgstr "fin de fichero inesperado"
|
||||
|
||||
#: scan-gram.l:311 scan-gram.l:383
|
||||
#: scan-gram.l:322 scan-gram.l:394
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a character\n"
|
||||
msgstr "fin de fichero inesperado"
|
||||
|
||||
#: scan-gram.l:332
|
||||
#: scan-gram.l:343
|
||||
#, fuzzy, c-format
|
||||
msgid ": invalid escape: %s\n"
|
||||
msgstr "valor no válido: %s%d"
|
||||
|
||||
#: scan-gram.l:353
|
||||
#: scan-gram.l:364
|
||||
#, fuzzy, c-format
|
||||
msgid ": unrecognized escape: %s\n"
|
||||
msgstr "no reconocido: %s"
|
||||
|
||||
#: scan-gram.l:473
|
||||
#: scan-gram.l:485
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a braced code\n"
|
||||
msgstr "fin de fichero inesperado"
|
||||
|
||||
#: scan-gram.l:502
|
||||
#: scan-gram.l:514
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a prologue\n"
|
||||
msgstr "fin de fichero inesperado"
|
||||
|
||||
#: scan-gram.l:560
|
||||
#: scan-gram.l:572
|
||||
#, c-format
|
||||
msgid "$$ of `%s' has no declared type"
|
||||
msgstr "$$ de `%s' no tiene tipo declarado"
|
||||
|
||||
#: scan-gram.l:577 scan-gram.l:664
|
||||
#: scan-gram.l:584 scan-gram.l:666
|
||||
#, c-format
|
||||
msgid "invalid value: %s%d"
|
||||
msgstr "valor no válido: %s%d"
|
||||
|
||||
#: scan-gram.l:584
|
||||
#: scan-gram.l:591
|
||||
#, c-format
|
||||
msgid "$%d of `%s' has no declared type"
|
||||
msgstr "$%d de `%s' no tiene tipo declarado"
|
||||
|
||||
#: scan-gram.l:595 scan-gram.l:612 scan-gram.l:671 scan-gram.l:688
|
||||
#: scan-gram.l:602 scan-gram.l:619 scan-gram.l:673 scan-gram.l:690
|
||||
#, c-format
|
||||
msgid "%s is invalid"
|
||||
msgstr "%s no es válido"
|
||||
@@ -638,67 +638,67 @@ msgstr ""
|
||||
msgid "Valid arguments are:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:226
|
||||
#, c-format
|
||||
msgid "%d bitset_allocs, %d freed (%.2f%%).\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:229
|
||||
#, c-format
|
||||
msgid "%d bitset_sets, %d cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:232
|
||||
#, c-format
|
||||
msgid "%d bitset_resets, %d cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:235
|
||||
#, c-format
|
||||
msgid "%d bitset_tests, %d cached (%.2f%%)\n"
|
||||
msgid "%u bitset_allocs, %u freed (%.2f%%).\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:239
|
||||
#: lib/bitset_stats.c:238
|
||||
#, c-format
|
||||
msgid "%d bitset_lists\n"
|
||||
msgid "%u bitset_sets, %u cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:241
|
||||
msgid "count log histogram\n"
|
||||
#, c-format
|
||||
msgid "%u bitset_resets, %u cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:244
|
||||
#, c-format
|
||||
msgid "%u bitset_tests, %u cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:248
|
||||
#, c-format
|
||||
msgid "%u bitset_lists\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:250
|
||||
msgid "count log histogram\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:253
|
||||
msgid "size log histogram\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:247
|
||||
#: lib/bitset_stats.c:256
|
||||
msgid "density histogram\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:264
|
||||
#: lib/bitset_stats.c:272
|
||||
msgid ""
|
||||
"Bitset statistics:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:267
|
||||
#: lib/bitset_stats.c:275
|
||||
#, c-format
|
||||
msgid "Accumulated runs = %d\n"
|
||||
msgid "Accumulated runs = %u\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:311
|
||||
#: lib/bitset_stats.c:320
|
||||
msgid "Could not read stats file."
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:313
|
||||
#: lib/bitset_stats.c:322
|
||||
msgid "Bad stats file size.\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:339
|
||||
#: lib/bitset_stats.c:348
|
||||
msgid "Could not write stats file."
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:343
|
||||
#: lib/bitset_stats.c:352
|
||||
msgid "Could not open stats file for writing."
|
||||
msgstr ""
|
||||
|
||||
@@ -793,17 +793,17 @@ msgstr "`"
|
||||
msgid "'"
|
||||
msgstr "'"
|
||||
|
||||
#: lib/timevar.c:466
|
||||
#: lib/timevar.c:476
|
||||
msgid ""
|
||||
"\n"
|
||||
"Execution times (seconds)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/timevar.c:516
|
||||
#: lib/timevar.c:526
|
||||
msgid " TOTAL :"
|
||||
msgstr ""
|
||||
|
||||
#: lib/timevar.c:552
|
||||
#: lib/timevar.c:562
|
||||
#, c-format
|
||||
msgid "time in %s: %ld.%06ld (%ld%%)\n"
|
||||
msgstr ""
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bison 1.49b\n"
|
||||
"POT-Creation-Date: 2002-09-27 16:50+0200\n"
|
||||
"PO-Revision-Date: 2002-08-13 01:35+0300\n"
|
||||
"Project-Id-Version: bison 1.50\n"
|
||||
"POT-Creation-Date: 2002-10-14 14:47+0200\n"
|
||||
"PO-Revision-Date: 2002-10-07 09:28+03:00\n"
|
||||
"Last-Translator: Toomas Soome <[email protected]>\n"
|
||||
"Language-Team: Estonian <[email protected]>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -283,23 +283,23 @@ msgstr "$default"
|
||||
msgid "state %d"
|
||||
msgstr "olek %d"
|
||||
|
||||
#: src/print.c:453
|
||||
#: src/print.c:456
|
||||
msgid "Terminals, with rules where they appear"
|
||||
msgstr "Terminalid, koos reeglitega kus nad ilmuvad"
|
||||
|
||||
#: src/print.c:480
|
||||
#: src/print.c:483
|
||||
msgid "Nonterminals, with rules where they appear"
|
||||
msgstr "Mitteterminalid, koos reeglitega kus nad ilmuvad"
|
||||
|
||||
#: src/print.c:509
|
||||
#: src/print.c:512
|
||||
msgid " on left:"
|
||||
msgstr " vasakul:"
|
||||
|
||||
#: src/print.c:524
|
||||
#: src/print.c:527
|
||||
msgid " on right:"
|
||||
msgstr " paremal:"
|
||||
|
||||
#: src/print.c:552
|
||||
#: src/print.c:555
|
||||
msgid "Rules never reduced"
|
||||
msgstr "Mitteredutseeruvad reeglid"
|
||||
|
||||
@@ -318,49 +318,49 @@ msgstr "tulemuse t
|
||||
msgid "rule given for %s, which is a token"
|
||||
msgstr "%s jaoks on antud reegel, aga see on märk"
|
||||
|
||||
#: src/reader.c:264
|
||||
#: src/reader.c:268
|
||||
#, c-format
|
||||
msgid "type clash (`%s' `%s') on default action"
|
||||
msgstr "vaikimisi tegevuse tüübikonflikt (`%s' `%s')"
|
||||
|
||||
#: src/reader.c:272
|
||||
#: src/reader.c:274
|
||||
msgid "empty rule for typed nonterminal, and no action"
|
||||
msgstr "tüübiga mitteterminalil on tühi reegel ja puudub tegevus"
|
||||
|
||||
#: src/reader.c:343
|
||||
#: src/reader.c:344
|
||||
msgid "two @prec's in a row"
|
||||
msgstr "kaks @prec ühel real"
|
||||
|
||||
#: src/reader.c:353
|
||||
#: src/reader.c:354
|
||||
#, c-format
|
||||
msgid "%%dprec affects only GLR parsers"
|
||||
msgstr "%%dprec puudutab ainult GLR parsereid"
|
||||
|
||||
#: src/reader.c:355
|
||||
#: src/reader.c:356
|
||||
#, c-format
|
||||
msgid "%%dprec must be followed by positive number"
|
||||
msgstr "%%dprec järel peab olema positiivne number"
|
||||
|
||||
#: src/reader.c:357
|
||||
#: src/reader.c:358
|
||||
#, c-format
|
||||
msgid "only one %%dprec allowed per rule"
|
||||
msgstr "reeglis on lubatud ainult üks %%dprec"
|
||||
|
||||
#: src/reader.c:368
|
||||
#: src/reader.c:369
|
||||
#, c-format
|
||||
msgid "%%merge affects only GLR parsers"
|
||||
msgstr "%%merge puudutab ainult GLR parsereid"
|
||||
|
||||
#: src/reader.c:370
|
||||
#: src/reader.c:371
|
||||
#, c-format
|
||||
msgid "only one %%merge allowed per rule"
|
||||
msgstr "reeglis on lubatud ainult üks %%merge"
|
||||
|
||||
#: src/reader.c:513
|
||||
#: src/reader.c:514
|
||||
msgid "no rules in the input grammar"
|
||||
msgstr "sisendgrammatikas pole reegleid"
|
||||
|
||||
#: src/reader.c:545
|
||||
#: src/reader.c:546
|
||||
#, c-format
|
||||
msgid "too many symbols (tokens plus nonterminals); maximum %d"
|
||||
msgstr "liiga palju sümboleid (märgid ja mitteterminalid); maksimaalne on %d"
|
||||
@@ -415,57 +415,57 @@ msgstr[1] "%d kasutamata reeglit"
|
||||
msgid "start symbol %s does not derive any sentence"
|
||||
msgstr "stardisümbolist %s ei tuletata ühtegi lauset"
|
||||
|
||||
#: scan-gram.l:202
|
||||
#: scan-gram.l:211
|
||||
#, c-format
|
||||
msgid ": invalid character: `%c'\n"
|
||||
msgstr ": vigane sümbol: `%c'\n"
|
||||
|
||||
#: scan-gram.l:246
|
||||
#: scan-gram.l:255
|
||||
msgid ": unexpected end of file in a comment\n"
|
||||
msgstr ": ootamatu faililõpp kommentaaris\n"
|
||||
|
||||
#: scan-gram.l:274 scan-gram.l:412
|
||||
#: scan-gram.l:284 scan-gram.l:423
|
||||
msgid ": unexpected end of file in a string\n"
|
||||
msgstr ": ootamatu faililõpp sõnes\n"
|
||||
|
||||
#: scan-gram.l:311 scan-gram.l:383
|
||||
#: scan-gram.l:322 scan-gram.l:394
|
||||
msgid ": unexpected end of file in a character\n"
|
||||
msgstr ": ootamatu faililõpp sümbolis\n"
|
||||
|
||||
#: scan-gram.l:332
|
||||
#: scan-gram.l:343
|
||||
#, c-format
|
||||
msgid ": invalid escape: %s\n"
|
||||
msgstr ": vigane paojada: %s\n"
|
||||
|
||||
#: scan-gram.l:353
|
||||
#: scan-gram.l:364
|
||||
#, c-format
|
||||
msgid ": unrecognized escape: %s\n"
|
||||
msgstr ": tundmatu paojada: %s\n"
|
||||
|
||||
#: scan-gram.l:473
|
||||
#: scan-gram.l:485
|
||||
msgid ": unexpected end of file in a braced code\n"
|
||||
msgstr ": ootamatu faililõpp sulgude vahelises koodis\n"
|
||||
|
||||
#: scan-gram.l:502
|
||||
#: scan-gram.l:514
|
||||
msgid ": unexpected end of file in a prologue\n"
|
||||
msgstr ": ootamatu faililõpp proloogis\n"
|
||||
|
||||
#: scan-gram.l:560
|
||||
#: scan-gram.l:572
|
||||
#, c-format
|
||||
msgid "$$ of `%s' has no declared type"
|
||||
msgstr "`%s' $$ ei oma deklareeritud tüüpi"
|
||||
|
||||
#: scan-gram.l:577 scan-gram.l:664
|
||||
#: scan-gram.l:584 scan-gram.l:666
|
||||
#, c-format
|
||||
msgid "invalid value: %s%d"
|
||||
msgstr "vigane väärtus: %s%d"
|
||||
|
||||
#: scan-gram.l:584
|
||||
#: scan-gram.l:591
|
||||
#, c-format
|
||||
msgid "$%d of `%s' has no declared type"
|
||||
msgstr "$%d `%s' ei oma deklareeritud tüüpi"
|
||||
|
||||
#: scan-gram.l:595 scan-gram.l:612 scan-gram.l:671 scan-gram.l:688
|
||||
#: scan-gram.l:602 scan-gram.l:619 scan-gram.l:673 scan-gram.l:690
|
||||
#, c-format
|
||||
msgid "%s is invalid"
|
||||
msgstr "%s on vigane"
|
||||
@@ -560,44 +560,44 @@ msgstr "segane argument %s %s'le"
|
||||
msgid "Valid arguments are:"
|
||||
msgstr "Lubatud argumendid on:"
|
||||
|
||||
#: lib/bitset_stats.c:226
|
||||
#, c-format
|
||||
msgid "%d bitset_allocs, %d freed (%.2f%%).\n"
|
||||
msgstr "%d bitset_allocs, %d vabastatud (%.2f%%).\n"
|
||||
|
||||
#: lib/bitset_stats.c:229
|
||||
#, c-format
|
||||
msgid "%d bitset_sets, %d cached (%.2f%%)\n"
|
||||
msgstr "%d bitset_sets, %d puhverdatud (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:232
|
||||
#, c-format
|
||||
msgid "%d bitset_resets, %d cached (%.2f%%)\n"
|
||||
msgstr "%d bitset_resets, %d puhverdatud (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:235
|
||||
#, c-format
|
||||
msgid "%d bitset_tests, %d cached (%.2f%%)\n"
|
||||
msgstr "%d bitset_tests, %d puhverdatud (%.2f%%)\n"
|
||||
msgid "%u bitset_allocs, %u freed (%.2f%%).\n"
|
||||
msgstr "%u bitset_allocs, %u vabastatud (%.2f%%).\n"
|
||||
|
||||
#: lib/bitset_stats.c:239
|
||||
#: lib/bitset_stats.c:238
|
||||
#, c-format
|
||||
msgid "%d bitset_lists\n"
|
||||
msgstr "%d bitset_lists\n"
|
||||
msgid "%u bitset_sets, %u cached (%.2f%%)\n"
|
||||
msgstr "%u bitset_sets, %u puhverdatud (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:241
|
||||
#, c-format
|
||||
msgid "%u bitset_resets, %u cached (%.2f%%)\n"
|
||||
msgstr "%u bitset_resets, %u puhverdatud (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:244
|
||||
#, c-format
|
||||
msgid "%u bitset_tests, %u cached (%.2f%%)\n"
|
||||
msgstr "%u bitset_tests, %u puhverdatud (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:248
|
||||
#, c-format
|
||||
msgid "%u bitset_lists\n"
|
||||
msgstr "%u bitset_lists\n"
|
||||
|
||||
#: lib/bitset_stats.c:250
|
||||
msgid "count log histogram\n"
|
||||
msgstr "loenduri logi histogramm\n"
|
||||
|
||||
#: lib/bitset_stats.c:244
|
||||
#: lib/bitset_stats.c:253
|
||||
msgid "size log histogram\n"
|
||||
msgstr "suuruste logi histogramm\n"
|
||||
|
||||
#: lib/bitset_stats.c:247
|
||||
#: lib/bitset_stats.c:256
|
||||
msgid "density histogram\n"
|
||||
msgstr "tiheduse histogramm\n"
|
||||
|
||||
#: lib/bitset_stats.c:264
|
||||
#: lib/bitset_stats.c:272
|
||||
msgid ""
|
||||
"Bitset statistics:\n"
|
||||
"\n"
|
||||
@@ -605,24 +605,24 @@ msgstr ""
|
||||
"Bitset statistika:\n"
|
||||
"\n"
|
||||
|
||||
#: lib/bitset_stats.c:267
|
||||
#: lib/bitset_stats.c:275
|
||||
#, c-format
|
||||
msgid "Accumulated runs = %d\n"
|
||||
msgstr "Salvestatud läbimisi = %d\n"
|
||||
msgid "Accumulated runs = %u\n"
|
||||
msgstr "Salvestatud läbimisi = %u\n"
|
||||
|
||||
#: lib/bitset_stats.c:311
|
||||
#: lib/bitset_stats.c:320
|
||||
msgid "Could not read stats file."
|
||||
msgstr "Statistika faili ei saa lugeda."
|
||||
|
||||
#: lib/bitset_stats.c:313
|
||||
#: lib/bitset_stats.c:322
|
||||
msgid "Bad stats file size.\n"
|
||||
msgstr "Vigane statistika faili suurus.\n"
|
||||
|
||||
#: lib/bitset_stats.c:339
|
||||
#: lib/bitset_stats.c:348
|
||||
msgid "Could not write stats file."
|
||||
msgstr "Statistika faili ei saa kirjutada."
|
||||
|
||||
#: lib/bitset_stats.c:343
|
||||
#: lib/bitset_stats.c:352
|
||||
msgid "Could not open stats file for writing."
|
||||
msgstr "Statistika faili ei saa kirjutamiseks avada."
|
||||
|
||||
@@ -693,7 +693,7 @@ msgstr "`"
|
||||
msgid "'"
|
||||
msgstr "'"
|
||||
|
||||
#: lib/timevar.c:466
|
||||
#: lib/timevar.c:476
|
||||
msgid ""
|
||||
"\n"
|
||||
"Execution times (seconds)\n"
|
||||
@@ -701,109 +701,11 @@ msgstr ""
|
||||
"\n"
|
||||
"Täitmise ajad (sekundites)\n"
|
||||
|
||||
#: lib/timevar.c:516
|
||||
#: lib/timevar.c:526
|
||||
msgid " TOTAL :"
|
||||
msgstr " KOKKU :"
|
||||
|
||||
#: lib/timevar.c:552
|
||||
#: lib/timevar.c:562
|
||||
#, c-format
|
||||
msgid "time in %s: %ld.%06ld (%ld%%)\n"
|
||||
msgstr "aeg %s: %ld.%06ld (%ld%%)\n"
|
||||
|
||||
#~ msgid "state_list_append (state = %d, symbol = %d (%s))\n"
|
||||
#~ msgstr "state_list_append (olek = %d, sümbol = %d (%s))\n"
|
||||
|
||||
#~ msgid "Entering new_itemsets, state = %d\n"
|
||||
#~ msgstr "Sisenen new_itemsets, olek = %d\n"
|
||||
|
||||
#~ msgid "Entering get_state, symbol = %d (%s)\n"
|
||||
#~ msgstr "Sisenen get_state, szmbol = %d (%s)\n"
|
||||
|
||||
#~ msgid "Exiting get_state => %d\n"
|
||||
#~ msgstr "Väljun get_state => %d\n"
|
||||
|
||||
#~ msgid "Entering append_states, state = %d\n"
|
||||
#~ msgstr "Sisenen append_states, olek = %d\n"
|
||||
|
||||
#~ msgid "Processing state %d (reached by %s)\n"
|
||||
#~ msgstr "Töötlen olekut %d (olekust %s)\n"
|
||||
|
||||
#~ msgid "undefined associativity"
|
||||
#~ msgstr "defineerimata assotsiatiivsus"
|
||||
|
||||
#~ msgid "Closure: %s\n"
|
||||
#~ msgstr "Sulund: %s\n"
|
||||
|
||||
#~ msgid " (rule %d)\n"
|
||||
#~ msgstr " (reegel %d)\n"
|
||||
|
||||
#~ msgid "RTC: Firsts Input"
|
||||
#~ msgstr "RTC: Firsts Sisend"
|
||||
|
||||
#~ msgid "RTC: Firsts Output"
|
||||
#~ msgstr "RTC: Firsts Väljund"
|
||||
|
||||
#~ msgid "input"
|
||||
#~ msgstr "sisend"
|
||||
|
||||
#~ msgid "output"
|
||||
#~ msgstr "väljund"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Variables\n"
|
||||
#~ "---------\n"
|
||||
#~ "\n"
|
||||
#~ msgstr ""
|
||||
#~ "Muutujad\n"
|
||||
#~ "--------\n"
|
||||
#~ "\n"
|
||||
|
||||
#~ msgid "Value Sprec Sassoc Tag\n"
|
||||
#~ msgstr "Väärtus Sprec Sassoc Märk\n"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Rules\n"
|
||||
#~ "-----\n"
|
||||
#~ "\n"
|
||||
#~ msgstr ""
|
||||
#~ "Reeglid\n"
|
||||
#~ "-------\n"
|
||||
#~ "\n"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Num (Prec, Assoc, Useful, Ritem Range) Lhs -> Rhs (Ritem range) [Num]\n"
|
||||
#~ msgstr ""
|
||||
#~ "Num (Prec, Assoc, Useful, Ritem Range) Lhs -> Rhs (Ritem range) [Num]\n"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Rules interpreted\n"
|
||||
#~ "-----------------\n"
|
||||
#~ "\n"
|
||||
#~ msgstr ""
|
||||
#~ "Interpreteeritud reeglid\n"
|
||||
#~ "------------------------\n"
|
||||
#~ "\n"
|
||||
|
||||
#~ msgid "Lookaheads: BEGIN\n"
|
||||
#~ msgstr "Ettevaatamine: ALGUS\n"
|
||||
|
||||
#~ msgid "State %d: %d lookaheads\n"
|
||||
#~ msgstr "Olek %d: %d ettevaatamist\n"
|
||||
|
||||
#~ msgid " on %d (%s) -> rule %d\n"
|
||||
#~ msgstr " %d (%s) -> reegel %d\n"
|
||||
|
||||
#~ msgid "Lookaheads: END\n"
|
||||
#~ msgstr "Ettevaatamine: LÕPP\n"
|
||||
|
||||
#~ msgid "relation_transpose: input\n"
|
||||
#~ msgstr "relation_transpose: sisend\n"
|
||||
|
||||
#~ msgid "relation_transpose: output\n"
|
||||
#~ msgstr "relation_transpose: väljund\n"
|
||||
|
||||
#~ msgid "growing table and check from: %lu to %lu\n"
|
||||
#~ msgstr "kasvatan table ja check suuruselt: %lu suurusele %lu\n"
|
||||
|
||||
#~ msgid "base_t too small to hold %d\n"
|
||||
#~ msgstr "base_t on liiga väike hoidmaks %d\n"
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GNU bison 1.49b\n"
|
||||
"POT-Creation-Date: 2002-09-27 16:50+0200\n"
|
||||
"PO-Revision-Date: 2002-08-12 12:00-0500\n"
|
||||
"Project-Id-Version: GNU bison 1.50\n"
|
||||
"POT-Creation-Date: 2002-10-14 14:47+0200\n"
|
||||
"PO-Revision-Date: 2002-10-06 12:00-0500\n"
|
||||
"Last-Translator: Michel Robitaille <[email protected]>\n"
|
||||
"Language-Team: French <[email protected]>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -289,23 +289,23 @@ msgstr "$d
|
||||
msgid "state %d"
|
||||
msgstr "état %d"
|
||||
|
||||
#: src/print.c:453
|
||||
#: src/print.c:456
|
||||
msgid "Terminals, with rules where they appear"
|
||||
msgstr "Terminaux, suivis des règles où ils apparaissent"
|
||||
|
||||
#: src/print.c:480
|
||||
#: src/print.c:483
|
||||
msgid "Nonterminals, with rules where they appear"
|
||||
msgstr "Non-terminaux, suivis des règles où ils apparaissent"
|
||||
|
||||
#: src/print.c:509
|
||||
#: src/print.c:512
|
||||
msgid " on left:"
|
||||
msgstr " à gauche:"
|
||||
|
||||
#: src/print.c:524
|
||||
#: src/print.c:527
|
||||
msgid " on right:"
|
||||
msgstr " à droite:"
|
||||
|
||||
#: src/print.c:552
|
||||
#: src/print.c:555
|
||||
msgid "Rules never reduced"
|
||||
msgstr "Règles jamais réduites"
|
||||
|
||||
@@ -325,49 +325,49 @@ msgstr ""
|
||||
msgid "rule given for %s, which is a token"
|
||||
msgstr "la règle pour %s, qui est un terminal"
|
||||
|
||||
#: src/reader.c:264
|
||||
#: src/reader.c:268
|
||||
#, c-format
|
||||
msgid "type clash (`%s' `%s') on default action"
|
||||
msgstr "conflit de type (« %s » « %s ») pour l'action par défaut"
|
||||
|
||||
#: src/reader.c:272
|
||||
#: src/reader.c:274
|
||||
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:343
|
||||
#: src/reader.c:344
|
||||
msgid "two @prec's in a row"
|
||||
msgstr "deux @prec de suite"
|
||||
|
||||
#: src/reader.c:353
|
||||
#: src/reader.c:354
|
||||
#, c-format
|
||||
msgid "%%dprec affects only GLR parsers"
|
||||
msgstr "%%dprec affecte seulement les analyseurs GLR"
|
||||
|
||||
#: src/reader.c:355
|
||||
#: src/reader.c:356
|
||||
#, c-format
|
||||
msgid "%%dprec must be followed by positive number"
|
||||
msgstr "%%dprec doit être suivi d'un nombre positif"
|
||||
|
||||
#: src/reader.c:357
|
||||
#: src/reader.c:358
|
||||
#, c-format
|
||||
msgid "only one %%dprec allowed per rule"
|
||||
msgstr "seul un %%dprec est permis par règle"
|
||||
|
||||
#: src/reader.c:368
|
||||
#: src/reader.c:369
|
||||
#, c-format
|
||||
msgid "%%merge affects only GLR parsers"
|
||||
msgstr "%%merge affecte seulement les analyseurs GLR"
|
||||
|
||||
#: src/reader.c:370
|
||||
#: src/reader.c:371
|
||||
#, c-format
|
||||
msgid "only one %%merge allowed per rule"
|
||||
msgstr "seul un %%merge est permis par règle"
|
||||
|
||||
#: src/reader.c:513
|
||||
#: src/reader.c:514
|
||||
msgid "no rules in the input grammar"
|
||||
msgstr "la grammaire n'a pas de règles"
|
||||
|
||||
#: src/reader.c:545
|
||||
#: src/reader.c:546
|
||||
#, c-format
|
||||
msgid "too many symbols (tokens plus nonterminals); maximum %d"
|
||||
msgstr "trop de symboles (jeton plus non terminaux); maximum %d"
|
||||
@@ -423,57 +423,57 @@ msgid "start symbol %s does not derive any sentence"
|
||||
msgstr ""
|
||||
"symbole de départ %s peut permettre la dérivation de n'importe quelle phrase"
|
||||
|
||||
#: scan-gram.l:202
|
||||
#: scan-gram.l:211
|
||||
#, c-format
|
||||
msgid ": invalid character: `%c'\n"
|
||||
msgstr ": caractère invalide: `%c'\n"
|
||||
|
||||
#: scan-gram.l:246
|
||||
#: scan-gram.l:255
|
||||
msgid ": unexpected end of file in a comment\n"
|
||||
msgstr ": fin de fichier inattendue dans un commentaire\n"
|
||||
|
||||
#: scan-gram.l:274 scan-gram.l:412
|
||||
#: scan-gram.l:284 scan-gram.l:423
|
||||
msgid ": unexpected end of file in a string\n"
|
||||
msgstr ": fin de fichier inattendue dans une chaîne\n"
|
||||
|
||||
#: scan-gram.l:311 scan-gram.l:383
|
||||
#: scan-gram.l:322 scan-gram.l:394
|
||||
msgid ": unexpected end of file in a character\n"
|
||||
msgstr ": fin de fichier inattendue dans un caractère\n"
|
||||
|
||||
#: scan-gram.l:332
|
||||
#: scan-gram.l:343
|
||||
#, c-format
|
||||
msgid ": invalid escape: %s\n"
|
||||
msgstr ": séquence d'échappement invalide: %s\n"
|
||||
|
||||
#: scan-gram.l:353
|
||||
#: scan-gram.l:364
|
||||
#, c-format
|
||||
msgid ": unrecognized escape: %s\n"
|
||||
msgstr ": séquence d'échappement non reconnue: %s\n"
|
||||
|
||||
#: scan-gram.l:473
|
||||
#: scan-gram.l:485
|
||||
msgid ": unexpected end of file in a braced code\n"
|
||||
msgstr ": fin de fichier inattendue dans du code entre accolades\n"
|
||||
|
||||
#: scan-gram.l:502
|
||||
#: scan-gram.l:514
|
||||
msgid ": unexpected end of file in a prologue\n"
|
||||
msgstr ": fin de fichier inattendue dans un prologue\n"
|
||||
|
||||
#: scan-gram.l:560
|
||||
#: scan-gram.l:572
|
||||
#, c-format
|
||||
msgid "$$ of `%s' has no declared type"
|
||||
msgstr "$$ de « %s » n'a pas son type déclaré"
|
||||
|
||||
#: scan-gram.l:577 scan-gram.l:664
|
||||
#: scan-gram.l:584 scan-gram.l:666
|
||||
#, c-format
|
||||
msgid "invalid value: %s%d"
|
||||
msgstr "valeur invalide: %s%d"
|
||||
|
||||
#: scan-gram.l:584
|
||||
#: scan-gram.l:591
|
||||
#, c-format
|
||||
msgid "$%d of `%s' has no declared type"
|
||||
msgstr "$%d de « %s » n'a pas de type déclaré"
|
||||
|
||||
#: scan-gram.l:595 scan-gram.l:612 scan-gram.l:671 scan-gram.l:688
|
||||
#: scan-gram.l:602 scan-gram.l:619 scan-gram.l:673 scan-gram.l:690
|
||||
#, c-format
|
||||
msgid "%s is invalid"
|
||||
msgstr "%s n'est pas valide"
|
||||
@@ -568,44 +568,44 @@ msgstr "argument ambigu
|
||||
msgid "Valid arguments are:"
|
||||
msgstr "Arguments valides sont:"
|
||||
|
||||
#: lib/bitset_stats.c:226
|
||||
#, c-format
|
||||
msgid "%d bitset_allocs, %d freed (%.2f%%).\n"
|
||||
msgstr "%d bitset_allocs, %d libérés (%.2f%%).\n"
|
||||
|
||||
#: lib/bitset_stats.c:229
|
||||
#, c-format
|
||||
msgid "%d bitset_sets, %d cached (%.2f%%)\n"
|
||||
msgstr "%d bitset_sets, %d dans la cache (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:232
|
||||
#, c-format
|
||||
msgid "%d bitset_resets, %d cached (%.2f%%)\n"
|
||||
msgstr "%d bitset_resets, %d dans la cache (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:235
|
||||
#, c-format
|
||||
msgid "%d bitset_tests, %d cached (%.2f%%)\n"
|
||||
msgstr "%d bitset_tests, %d dans la cache (%.2f%%)\n"
|
||||
msgid "%u bitset_allocs, %u freed (%.2f%%).\n"
|
||||
msgstr "%u bitset_allocs, %u libérés (%.2f%%).\n"
|
||||
|
||||
#: lib/bitset_stats.c:239
|
||||
#: lib/bitset_stats.c:238
|
||||
#, c-format
|
||||
msgid "%d bitset_lists\n"
|
||||
msgstr "%d bitset_lists\n"
|
||||
msgid "%u bitset_sets, %u cached (%.2f%%)\n"
|
||||
msgstr "%u bitset_sets, %u dans la cache (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:241
|
||||
#, c-format
|
||||
msgid "%u bitset_resets, %u cached (%.2f%%)\n"
|
||||
msgstr "%u bitset_resets, %u dans la cache (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:244
|
||||
#, c-format
|
||||
msgid "%u bitset_tests, %u cached (%.2f%%)\n"
|
||||
msgstr "%u bitset_tests, %u dans la cache (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:248
|
||||
#, c-format
|
||||
msgid "%u bitset_lists\n"
|
||||
msgstr "%u bitset_lists\n"
|
||||
|
||||
#: lib/bitset_stats.c:250
|
||||
msgid "count log histogram\n"
|
||||
msgstr "histogramme des compteurs\n"
|
||||
|
||||
#: lib/bitset_stats.c:244
|
||||
#: lib/bitset_stats.c:253
|
||||
msgid "size log histogram\n"
|
||||
msgstr "taille de l'histogramme des compteurs\n"
|
||||
|
||||
#: lib/bitset_stats.c:247
|
||||
#: lib/bitset_stats.c:256
|
||||
msgid "density histogram\n"
|
||||
msgstr "densité de l'histogramme\n"
|
||||
|
||||
#: lib/bitset_stats.c:264
|
||||
#: lib/bitset_stats.c:272
|
||||
msgid ""
|
||||
"Bitset statistics:\n"
|
||||
"\n"
|
||||
@@ -613,24 +613,24 @@ msgstr ""
|
||||
"Statistiques des bitset:\n"
|
||||
"\n"
|
||||
|
||||
#: lib/bitset_stats.c:267
|
||||
#: lib/bitset_stats.c:275
|
||||
#, c-format
|
||||
msgid "Accumulated runs = %d\n"
|
||||
msgstr "Exécutions accumulées = %d\n"
|
||||
msgid "Accumulated runs = %u\n"
|
||||
msgstr "Exécutions accumulées = %u\n"
|
||||
|
||||
#: lib/bitset_stats.c:311
|
||||
#: lib/bitset_stats.c:320
|
||||
msgid "Could not read stats file."
|
||||
msgstr "Ne peut lire le fichier de stats."
|
||||
|
||||
#: lib/bitset_stats.c:313
|
||||
#: lib/bitset_stats.c:322
|
||||
msgid "Bad stats file size.\n"
|
||||
msgstr "Taille erronée du fichier de stats.\n"
|
||||
|
||||
#: lib/bitset_stats.c:339
|
||||
#: lib/bitset_stats.c:348
|
||||
msgid "Could not write stats file."
|
||||
msgstr "Ne peut écrire le fichier de stats."
|
||||
|
||||
#: lib/bitset_stats.c:343
|
||||
#: lib/bitset_stats.c:352
|
||||
msgid "Could not open stats file for writing."
|
||||
msgstr "Ne ouvrir en écriture le fichier de stats."
|
||||
|
||||
@@ -701,7 +701,7 @@ msgstr "`"
|
||||
msgid "'"
|
||||
msgstr "'"
|
||||
|
||||
#: lib/timevar.c:466
|
||||
#: lib/timevar.c:476
|
||||
msgid ""
|
||||
"\n"
|
||||
"Execution times (seconds)\n"
|
||||
@@ -709,11 +709,11 @@ msgstr ""
|
||||
"\n"
|
||||
"Temps d'exécution (secondes)\n"
|
||||
|
||||
#: lib/timevar.c:516
|
||||
#: lib/timevar.c:526
|
||||
msgid " TOTAL :"
|
||||
msgstr " TOTAL :"
|
||||
|
||||
#: lib/timevar.c:552
|
||||
#: lib/timevar.c:562
|
||||
#, c-format
|
||||
msgid "time in %s: %ld.%06ld (%ld%%)\n"
|
||||
msgstr "temps dans %s: %ld.%06ld (%ld%%)\n"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bison 1.34a\n"
|
||||
"POT-Creation-Date: 2002-09-27 16:50+0200\n"
|
||||
"POT-Creation-Date: 2002-10-14 14:47+0200\n"
|
||||
"PO-Revision-Date: 2002-04-10 22:20+01\n"
|
||||
"Last-Translator: Denis Lackovic <[email protected]>\n"
|
||||
"Language-Team: Croatian <[email protected]>\n"
|
||||
@@ -283,23 +283,23 @@ msgstr ""
|
||||
msgid "state %d"
|
||||
msgstr "stanje %d"
|
||||
|
||||
#: src/print.c:453
|
||||
#: src/print.c:456
|
||||
msgid "Terminals, with rules where they appear"
|
||||
msgstr "Zavr¹ni znakovi, sa pravilima gdje se pojavljuju"
|
||||
|
||||
#: src/print.c:480
|
||||
#: src/print.c:483
|
||||
msgid "Nonterminals, with rules where they appear"
|
||||
msgstr "Nezavr¹ni znakovi, sa pravilima gdje se pojavljuju"
|
||||
|
||||
#: src/print.c:509
|
||||
#: src/print.c:512
|
||||
msgid " on left:"
|
||||
msgstr "s lijeva:"
|
||||
|
||||
#: src/print.c:524
|
||||
#: src/print.c:527
|
||||
msgid " on right:"
|
||||
msgstr "s desna:"
|
||||
|
||||
#: src/print.c:552
|
||||
#: src/print.c:555
|
||||
#, fuzzy
|
||||
msgid "Rules never reduced"
|
||||
msgstr "%d pravilo nije nikad reducirano\n"
|
||||
@@ -319,49 +319,49 @@ msgstr ""
|
||||
msgid "rule given for %s, which is a token"
|
||||
msgstr "pravilo dato za %s, a to je znak"
|
||||
|
||||
#: src/reader.c:264
|
||||
#: src/reader.c:268
|
||||
#, c-format
|
||||
msgid "type clash (`%s' `%s') on default action"
|
||||
msgstr "sudar tipova (`%s' `%s') na deaultnoj akciji"
|
||||
|
||||
#: src/reader.c:272
|
||||
#: src/reader.c:274
|
||||
msgid "empty rule for typed nonterminal, and no action"
|
||||
msgstr "prazno pravilo za nezavr¹ni znak, i nema akcije"
|
||||
|
||||
#: src/reader.c:343
|
||||
#: src/reader.c:344
|
||||
msgid "two @prec's in a row"
|
||||
msgstr "dva @prec's u retku"
|
||||
|
||||
#: src/reader.c:353
|
||||
#: src/reader.c:354
|
||||
#, c-format
|
||||
msgid "%%dprec affects only GLR parsers"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:355
|
||||
#: src/reader.c:356
|
||||
#, c-format
|
||||
msgid "%%dprec must be followed by positive number"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:357
|
||||
#: src/reader.c:358
|
||||
#, c-format
|
||||
msgid "only one %%dprec allowed per rule"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:368
|
||||
#: src/reader.c:369
|
||||
#, c-format
|
||||
msgid "%%merge affects only GLR parsers"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:370
|
||||
#: src/reader.c:371
|
||||
#, c-format
|
||||
msgid "only one %%merge allowed per rule"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:513
|
||||
#: src/reader.c:514
|
||||
msgid "no rules in the input grammar"
|
||||
msgstr "nema pravila u ulaznoj gramatici"
|
||||
|
||||
#: src/reader.c:545
|
||||
#: src/reader.c:546
|
||||
#, c-format
|
||||
msgid "too many symbols (tokens plus nonterminals); maximum %d"
|
||||
msgstr "previ¹e simbola (znakovi plus nezavr¹ni znakovi); maksimalno %d"
|
||||
@@ -421,62 +421,62 @@ msgstr[1] "%d beskorisnih pravila"
|
||||
msgid "start symbol %s does not derive any sentence"
|
||||
msgstr "Poèetni simbol %s ne daje niti jednu reèenicu"
|
||||
|
||||
#: scan-gram.l:202
|
||||
#: scan-gram.l:211
|
||||
#, c-format
|
||||
msgid ": invalid character: `%c'\n"
|
||||
msgstr ""
|
||||
|
||||
#: scan-gram.l:246
|
||||
#: scan-gram.l:255
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a comment\n"
|
||||
msgstr "neoèekivan kraj datoteke"
|
||||
|
||||
#: scan-gram.l:274 scan-gram.l:412
|
||||
#: scan-gram.l:284 scan-gram.l:423
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a string\n"
|
||||
msgstr "neoèekivan kraj datoteke"
|
||||
|
||||
#: scan-gram.l:311 scan-gram.l:383
|
||||
#: scan-gram.l:322 scan-gram.l:394
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a character\n"
|
||||
msgstr "neoèekivan kraj datoteke"
|
||||
|
||||
#: scan-gram.l:332
|
||||
#: scan-gram.l:343
|
||||
#, fuzzy, c-format
|
||||
msgid ": invalid escape: %s\n"
|
||||
msgstr "nedozvoljeni ulaz: %s"
|
||||
|
||||
#: scan-gram.l:353
|
||||
#: scan-gram.l:364
|
||||
#, fuzzy, c-format
|
||||
msgid ": unrecognized escape: %s\n"
|
||||
msgstr "neprepoznati: %s"
|
||||
|
||||
#: scan-gram.l:473
|
||||
#: scan-gram.l:485
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a braced code\n"
|
||||
msgstr "neoèekivan kraj datoteke"
|
||||
|
||||
#: scan-gram.l:502
|
||||
#: scan-gram.l:514
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a prologue\n"
|
||||
msgstr "neoèekivan kraj datoteke"
|
||||
|
||||
#: scan-gram.l:560
|
||||
#: scan-gram.l:572
|
||||
#, c-format
|
||||
msgid "$$ of `%s' has no declared type"
|
||||
msgstr "$$ od `%s' nema deklarirani tip"
|
||||
|
||||
#: scan-gram.l:577 scan-gram.l:664
|
||||
#: scan-gram.l:584 scan-gram.l:666
|
||||
#, fuzzy, c-format
|
||||
msgid "invalid value: %s%d"
|
||||
msgstr "nedozvoljena @ vrijednost"
|
||||
|
||||
#: scan-gram.l:584
|
||||
#: scan-gram.l:591
|
||||
#, c-format
|
||||
msgid "$%d of `%s' has no declared type"
|
||||
msgstr "$%d od `%s' nema deklarirani tip"
|
||||
|
||||
#: scan-gram.l:595 scan-gram.l:612 scan-gram.l:671 scan-gram.l:688
|
||||
#: scan-gram.l:602 scan-gram.l:619 scan-gram.l:673 scan-gram.l:690
|
||||
#, c-format
|
||||
msgid "%s is invalid"
|
||||
msgstr "%s je nedozvoljeno"
|
||||
@@ -569,67 +569,67 @@ msgstr ""
|
||||
msgid "Valid arguments are:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:226
|
||||
#, c-format
|
||||
msgid "%d bitset_allocs, %d freed (%.2f%%).\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:229
|
||||
#, c-format
|
||||
msgid "%d bitset_sets, %d cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:232
|
||||
#, c-format
|
||||
msgid "%d bitset_resets, %d cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:235
|
||||
#, c-format
|
||||
msgid "%d bitset_tests, %d cached (%.2f%%)\n"
|
||||
msgid "%u bitset_allocs, %u freed (%.2f%%).\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:239
|
||||
#: lib/bitset_stats.c:238
|
||||
#, c-format
|
||||
msgid "%d bitset_lists\n"
|
||||
msgid "%u bitset_sets, %u cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:241
|
||||
msgid "count log histogram\n"
|
||||
#, c-format
|
||||
msgid "%u bitset_resets, %u cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:244
|
||||
#, c-format
|
||||
msgid "%u bitset_tests, %u cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:248
|
||||
#, c-format
|
||||
msgid "%u bitset_lists\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:250
|
||||
msgid "count log histogram\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:253
|
||||
msgid "size log histogram\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:247
|
||||
#: lib/bitset_stats.c:256
|
||||
msgid "density histogram\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:264
|
||||
#: lib/bitset_stats.c:272
|
||||
msgid ""
|
||||
"Bitset statistics:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:267
|
||||
#: lib/bitset_stats.c:275
|
||||
#, c-format
|
||||
msgid "Accumulated runs = %d\n"
|
||||
msgid "Accumulated runs = %u\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:311
|
||||
#: lib/bitset_stats.c:320
|
||||
msgid "Could not read stats file."
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:313
|
||||
#: lib/bitset_stats.c:322
|
||||
msgid "Bad stats file size.\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:339
|
||||
#: lib/bitset_stats.c:348
|
||||
msgid "Could not write stats file."
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:343
|
||||
#: lib/bitset_stats.c:352
|
||||
msgid "Could not open stats file for writing."
|
||||
msgstr ""
|
||||
|
||||
@@ -700,17 +700,17 @@ msgstr "`"
|
||||
msgid "'"
|
||||
msgstr "'"
|
||||
|
||||
#: lib/timevar.c:466
|
||||
#: lib/timevar.c:476
|
||||
msgid ""
|
||||
"\n"
|
||||
"Execution times (seconds)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/timevar.c:516
|
||||
#: lib/timevar.c:526
|
||||
msgid " TOTAL :"
|
||||
msgstr ""
|
||||
|
||||
#: lib/timevar.c:552
|
||||
#: lib/timevar.c:562
|
||||
#, c-format
|
||||
msgid "time in %s: %ld.%06ld (%ld%%)\n"
|
||||
msgstr ""
|
||||
|
||||
@@ -0,0 +1,715 @@
|
||||
# bison 1.50 (Indonesian)
|
||||
# Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
# This file is distributed under the same license as the bison 1.50 package.
|
||||
# Tedi Heriyanto <[email protected]>, 2002
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bison 1.50\n"
|
||||
"POT-Creation-Date: 2002-10-14 14:47+0200\n"
|
||||
"PO-Revision-Date: 2002-10-08 17:53+0700\n"
|
||||
"Last-Translator: Tedi Heriyanto <[email protected]>\n"
|
||||
"Language-Team: Indonesian <[email protected]>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: KBabel 0.9.5\n"
|
||||
|
||||
#: src/complain.c:89 lib/error.c:128 lib/error.c:156
|
||||
msgid "Unknown system error"
|
||||
msgstr "Kesalahan sistem tidak dikenal"
|
||||
|
||||
#: src/complain.c:123 src/complain.c:152
|
||||
msgid "warning: "
|
||||
msgstr "peringatan: "
|
||||
|
||||
#: src/complain.c:252 src/complain.c:282
|
||||
msgid "fatal error: "
|
||||
msgstr "kesalahan fatal: "
|
||||
|
||||
#: src/conflicts.c:72
|
||||
#, c-format
|
||||
msgid " Conflict between rule %d and token %s resolved as shift"
|
||||
msgstr " Konflik antara aturan %d dan token %s diselesaikan sebagai shift"
|
||||
|
||||
#: src/conflicts.c:80
|
||||
#, c-format
|
||||
msgid " Conflict between rule %d and token %s resolved as reduce"
|
||||
msgstr " Konflik antara aturan %d dan token %s diselesaikan sebagai reduce"
|
||||
|
||||
#: src/conflicts.c:87
|
||||
#, c-format
|
||||
msgid " Conflict between rule %d and token %s resolved as an error"
|
||||
msgstr ""
|
||||
" Konflik antara aturan %d dan token %s diselesaikan sebagai kesalahan"
|
||||
|
||||
#: src/conflicts.c:402
|
||||
#, c-format
|
||||
msgid "%d shift/reduce conflict"
|
||||
msgid_plural "%d shift/reduce conflicts"
|
||||
msgstr[0] "%d geser/kurangi konflik"
|
||||
msgstr[1] ""
|
||||
|
||||
#: src/conflicts.c:409
|
||||
msgid "and"
|
||||
msgstr "dan"
|
||||
|
||||
#: src/conflicts.c:415
|
||||
#, c-format
|
||||
msgid "%d reduce/reduce conflict"
|
||||
msgid_plural "%d reduce/reduce conflicts"
|
||||
msgstr[0] "%d geser/kurangi konflik"
|
||||
msgstr[1] ""
|
||||
|
||||
#: src/conflicts.c:435
|
||||
msgid "conflicts: "
|
||||
msgstr "konflik: "
|
||||
|
||||
#: src/conflicts.c:437
|
||||
#, c-format
|
||||
msgid " %d shift/reduce"
|
||||
msgstr " %d geser/kurangi"
|
||||
|
||||
#: src/conflicts.c:441
|
||||
#, c-format
|
||||
msgid " %d reduce/reduce"
|
||||
msgstr " %d kurangi/kurangi"
|
||||
|
||||
#: src/conflicts.c:460
|
||||
#, c-format
|
||||
msgid "State %d contains "
|
||||
msgstr "State %d berisi "
|
||||
|
||||
#: src/conflicts.c:537
|
||||
#, c-format
|
||||
msgid "expected %d shift/reduce conflict"
|
||||
msgid_plural "expected %d shift/reduce conflicts"
|
||||
msgstr[0] "mengharapkan %d shift/reduce konflik"
|
||||
msgstr[1] ""
|
||||
|
||||
#: src/files.c:114
|
||||
#, c-format
|
||||
msgid "cannot open file `%s'"
|
||||
msgstr "tidak dapat membuka file `%s'"
|
||||
|
||||
#: src/files.c:133
|
||||
msgid "cannot close file"
|
||||
msgstr "tidak dapat menutup file"
|
||||
|
||||
#: src/getargs.c:157
|
||||
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
|
||||
msgstr "GNU bison generates parsers for LALR(1) grammars.\n"
|
||||
|
||||
#: src/getargs.c:161
|
||||
#, c-format
|
||||
msgid "Usage: %s [OPTION]... FILE\n"
|
||||
msgstr "Penggunaan: %s [OPTION]... FILE\n"
|
||||
|
||||
#: src/getargs.c:165
|
||||
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 ""
|
||||
"Jika option panjang menyatakan argumen sebagai mandatori, maka ia mandatori "
|
||||
"juga\n"
|
||||
"untuk option pendek. Hal yang sama untuk argumen opsional.\n"
|
||||
|
||||
#: src/getargs.c:171
|
||||
msgid ""
|
||||
"Operation modes:\n"
|
||||
" -h, --help display this help and exit\n"
|
||||
" -V, --version output version information and exit\n"
|
||||
" -y, --yacc emulate POSIX yacc\n"
|
||||
msgstr ""
|
||||
"Mode Operasi:\n"
|
||||
" -h, --help tampilkan bantuan ini dan keluar\n"
|
||||
" -V, --version tampilkan informasi versi dan keluar\n"
|
||||
" -y, --yacc emulasikan POSIX yacc\n"
|
||||
|
||||
#: src/getargs.c:178
|
||||
msgid ""
|
||||
"Parser:\n"
|
||||
" -S, --skeleton=FILE specify the skeleton to use\n"
|
||||
" -t, --debug instrument the parser for debugging\n"
|
||||
" --locations enable locations computation\n"
|
||||
" -p, --name-prefix=PREFIX prepend PREFIX to the external symbols\n"
|
||||
" -l, --no-lines don't generate `#line' directives\n"
|
||||
" -n, --no-parser generate the tables only\n"
|
||||
" -k, --token-table include a table of token names\n"
|
||||
msgstr ""
|
||||
"Parser:\n"
|
||||
" -S, --skeleton=FILE specifikasikan rangka yang akan digunakan\n"
|
||||
" -t, --debug instrumen parser untuk debugging\n"
|
||||
" --locations aktifkan lokasi perhitungan\n"
|
||||
" -p, --name-prefix=PREFIX tambahkan PREFIX ke simbol eksternal\n"
|
||||
" -l, --no-lines jangan hasilkan direktiv `#line'\n"
|
||||
" -n, --no-parser hasilkan hanya tabel\n"
|
||||
" -k, --token-table sertakan tabel nama token\n"
|
||||
|
||||
#: src/getargs.c:190
|
||||
msgid ""
|
||||
"Output:\n"
|
||||
" -d, --defines also produce a header file\n"
|
||||
" -r, --report=THINGS also produce details on the automaton\n"
|
||||
" -v, --verbose same as `--report=state'\n"
|
||||
" -b, --file-prefix=PREFIX specify a PREFIX for output files\n"
|
||||
" -o, --output=FILE leave output to FILE\n"
|
||||
" -g, --graph also produce a VCG description of the "
|
||||
"automaton\n"
|
||||
msgstr ""
|
||||
"Output:\n"
|
||||
" -d, --defines juga hasilkan file header\n"
|
||||
" -r, --report=THINGS juga hasilkan detil tentang otomaton\n"
|
||||
" -v, --verbose sama seperti `--report=state'\n"
|
||||
" -b, --file-prefix=PREFIX spesifikasikan PREFIX untuk file output\n"
|
||||
" -o, --output=FILE simpan output ke FILE\n"
|
||||
" -g, --graph juga hasilkan deskripsi VCG automaton\n"
|
||||
|
||||
#: src/getargs.c:201
|
||||
msgid ""
|
||||
"THINGS is a list of comma separated words that can include:\n"
|
||||
" `state' describe the states\n"
|
||||
" `itemset' complete the core item sets with their closure\n"
|
||||
" `lookahead' explicitly associate lookaheads to items\n"
|
||||
" `solved' describe shift/reduce conflicts solving\n"
|
||||
" `all' include all the above information\n"
|
||||
" `none' disable the report\n"
|
||||
msgstr ""
|
||||
"THINGS adalah daftar kata yang dipisahkan koma termasuk:\n"
|
||||
" `state' menggambarkan state\n"
|
||||
" `itemset' lengkapi himpunan item inti dengan klosurnya\n"
|
||||
" `lookahead' asosiasikan lookaheads ke items secara eksplisit\n"
|
||||
" `solved' gambarkan penyelesaian konflik shift/reduce\n"
|
||||
" `all' sertakan semua informasi di atas\n"
|
||||
" `none' tiadakan laporan\n"
|
||||
|
||||
#: src/getargs.c:212
|
||||
msgid "Report bugs to <[email protected]>.\n"
|
||||
msgstr "Laporkan kesalahan ke <[email protected]>.\n"
|
||||
|
||||
#: src/getargs.c:226
|
||||
#, c-format
|
||||
msgid "bison (GNU Bison) %s"
|
||||
msgstr "bison (GNU Bison) %s"
|
||||
|
||||
#: src/getargs.c:228
|
||||
msgid "Written by Robert Corbett and Richard Stallman.\n"
|
||||
msgstr "Written by Robert Corbett and Richard Stallman.\n"
|
||||
|
||||
#: src/getargs.c:232
|
||||
#, c-format
|
||||
msgid "Copyright (C) %d Free Software Foundation, Inc.\n"
|
||||
msgstr "Copyright (C) %d Free Software Foundation, Inc.\n"
|
||||
|
||||
#: src/getargs.c:234
|
||||
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 ""
|
||||
"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"
|
||||
|
||||
#: src/getargs.c:395
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information.\n"
|
||||
msgstr "Coba `%s --help' untuk informasi lebih lanjut.\n"
|
||||
|
||||
#: src/getargs.c:402
|
||||
#, c-format
|
||||
msgid "%s: no grammar file given\n"
|
||||
msgstr "%s: tidak diberikan file grammar\n"
|
||||
|
||||
#: src/getargs.c:406
|
||||
#, c-format
|
||||
msgid "%s: extra arguments ignored after `%s'\n"
|
||||
msgstr "%s: argumen ekstra diabaikan setelah `%s'\n"
|
||||
|
||||
#: src/gram.c:139
|
||||
msgid "empty"
|
||||
msgstr "kosong"
|
||||
|
||||
#: src/gram.c:233
|
||||
msgid "Grammar"
|
||||
msgstr "Grammar"
|
||||
|
||||
#: src/gram.c:321 src/reduce.c:302 src/reduce.c:392
|
||||
msgid "warning"
|
||||
msgstr "peringatan"
|
||||
|
||||
#: src/lalr.c:91
|
||||
#, c-format
|
||||
msgid "too many gotos (max %d)"
|
||||
msgstr "terlalu banyak goto (maks %d)"
|
||||
|
||||
#: src/main.c:117
|
||||
msgid "rule never reduced because of conflicts"
|
||||
msgstr "aturan tidak pernah dikurangi karena konflik"
|
||||
|
||||
#: parse-gram.y:347
|
||||
msgid "POSIX forbids declarations in the grammar"
|
||||
msgstr "POSIX melarang deklarasi dalam grammar"
|
||||
|
||||
#: src/print.c:46
|
||||
#, c-format
|
||||
msgid " type %d is %s\n"
|
||||
msgstr " tipe %d adalah %s\n"
|
||||
|
||||
#: src/print.c:162
|
||||
#, c-format
|
||||
msgid "shift, and go to state %d\n"
|
||||
msgstr "geser, dan ke state %d\n"
|
||||
|
||||
#: src/print.c:164
|
||||
#, c-format
|
||||
msgid "go to state %d\n"
|
||||
msgstr "ke state %d\n"
|
||||
|
||||
#: src/print.c:201
|
||||
msgid "error (nonassociative)\n"
|
||||
msgstr "kesalahan(nonasosiatif)\n"
|
||||
|
||||
#: src/print.c:290
|
||||
#, c-format
|
||||
msgid "reduce using rule %d (%s)"
|
||||
msgstr "kurangi gunakan aturan %d (%s)"
|
||||
|
||||
#: src/print.c:293
|
||||
msgid "accept"
|
||||
msgstr "terima"
|
||||
|
||||
#: src/print.c:324 src/print.c:390
|
||||
msgid "$default"
|
||||
msgstr "$default"
|
||||
|
||||
#: src/print.c:419
|
||||
#, c-format
|
||||
msgid "state %d"
|
||||
msgstr "state %d"
|
||||
|
||||
#: src/print.c:456
|
||||
msgid "Terminals, with rules where they appear"
|
||||
msgstr "Terminal, dengan aturan tempat mereka muncul"
|
||||
|
||||
#: src/print.c:483
|
||||
msgid "Nonterminals, with rules where they appear"
|
||||
msgstr "Nonterminal, dengan aturan tempat mereka muncul"
|
||||
|
||||
#: src/print.c:512
|
||||
msgid " on left:"
|
||||
msgstr " di kiri:"
|
||||
|
||||
#: src/print.c:527
|
||||
msgid " on right:"
|
||||
msgstr " di kanan:"
|
||||
|
||||
#: src/print.c:555
|
||||
msgid "Rules never reduced"
|
||||
msgstr "Aturan tidak pernah dikurangi"
|
||||
|
||||
#: src/reader.c:52
|
||||
#, c-format
|
||||
msgid "multiple %s declarations"
|
||||
msgstr "deklarasi ganda %s"
|
||||
|
||||
#: src/reader.c:141
|
||||
#, c-format
|
||||
msgid "result type clash on merge function %s: `%s' vs. `%s'"
|
||||
msgstr "tipe hasil bentrok pada fungsi merge %s: `%s' vs `%s'"
|
||||
|
||||
#: src/reader.c:239
|
||||
#, c-format
|
||||
msgid "rule given for %s, which is a token"
|
||||
msgstr "aturan diberikan untuk %s, yang merupakan sebuah token"
|
||||
|
||||
#: src/reader.c:268
|
||||
#, c-format
|
||||
msgid "type clash (`%s' `%s') on default action"
|
||||
msgstr "bentrokan tipe (`%s' `%s') pada aksi baku"
|
||||
|
||||
#: src/reader.c:274
|
||||
msgid "empty rule for typed nonterminal, and no action"
|
||||
msgstr "aturan kosong untuk nonterminal typed, dan tidak ada aksi"
|
||||
|
||||
#: src/reader.c:344
|
||||
msgid "two @prec's in a row"
|
||||
msgstr "dua @prec dalam satu baris"
|
||||
|
||||
#: src/reader.c:354
|
||||
#, c-format
|
||||
msgid "%%dprec affects only GLR parsers"
|
||||
msgstr "%%dprec hanya mempengaruhi parser GLR"
|
||||
|
||||
#: src/reader.c:356
|
||||
#, c-format
|
||||
msgid "%%dprec must be followed by positive number"
|
||||
msgstr "%%dprec harus diikuti oleh angka positif"
|
||||
|
||||
#: src/reader.c:358
|
||||
#, c-format
|
||||
msgid "only one %%dprec allowed per rule"
|
||||
msgstr "hanya satu %%dprec yang dibolehkan untuk satu aturan"
|
||||
|
||||
#: src/reader.c:369
|
||||
#, c-format
|
||||
msgid "%%merge affects only GLR parsers"
|
||||
msgstr "%%merge hanya mempengaruhi parser GLR"
|
||||
|
||||
#: src/reader.c:371
|
||||
#, c-format
|
||||
msgid "only one %%merge allowed per rule"
|
||||
msgstr "hanya satu %%merge yang dibolehkan tiap aturan"
|
||||
|
||||
#: src/reader.c:514
|
||||
msgid "no rules in the input grammar"
|
||||
msgstr "tidak ada aturan dalam grammar input"
|
||||
|
||||
#: src/reader.c:546
|
||||
#, c-format
|
||||
msgid "too many symbols (tokens plus nonterminals); maximum %d"
|
||||
msgstr "terlalu banyak simbol (token dan nonterminal); maksimum %d"
|
||||
|
||||
#: src/reduce.c:239
|
||||
msgid "useless rule"
|
||||
msgstr "aturan tidak berguna"
|
||||
|
||||
#: src/reduce.c:302
|
||||
msgid "useless nonterminal"
|
||||
msgstr "nonterminal tidak berguna"
|
||||
|
||||
#: src/reduce.c:349
|
||||
msgid "Useless nonterminals"
|
||||
msgstr "Nonterminal tidak berguna"
|
||||
|
||||
#: src/reduce.c:362
|
||||
msgid "Terminals which are not used"
|
||||
msgstr "Terminal yang tidak digunakan"
|
||||
|
||||
#: src/reduce.c:371
|
||||
msgid "Useless rules"
|
||||
msgstr "Useless rules"
|
||||
|
||||
#: src/reduce.c:387
|
||||
#, c-format
|
||||
msgid "%d rule never reduced\n"
|
||||
msgid_plural "%d rules never reduced\n"
|
||||
msgstr[0] "Aturan %d tidak pernah dikurangi\n"
|
||||
msgstr[1] "Aturan %d tidak pernah dikurangi\n"
|
||||
|
||||
#: src/reduce.c:395
|
||||
#, c-format
|
||||
msgid "%d useless nonterminal"
|
||||
msgid_plural "%d useless nonterminals"
|
||||
msgstr[0] "nonterminal tidak berguna %d"
|
||||
msgstr[1] "nonterminal tidak berguna %d"
|
||||
|
||||
#: src/reduce.c:401
|
||||
msgid " and "
|
||||
msgstr " dan "
|
||||
|
||||
#: src/reduce.c:404
|
||||
#, c-format
|
||||
msgid "%d useless rule"
|
||||
msgid_plural "%d useless rules"
|
||||
msgstr[0] "aturan tidak berguna %d"
|
||||
msgstr[1] "aturan tidak berguna %d"
|
||||
|
||||
#: src/reduce.c:435
|
||||
#, c-format
|
||||
msgid "start symbol %s does not derive any sentence"
|
||||
msgstr "simbol awal %s tidak melahirkan kalimat"
|
||||
|
||||
#: scan-gram.l:211
|
||||
#, c-format
|
||||
msgid ": invalid character: `%c'\n"
|
||||
msgstr ": karakter tidak valid: `%c'\n"
|
||||
|
||||
#: scan-gram.l:255
|
||||
msgid ": unexpected end of file in a comment\n"
|
||||
msgstr ": akhir file tidak diharapkan dalam komentar\n"
|
||||
|
||||
#: scan-gram.l:284 scan-gram.l:423
|
||||
msgid ": unexpected end of file in a string\n"
|
||||
msgstr ": akhir file tidak diharapkan dalam string\n"
|
||||
|
||||
#: scan-gram.l:322 scan-gram.l:394
|
||||
msgid ": unexpected end of file in a character\n"
|
||||
msgstr ": akhir file tidak diharapkan dalam karakter\n"
|
||||
|
||||
#: scan-gram.l:343
|
||||
#, c-format
|
||||
msgid ": invalid escape: %s\n"
|
||||
msgstr ": escape tidak valid: %s\n"
|
||||
|
||||
#: scan-gram.l:364
|
||||
#, c-format
|
||||
msgid ": unrecognized escape: %s\n"
|
||||
msgstr ": escape tidak dikenal: %s\n"
|
||||
|
||||
#: scan-gram.l:485
|
||||
msgid ": unexpected end of file in a braced code\n"
|
||||
msgstr ": akhir file tidak diharapkan dalam kode braced\n"
|
||||
|
||||
#: scan-gram.l:514
|
||||
msgid ": unexpected end of file in a prologue\n"
|
||||
msgstr ": akhir file tidak diharapkan dalam prolog\n"
|
||||
|
||||
#: scan-gram.l:572
|
||||
#, c-format
|
||||
msgid "$$ of `%s' has no declared type"
|
||||
msgstr "$$ dari `%s' tidak memiliki tipe yang terdeklarasi"
|
||||
|
||||
#: scan-gram.l:584 scan-gram.l:666
|
||||
#, c-format
|
||||
msgid "invalid value: %s%d"
|
||||
msgstr "nilai tidak valid: %s%d"
|
||||
|
||||
#: scan-gram.l:591
|
||||
#, c-format
|
||||
msgid "$%d of `%s' has no declared type"
|
||||
msgstr "$%d dari `%s' tidak memiliki tipe terdeklarasi"
|
||||
|
||||
#: scan-gram.l:602 scan-gram.l:619 scan-gram.l:673 scan-gram.l:690
|
||||
#, c-format
|
||||
msgid "%s is invalid"
|
||||
msgstr "%s tidak valid"
|
||||
|
||||
#: src/state.c:145
|
||||
#, c-format
|
||||
msgid "too many states (max %d)"
|
||||
msgstr "terlalu banyak state (maks %d)"
|
||||
|
||||
#: src/symlist.c:97 src/symlist.c:109
|
||||
msgid "invalid $ value"
|
||||
msgstr "nilai $ tidak valid"
|
||||
|
||||
#: src/symtab.c:81
|
||||
#, c-format
|
||||
msgid "type redeclaration for %s"
|
||||
msgstr "redeklarasi tipe untuk %s"
|
||||
|
||||
#: src/symtab.c:98 src/symtab.c:117
|
||||
#, c-format
|
||||
msgid "%s redeclaration for %s"
|
||||
msgstr "%s redeklarasi untuk %s"
|
||||
|
||||
#: src/symtab.c:138
|
||||
#, c-format
|
||||
msgid "redefining precedence of %s"
|
||||
msgstr "mendefinisikan kembali presedens %s"
|
||||
|
||||
#: src/symtab.c:157
|
||||
#, c-format
|
||||
msgid "symbol %s redefined"
|
||||
msgstr "simbol %s didefinisikan ulang"
|
||||
|
||||
#: src/symtab.c:180
|
||||
#, c-format
|
||||
msgid "redefining user token number of %s"
|
||||
msgstr "mendefinisikan ulang nomor token user %s"
|
||||
|
||||
#: src/symtab.c:225
|
||||
#, c-format
|
||||
msgid "symbol %s is used, but is not defined as a token and has no rules"
|
||||
msgstr ""
|
||||
"simbol %s digunakan, namun tidak didefinisikan sebagai token dan tidak "
|
||||
"memiliki aturan"
|
||||
|
||||
#: src/symtab.c:244
|
||||
#, c-format
|
||||
msgid "symbol `%s' used more than once as a literal string"
|
||||
msgstr "simbol `%s' digunakan lebih dari satu kali sebagai string literal"
|
||||
|
||||
#: src/symtab.c:247
|
||||
#, c-format
|
||||
msgid "symbol `%s' given more than one literal string"
|
||||
msgstr "simbol `%s' diberikan lebih dari satu string literal"
|
||||
|
||||
#: src/symtab.c:281
|
||||
#, c-format
|
||||
msgid "conflicting precedences for %s and %s"
|
||||
msgstr "presenden konflik untuk %s dan %s"
|
||||
|
||||
#: src/symtab.c:293
|
||||
#, c-format
|
||||
msgid "conflicting associativities for %s (%s) and %s (%s)"
|
||||
msgstr "asosiatif konflik untuk %s (%s) dan %s (%s)"
|
||||
|
||||
#: src/symtab.c:363
|
||||
#, c-format
|
||||
msgid "tokens %s and %s both assigned number %d"
|
||||
msgstr "token %s dan %s keduanya memiliki angka %d"
|
||||
|
||||
#: src/symtab.c:568
|
||||
#, c-format
|
||||
msgid "the start symbol %s is undefined"
|
||||
msgstr "simbol awal %s tidak didefinisikan"
|
||||
|
||||
#: src/symtab.c:572
|
||||
#, c-format
|
||||
msgid "the start symbol %s is a token"
|
||||
msgstr "simbol awal %s adalah sebuah token"
|
||||
|
||||
#: lib/argmatch.c:161
|
||||
#, c-format
|
||||
msgid "invalid argument %s for %s"
|
||||
msgstr "argument %s tidak valid untuk %s"
|
||||
|
||||
#: lib/argmatch.c:162
|
||||
#, c-format
|
||||
msgid "ambiguous argument %s for %s"
|
||||
msgstr "argumen %s ambigu untuk %s"
|
||||
|
||||
#: lib/argmatch.c:181
|
||||
msgid "Valid arguments are:"
|
||||
msgstr "Argumen valid adalah:"
|
||||
|
||||
#: lib/bitset_stats.c:235
|
||||
#, c-format
|
||||
msgid "%u bitset_allocs, %u freed (%.2f%%).\n"
|
||||
msgstr "%u bitset_allocs, %u freed (%.2f%%).\n"
|
||||
|
||||
#: lib/bitset_stats.c:238
|
||||
#, c-format
|
||||
msgid "%u bitset_sets, %u cached (%.2f%%)\n"
|
||||
msgstr "%u bitset_sets, %u cached (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:241
|
||||
#, c-format
|
||||
msgid "%u bitset_resets, %u cached (%.2f%%)\n"
|
||||
msgstr "%u bitset_resets, %u cached (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:244
|
||||
#, c-format
|
||||
msgid "%u bitset_tests, %u cached (%.2f%%)\n"
|
||||
msgstr "%u bitset_tests, %u cached (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:248
|
||||
#, c-format
|
||||
msgid "%u bitset_lists\n"
|
||||
msgstr "%u bitset_lists\n"
|
||||
|
||||
#: lib/bitset_stats.c:250
|
||||
msgid "count log histogram\n"
|
||||
msgstr "hitung log histogram\n"
|
||||
|
||||
#: lib/bitset_stats.c:253
|
||||
msgid "size log histogram\n"
|
||||
msgstr "ukuran log histogram\n"
|
||||
|
||||
#: lib/bitset_stats.c:256
|
||||
msgid "density histogram\n"
|
||||
msgstr "kepadatan histogram\n"
|
||||
|
||||
#: lib/bitset_stats.c:272
|
||||
msgid ""
|
||||
"Bitset statistics:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Statistik bitset:\n"
|
||||
"\n"
|
||||
|
||||
#: lib/bitset_stats.c:275
|
||||
#, c-format
|
||||
msgid "Accumulated runs = %u\n"
|
||||
msgstr "Run terakumulasi = %u\n"
|
||||
|
||||
#: lib/bitset_stats.c:320
|
||||
msgid "Could not read stats file."
|
||||
msgstr "Tidak dapat membaca file stat."
|
||||
|
||||
#: lib/bitset_stats.c:322
|
||||
msgid "Bad stats file size.\n"
|
||||
msgstr "Ukuran file stat buruk.\n"
|
||||
|
||||
#: lib/bitset_stats.c:348
|
||||
msgid "Could not write stats file."
|
||||
msgstr "Tidak dapat menulis file stat."
|
||||
|
||||
#: lib/bitset_stats.c:352
|
||||
msgid "Could not open stats file for writing."
|
||||
msgstr "Tidak dapat membuka file stat untuk ditulisi."
|
||||
|
||||
#: lib/getopt.c:662
|
||||
#, c-format
|
||||
msgid "%s: option `%s' is ambiguous\n"
|
||||
msgstr "%s: option `%s' ambigu\n"
|
||||
|
||||
#: lib/getopt.c:687
|
||||
#, c-format
|
||||
msgid "%s: option `--%s' doesn't allow an argument\n"
|
||||
msgstr "%s: option `--%s' tidak membolehkan sebuah argumen\n"
|
||||
|
||||
#: lib/getopt.c:692
|
||||
#, c-format
|
||||
msgid "%s: option `%c%s' doesn't allow an argument\n"
|
||||
msgstr "%s: option `%c%s' tidak membolehkan sebuah argumen\n"
|
||||
|
||||
#: lib/getopt.c:710 lib/getopt.c:883
|
||||
#, c-format
|
||||
msgid "%s: option `%s' requires an argument\n"
|
||||
msgstr "%s: option `%s' membutuhkan sebuah argumen\n"
|
||||
|
||||
#: lib/getopt.c:739
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `--%s'\n"
|
||||
msgstr "%s: option tidak dikenal `--%s'\n"
|
||||
|
||||
#: lib/getopt.c:743
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `%c%s'\n"
|
||||
msgstr "%s: option tidak dikenal `%c%s'\n"
|
||||
|
||||
#: lib/getopt.c:769
|
||||
#, c-format
|
||||
msgid "%s: illegal option -- %c\n"
|
||||
msgstr "%s: option ilegal -- %c\n"
|
||||
|
||||
#: lib/getopt.c:772
|
||||
#, c-format
|
||||
msgid "%s: invalid option -- %c\n"
|
||||
msgstr "%s: option tidak valid -- %c\n"
|
||||
|
||||
#: lib/getopt.c:802 lib/getopt.c:932
|
||||
#, c-format
|
||||
msgid "%s: option requires an argument -- %c\n"
|
||||
msgstr "%s: option membutuhkan sebuah argumen -- %c\n"
|
||||
|
||||
#: lib/getopt.c:849
|
||||
#, c-format
|
||||
msgid "%s: option `-W %s' is ambiguous\n"
|
||||
msgstr "%s: option `-W %s' ambigu\n"
|
||||
|
||||
#: lib/getopt.c:867
|
||||
#, c-format
|
||||
msgid "%s: option `-W %s' doesn't allow an argument\n"
|
||||
msgstr "%s: option `-W %s' tidak membolehkan sebuah argumen\n"
|
||||
|
||||
#: lib/obstack.c:496 lib/obstack.c:499 lib/xmalloc.c:66
|
||||
msgid "memory exhausted"
|
||||
msgstr "memori habis"
|
||||
|
||||
#: lib/quotearg.c:274
|
||||
msgid "`"
|
||||
msgstr "`"
|
||||
|
||||
#: lib/quotearg.c:275
|
||||
msgid "'"
|
||||
msgstr "'"
|
||||
|
||||
#: lib/timevar.c:476
|
||||
msgid ""
|
||||
"\n"
|
||||
"Execution times (seconds)\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Waktu eksekusi (detik)\n"
|
||||
|
||||
#: lib/timevar.c:526
|
||||
msgid " TOTAL :"
|
||||
msgstr " TOTAL :"
|
||||
|
||||
#: lib/timevar.c:562
|
||||
#, c-format
|
||||
msgid "time in %s: %ld.%06ld (%ld%%)\n"
|
||||
msgstr "waktu dalam %s: %ld.%06ld (%ld%%)\n"
|
||||
@@ -5,7 +5,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bison 1.49a\n"
|
||||
"POT-Creation-Date: 2002-09-27 16:50+0200\n"
|
||||
"POT-Creation-Date: 2002-10-14 14:47+0200\n"
|
||||
"PO-Revision-Date: 2002-05-03 11:03+0100\n"
|
||||
"Last-Translator: Paolo Bonzini <[email protected]>\n"
|
||||
"Language-Team: Italian <[email protected]>\n"
|
||||
@@ -282,23 +282,23 @@ msgstr ""
|
||||
msgid "state %d"
|
||||
msgstr "stato %d"
|
||||
|
||||
#: src/print.c:453
|
||||
#: src/print.c:456
|
||||
msgid "Terminals, with rules where they appear"
|
||||
msgstr "Simboli terminali e regole in cui appaiono"
|
||||
|
||||
#: src/print.c:480
|
||||
#: src/print.c:483
|
||||
msgid "Nonterminals, with rules where they appear"
|
||||
msgstr "Simboli nonterminali e regole in cui appaiono"
|
||||
|
||||
#: src/print.c:509
|
||||
#: src/print.c:512
|
||||
msgid " on left:"
|
||||
msgstr " nel primo membro:"
|
||||
|
||||
#: src/print.c:524
|
||||
#: src/print.c:527
|
||||
msgid " on right:"
|
||||
msgstr " nel secondo membro:"
|
||||
|
||||
#: src/print.c:552
|
||||
#: src/print.c:555
|
||||
#, fuzzy
|
||||
msgid "Rules never reduced"
|
||||
msgstr "%d regola non applicata\n"
|
||||
@@ -318,49 +318,49 @@ msgstr ""
|
||||
msgid "rule given for %s, which is a token"
|
||||
msgstr "fornita una regola per il token %s"
|
||||
|
||||
#: src/reader.c:264
|
||||
#: src/reader.c:268
|
||||
#, c-format
|
||||
msgid "type clash (`%s' `%s') on default action"
|
||||
msgstr "conflitto di tipo (`%s' e `%s') nell'azione di default"
|
||||
|
||||
#: src/reader.c:272
|
||||
#: src/reader.c:274
|
||||
msgid "empty rule for typed nonterminal, and no action"
|
||||
msgstr "regola vuota e nessuna azione per un nonterminale con tipo"
|
||||
|
||||
#: src/reader.c:343
|
||||
#: src/reader.c:344
|
||||
msgid "two @prec's in a row"
|
||||
msgstr "due @prec di seguito"
|
||||
|
||||
#: src/reader.c:353
|
||||
#: src/reader.c:354
|
||||
#, c-format
|
||||
msgid "%%dprec affects only GLR parsers"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:355
|
||||
#: src/reader.c:356
|
||||
#, c-format
|
||||
msgid "%%dprec must be followed by positive number"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:357
|
||||
#: src/reader.c:358
|
||||
#, c-format
|
||||
msgid "only one %%dprec allowed per rule"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:368
|
||||
#: src/reader.c:369
|
||||
#, c-format
|
||||
msgid "%%merge affects only GLR parsers"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:370
|
||||
#: src/reader.c:371
|
||||
#, c-format
|
||||
msgid "only one %%merge allowed per rule"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:513
|
||||
#: src/reader.c:514
|
||||
msgid "no rules in the input grammar"
|
||||
msgstr "nessuna regola nella grammatica di input"
|
||||
|
||||
#: src/reader.c:545
|
||||
#: src/reader.c:546
|
||||
#, c-format
|
||||
msgid "too many symbols (tokens plus nonterminals); maximum %d"
|
||||
msgstr "troppi simboli (token e nonterminali); il massimo è %d"
|
||||
@@ -420,62 +420,62 @@ msgstr[1] "%d regole inutili"
|
||||
msgid "start symbol %s does not derive any sentence"
|
||||
msgstr "dal simbolo iniziale %s non deriva alcuna frase"
|
||||
|
||||
#: scan-gram.l:202
|
||||
#: scan-gram.l:211
|
||||
#, c-format
|
||||
msgid ": invalid character: `%c'\n"
|
||||
msgstr ""
|
||||
|
||||
#: scan-gram.l:246
|
||||
#: scan-gram.l:255
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a comment\n"
|
||||
msgstr "fine del file inattesa"
|
||||
|
||||
#: scan-gram.l:274 scan-gram.l:412
|
||||
#: scan-gram.l:284 scan-gram.l:423
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a string\n"
|
||||
msgstr "fine del file inattesa"
|
||||
|
||||
#: scan-gram.l:311 scan-gram.l:383
|
||||
#: scan-gram.l:322 scan-gram.l:394
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a character\n"
|
||||
msgstr "fine del file inattesa"
|
||||
|
||||
#: scan-gram.l:332
|
||||
#: scan-gram.l:343
|
||||
#, fuzzy, c-format
|
||||
msgid ": invalid escape: %s\n"
|
||||
msgstr "valore non valido: %s%d"
|
||||
|
||||
#: scan-gram.l:353
|
||||
#: scan-gram.l:364
|
||||
#, fuzzy, c-format
|
||||
msgid ": unrecognized escape: %s\n"
|
||||
msgstr "non riconosciuto: %s"
|
||||
|
||||
#: scan-gram.l:473
|
||||
#: scan-gram.l:485
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a braced code\n"
|
||||
msgstr "fine del file inattesa"
|
||||
|
||||
#: scan-gram.l:502
|
||||
#: scan-gram.l:514
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a prologue\n"
|
||||
msgstr "fine del file inattesa"
|
||||
|
||||
#: scan-gram.l:560
|
||||
#: scan-gram.l:572
|
||||
#, c-format
|
||||
msgid "$$ of `%s' has no declared type"
|
||||
msgstr "Manca una dichiarazione di tipo per $$ di `%s'"
|
||||
|
||||
#: scan-gram.l:577 scan-gram.l:664
|
||||
#: scan-gram.l:584 scan-gram.l:666
|
||||
#, c-format
|
||||
msgid "invalid value: %s%d"
|
||||
msgstr "valore non valido: %s%d"
|
||||
|
||||
#: scan-gram.l:584
|
||||
#: scan-gram.l:591
|
||||
#, c-format
|
||||
msgid "$%d of `%s' has no declared type"
|
||||
msgstr "Manca una dichiarazione di tipo per $%d di `%s'"
|
||||
|
||||
#: scan-gram.l:595 scan-gram.l:612 scan-gram.l:671 scan-gram.l:688
|
||||
#: scan-gram.l:602 scan-gram.l:619 scan-gram.l:673 scan-gram.l:690
|
||||
#, c-format
|
||||
msgid "%s is invalid"
|
||||
msgstr "%s non è valido"
|
||||
@@ -568,67 +568,67 @@ msgstr ""
|
||||
msgid "Valid arguments are:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:226
|
||||
#, c-format
|
||||
msgid "%d bitset_allocs, %d freed (%.2f%%).\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:229
|
||||
#, c-format
|
||||
msgid "%d bitset_sets, %d cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:232
|
||||
#, c-format
|
||||
msgid "%d bitset_resets, %d cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:235
|
||||
#, c-format
|
||||
msgid "%d bitset_tests, %d cached (%.2f%%)\n"
|
||||
msgid "%u bitset_allocs, %u freed (%.2f%%).\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:239
|
||||
#: lib/bitset_stats.c:238
|
||||
#, c-format
|
||||
msgid "%d bitset_lists\n"
|
||||
msgid "%u bitset_sets, %u cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:241
|
||||
msgid "count log histogram\n"
|
||||
#, c-format
|
||||
msgid "%u bitset_resets, %u cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:244
|
||||
#, c-format
|
||||
msgid "%u bitset_tests, %u cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:248
|
||||
#, c-format
|
||||
msgid "%u bitset_lists\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:250
|
||||
msgid "count log histogram\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:253
|
||||
msgid "size log histogram\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:247
|
||||
#: lib/bitset_stats.c:256
|
||||
msgid "density histogram\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:264
|
||||
#: lib/bitset_stats.c:272
|
||||
msgid ""
|
||||
"Bitset statistics:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:267
|
||||
#: lib/bitset_stats.c:275
|
||||
#, c-format
|
||||
msgid "Accumulated runs = %d\n"
|
||||
msgid "Accumulated runs = %u\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:311
|
||||
#: lib/bitset_stats.c:320
|
||||
msgid "Could not read stats file."
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:313
|
||||
#: lib/bitset_stats.c:322
|
||||
msgid "Bad stats file size.\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:339
|
||||
#: lib/bitset_stats.c:348
|
||||
msgid "Could not write stats file."
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:343
|
||||
#: lib/bitset_stats.c:352
|
||||
msgid "Could not open stats file for writing."
|
||||
msgstr ""
|
||||
|
||||
@@ -699,17 +699,17 @@ msgstr "`"
|
||||
msgid "'"
|
||||
msgstr "'"
|
||||
|
||||
#: lib/timevar.c:466
|
||||
#: lib/timevar.c:476
|
||||
msgid ""
|
||||
"\n"
|
||||
"Execution times (seconds)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/timevar.c:516
|
||||
#: lib/timevar.c:526
|
||||
msgid " TOTAL :"
|
||||
msgstr ""
|
||||
|
||||
#: lib/timevar.c:552
|
||||
#: lib/timevar.c:562
|
||||
#, c-format
|
||||
msgid "time in %s: %ld.%06ld (%ld%%)\n"
|
||||
msgstr ""
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GNU bison 1.30f\n"
|
||||
"POT-Creation-Date: 2002-09-27 16:50+0200\n"
|
||||
"POT-Creation-Date: 2002-10-14 14:47+0200\n"
|
||||
"PO-Revision-Date: 2001-12-10 15:59+0900\n"
|
||||
"Last-Translator: Daisuke Yamashita <[email protected]>\n"
|
||||
"Language-Team: Japanese <[email protected]>\n"
|
||||
@@ -280,23 +280,23 @@ msgstr ""
|
||||
msgid "state %d"
|
||||
msgstr "状態 %d"
|
||||
|
||||
#: src/print.c:453
|
||||
#: src/print.c:456
|
||||
msgid "Terminals, with rules where they appear"
|
||||
msgstr "出現位置の規則による終端"
|
||||
|
||||
#: src/print.c:480
|
||||
#: src/print.c:483
|
||||
msgid "Nonterminals, with rules where they appear"
|
||||
msgstr "出現位置の規則による非終端"
|
||||
|
||||
#: src/print.c:509
|
||||
#: src/print.c:512
|
||||
msgid " on left:"
|
||||
msgstr " 左辺:"
|
||||
|
||||
#: src/print.c:524
|
||||
#: src/print.c:527
|
||||
msgid " on right:"
|
||||
msgstr " 右辺:"
|
||||
|
||||
#: src/print.c:552
|
||||
#: src/print.c:555
|
||||
#, fuzzy
|
||||
msgid "Rules never reduced"
|
||||
msgstr "%d 個の規則は決して還元されません\n"
|
||||
@@ -316,49 +316,49 @@ msgstr ""
|
||||
msgid "rule given for %s, which is a token"
|
||||
msgstr "%s に規則が与えられ、それはトークンとなります"
|
||||
|
||||
#: src/reader.c:264
|
||||
#: src/reader.c:268
|
||||
#, c-format
|
||||
msgid "type clash (`%s' `%s') on default action"
|
||||
msgstr "初期状態の動作では型 (`%s' `%s') が衝突します"
|
||||
|
||||
#: src/reader.c:272
|
||||
#: src/reader.c:274
|
||||
msgid "empty rule for typed nonterminal, and no action"
|
||||
msgstr "空の型付き非終端アイテム用規則であり、動作が起りません"
|
||||
|
||||
#: src/reader.c:343
|
||||
#: src/reader.c:344
|
||||
msgid "two @prec's in a row"
|
||||
msgstr "@prec のもの二つが同列になっています"
|
||||
|
||||
#: src/reader.c:353
|
||||
#: src/reader.c:354
|
||||
#, c-format
|
||||
msgid "%%dprec affects only GLR parsers"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:355
|
||||
#: src/reader.c:356
|
||||
#, c-format
|
||||
msgid "%%dprec must be followed by positive number"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:357
|
||||
#: src/reader.c:358
|
||||
#, c-format
|
||||
msgid "only one %%dprec allowed per rule"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:368
|
||||
#: src/reader.c:369
|
||||
#, c-format
|
||||
msgid "%%merge affects only GLR parsers"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:370
|
||||
#: src/reader.c:371
|
||||
#, c-format
|
||||
msgid "only one %%merge allowed per rule"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:513
|
||||
#: src/reader.c:514
|
||||
msgid "no rules in the input grammar"
|
||||
msgstr "入力した文法に規則が定義されていません"
|
||||
|
||||
#: src/reader.c:545
|
||||
#: src/reader.c:546
|
||||
#, c-format
|
||||
msgid "too many symbols (tokens plus nonterminals); maximum %d"
|
||||
msgstr "シンボルが多すぎます (トークン + 非終端アイテム) -- 最大 %d"
|
||||
@@ -415,62 +415,62 @@ msgstr[0] "%d
|
||||
msgid "start symbol %s does not derive any sentence"
|
||||
msgstr "開始シンボル %s はどの文にも由来しません"
|
||||
|
||||
#: scan-gram.l:202
|
||||
#: scan-gram.l:211
|
||||
#, c-format
|
||||
msgid ": invalid character: `%c'\n"
|
||||
msgstr ""
|
||||
|
||||
#: scan-gram.l:246
|
||||
#: scan-gram.l:255
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a comment\n"
|
||||
msgstr "予期しないファイルの終端です"
|
||||
|
||||
#: scan-gram.l:274 scan-gram.l:412
|
||||
#: scan-gram.l:284 scan-gram.l:423
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a string\n"
|
||||
msgstr "予期しないファイルの終端です"
|
||||
|
||||
#: scan-gram.l:311 scan-gram.l:383
|
||||
#: scan-gram.l:322 scan-gram.l:394
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a character\n"
|
||||
msgstr "予期しないファイルの終端です"
|
||||
|
||||
#: scan-gram.l:332
|
||||
#: scan-gram.l:343
|
||||
#, fuzzy, c-format
|
||||
msgid ": invalid escape: %s\n"
|
||||
msgstr "不適切な入力: %s"
|
||||
|
||||
#: scan-gram.l:353
|
||||
#: scan-gram.l:364
|
||||
#, fuzzy, c-format
|
||||
msgid ": unrecognized escape: %s\n"
|
||||
msgstr "認識できない: %s"
|
||||
|
||||
#: scan-gram.l:473
|
||||
#: scan-gram.l:485
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a braced code\n"
|
||||
msgstr "予期しないファイルの終端です"
|
||||
|
||||
#: scan-gram.l:502
|
||||
#: scan-gram.l:514
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a prologue\n"
|
||||
msgstr "予期しないファイルの終端です"
|
||||
|
||||
#: scan-gram.l:560
|
||||
#: scan-gram.l:572
|
||||
#, c-format
|
||||
msgid "$$ of `%s' has no declared type"
|
||||
msgstr "`%s' の $$ に宣言のない型があります"
|
||||
|
||||
#: scan-gram.l:577 scan-gram.l:664
|
||||
#: scan-gram.l:584 scan-gram.l:666
|
||||
#, fuzzy, c-format
|
||||
msgid "invalid value: %s%d"
|
||||
msgstr "不適切な $ の値"
|
||||
|
||||
#: scan-gram.l:584
|
||||
#: scan-gram.l:591
|
||||
#, c-format
|
||||
msgid "$%d of `%s' has no declared type"
|
||||
msgstr "$%d 個の `%s' が宣言された型を持っていません"
|
||||
|
||||
#: scan-gram.l:595 scan-gram.l:612 scan-gram.l:671 scan-gram.l:688
|
||||
#: scan-gram.l:602 scan-gram.l:619 scan-gram.l:673 scan-gram.l:690
|
||||
#, c-format
|
||||
msgid "%s is invalid"
|
||||
msgstr "%s は不適切です"
|
||||
@@ -565,67 +565,67 @@ msgstr ""
|
||||
msgid "Valid arguments are:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:226
|
||||
#, c-format
|
||||
msgid "%d bitset_allocs, %d freed (%.2f%%).\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:229
|
||||
#, c-format
|
||||
msgid "%d bitset_sets, %d cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:232
|
||||
#, c-format
|
||||
msgid "%d bitset_resets, %d cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:235
|
||||
#, c-format
|
||||
msgid "%d bitset_tests, %d cached (%.2f%%)\n"
|
||||
msgid "%u bitset_allocs, %u freed (%.2f%%).\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:239
|
||||
#: lib/bitset_stats.c:238
|
||||
#, c-format
|
||||
msgid "%d bitset_lists\n"
|
||||
msgid "%u bitset_sets, %u cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:241
|
||||
msgid "count log histogram\n"
|
||||
#, c-format
|
||||
msgid "%u bitset_resets, %u cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:244
|
||||
#, c-format
|
||||
msgid "%u bitset_tests, %u cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:248
|
||||
#, c-format
|
||||
msgid "%u bitset_lists\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:250
|
||||
msgid "count log histogram\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:253
|
||||
msgid "size log histogram\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:247
|
||||
#: lib/bitset_stats.c:256
|
||||
msgid "density histogram\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:264
|
||||
#: lib/bitset_stats.c:272
|
||||
msgid ""
|
||||
"Bitset statistics:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:267
|
||||
#: lib/bitset_stats.c:275
|
||||
#, c-format
|
||||
msgid "Accumulated runs = %d\n"
|
||||
msgid "Accumulated runs = %u\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:311
|
||||
#: lib/bitset_stats.c:320
|
||||
msgid "Could not read stats file."
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:313
|
||||
#: lib/bitset_stats.c:322
|
||||
msgid "Bad stats file size.\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:339
|
||||
#: lib/bitset_stats.c:348
|
||||
msgid "Could not write stats file."
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:343
|
||||
#: lib/bitset_stats.c:352
|
||||
msgid "Could not open stats file for writing."
|
||||
msgstr ""
|
||||
|
||||
@@ -696,17 +696,17 @@ msgstr "`"
|
||||
msgid "'"
|
||||
msgstr "'"
|
||||
|
||||
#: lib/timevar.c:466
|
||||
#: lib/timevar.c:476
|
||||
msgid ""
|
||||
"\n"
|
||||
"Execution times (seconds)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/timevar.c:516
|
||||
#: lib/timevar.c:526
|
||||
msgid " TOTAL :"
|
||||
msgstr ""
|
||||
|
||||
#: lib/timevar.c:552
|
||||
#: lib/timevar.c:562
|
||||
#, c-format
|
||||
msgid "time in %s: %ld.%06ld (%ld%%)\n"
|
||||
msgstr ""
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bison 1.34a\n"
|
||||
"POT-Creation-Date: 2002-09-27 16:50+0200\n"
|
||||
"POT-Creation-Date: 2002-10-14 14:47+0200\n"
|
||||
"PO-Revision-Date: 2002-03-20 12:54+0100\n"
|
||||
"Last-Translator: Tim Van Holder <[email protected]>\n"
|
||||
"Language-Team: Dutch <[email protected]>\n"
|
||||
@@ -293,24 +293,24 @@ msgstr ""
|
||||
msgid "state %d"
|
||||
msgstr "staat %d"
|
||||
|
||||
#: src/print.c:453
|
||||
#: src/print.c:456
|
||||
msgid "Terminals, with rules where they appear"
|
||||
msgstr "Eindsymbolen, met de regels waarin ze voorkomen"
|
||||
|
||||
# Betere vertaling voor non-terminals? 'tussensymbolen'?
|
||||
#: src/print.c:480
|
||||
#: src/print.c:483
|
||||
msgid "Nonterminals, with rules where they appear"
|
||||
msgstr "Niet-eindsymbolen, met de regels waarin ze voorkomen"
|
||||
|
||||
#: src/print.c:509
|
||||
#: src/print.c:512
|
||||
msgid " on left:"
|
||||
msgstr " links:"
|
||||
|
||||
#: src/print.c:524
|
||||
#: src/print.c:527
|
||||
msgid " on right:"
|
||||
msgstr " rechts:"
|
||||
|
||||
#: src/print.c:552
|
||||
#: src/print.c:555
|
||||
#, fuzzy
|
||||
msgid "Rules never reduced"
|
||||
msgstr "%d regel wordt nooit gereduceerd\n"
|
||||
@@ -330,49 +330,49 @@ msgstr ""
|
||||
msgid "rule given for %s, which is a token"
|
||||
msgstr "regel opgegeven voor token (%s)"
|
||||
|
||||
#: src/reader.c:264
|
||||
#: src/reader.c:268
|
||||
#, c-format
|
||||
msgid "type clash (`%s' `%s') on default action"
|
||||
msgstr "type-conflict (`%s' `%s') bij standaardaktie"
|
||||
|
||||
#: src/reader.c:272
|
||||
#: src/reader.c:274
|
||||
msgid "empty rule for typed nonterminal, and no action"
|
||||
msgstr "lege regel voor niet-eindsymbool met type, en geen actie"
|
||||
|
||||
#: src/reader.c:343
|
||||
#: src/reader.c:344
|
||||
msgid "two @prec's in a row"
|
||||
msgstr "twee @prec's na elkaar"
|
||||
|
||||
#: src/reader.c:353
|
||||
#: src/reader.c:354
|
||||
#, c-format
|
||||
msgid "%%dprec affects only GLR parsers"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:355
|
||||
#: src/reader.c:356
|
||||
#, c-format
|
||||
msgid "%%dprec must be followed by positive number"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:357
|
||||
#: src/reader.c:358
|
||||
#, c-format
|
||||
msgid "only one %%dprec allowed per rule"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:368
|
||||
#: src/reader.c:369
|
||||
#, c-format
|
||||
msgid "%%merge affects only GLR parsers"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:370
|
||||
#: src/reader.c:371
|
||||
#, c-format
|
||||
msgid "only one %%merge allowed per rule"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:513
|
||||
#: src/reader.c:514
|
||||
msgid "no rules in the input grammar"
|
||||
msgstr "invoergrammatica bevat geen regels"
|
||||
|
||||
#: src/reader.c:545
|
||||
#: src/reader.c:546
|
||||
#, c-format
|
||||
msgid "too many symbols (tokens plus nonterminals); maximum %d"
|
||||
msgstr "teveel symbolen (tokens plus niet-eindsymbolen); het maximum is %d"
|
||||
@@ -433,62 +433,62 @@ msgstr[1] "%d nutteloze regels"
|
||||
msgid "start symbol %s does not derive any sentence"
|
||||
msgstr "Startsymbool %s wordt vanuit geen enkele zin bereikt"
|
||||
|
||||
#: scan-gram.l:202
|
||||
#: scan-gram.l:211
|
||||
#, c-format
|
||||
msgid ": invalid character: `%c'\n"
|
||||
msgstr ""
|
||||
|
||||
#: scan-gram.l:246
|
||||
#: scan-gram.l:255
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a comment\n"
|
||||
msgstr "onverwacht einde van bestand"
|
||||
|
||||
#: scan-gram.l:274 scan-gram.l:412
|
||||
#: scan-gram.l:284 scan-gram.l:423
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a string\n"
|
||||
msgstr "onverwacht einde van bestand"
|
||||
|
||||
#: scan-gram.l:311 scan-gram.l:383
|
||||
#: scan-gram.l:322 scan-gram.l:394
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a character\n"
|
||||
msgstr "onverwacht einde van bestand"
|
||||
|
||||
#: scan-gram.l:332
|
||||
#: scan-gram.l:343
|
||||
#, fuzzy, c-format
|
||||
msgid ": invalid escape: %s\n"
|
||||
msgstr "ongeldige invoer: %s"
|
||||
|
||||
#: scan-gram.l:353
|
||||
#: scan-gram.l:364
|
||||
#, fuzzy, c-format
|
||||
msgid ": unrecognized escape: %s\n"
|
||||
msgstr "onbekend: %s"
|
||||
|
||||
#: scan-gram.l:473
|
||||
#: scan-gram.l:485
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a braced code\n"
|
||||
msgstr "onverwacht einde van bestand"
|
||||
|
||||
#: scan-gram.l:502
|
||||
#: scan-gram.l:514
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a prologue\n"
|
||||
msgstr "onverwacht einde van bestand"
|
||||
|
||||
#: scan-gram.l:560
|
||||
#: scan-gram.l:572
|
||||
#, c-format
|
||||
msgid "$$ of `%s' has no declared type"
|
||||
msgstr "$$ van `%s' heeft geen gedeclareerd type"
|
||||
|
||||
#: scan-gram.l:577 scan-gram.l:664
|
||||
#: scan-gram.l:584 scan-gram.l:666
|
||||
#, fuzzy, c-format
|
||||
msgid "invalid value: %s%d"
|
||||
msgstr "ongeldige @-waarde"
|
||||
|
||||
#: scan-gram.l:584
|
||||
#: scan-gram.l:591
|
||||
#, c-format
|
||||
msgid "$%d of `%s' has no declared type"
|
||||
msgstr "$%d van `%s' heeft geen gedeclareerd type"
|
||||
|
||||
#: scan-gram.l:595 scan-gram.l:612 scan-gram.l:671 scan-gram.l:688
|
||||
#: scan-gram.l:602 scan-gram.l:619 scan-gram.l:673 scan-gram.l:690
|
||||
#, c-format
|
||||
msgid "%s is invalid"
|
||||
msgstr "%s is ongeldig"
|
||||
@@ -583,67 +583,67 @@ msgstr ""
|
||||
msgid "Valid arguments are:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:226
|
||||
#, c-format
|
||||
msgid "%d bitset_allocs, %d freed (%.2f%%).\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:229
|
||||
#, c-format
|
||||
msgid "%d bitset_sets, %d cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:232
|
||||
#, c-format
|
||||
msgid "%d bitset_resets, %d cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:235
|
||||
#, c-format
|
||||
msgid "%d bitset_tests, %d cached (%.2f%%)\n"
|
||||
msgid "%u bitset_allocs, %u freed (%.2f%%).\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:239
|
||||
#: lib/bitset_stats.c:238
|
||||
#, c-format
|
||||
msgid "%d bitset_lists\n"
|
||||
msgid "%u bitset_sets, %u cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:241
|
||||
msgid "count log histogram\n"
|
||||
#, c-format
|
||||
msgid "%u bitset_resets, %u cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:244
|
||||
#, c-format
|
||||
msgid "%u bitset_tests, %u cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:248
|
||||
#, c-format
|
||||
msgid "%u bitset_lists\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:250
|
||||
msgid "count log histogram\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:253
|
||||
msgid "size log histogram\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:247
|
||||
#: lib/bitset_stats.c:256
|
||||
msgid "density histogram\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:264
|
||||
#: lib/bitset_stats.c:272
|
||||
msgid ""
|
||||
"Bitset statistics:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:267
|
||||
#: lib/bitset_stats.c:275
|
||||
#, c-format
|
||||
msgid "Accumulated runs = %d\n"
|
||||
msgid "Accumulated runs = %u\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:311
|
||||
#: lib/bitset_stats.c:320
|
||||
msgid "Could not read stats file."
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:313
|
||||
#: lib/bitset_stats.c:322
|
||||
msgid "Bad stats file size.\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:339
|
||||
#: lib/bitset_stats.c:348
|
||||
msgid "Could not write stats file."
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:343
|
||||
#: lib/bitset_stats.c:352
|
||||
msgid "Could not open stats file for writing."
|
||||
msgstr ""
|
||||
|
||||
@@ -714,17 +714,17 @@ msgstr "`"
|
||||
msgid "'"
|
||||
msgstr "'"
|
||||
|
||||
#: lib/timevar.c:466
|
||||
#: lib/timevar.c:476
|
||||
msgid ""
|
||||
"\n"
|
||||
"Execution times (seconds)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/timevar.c:516
|
||||
#: lib/timevar.c:526
|
||||
msgid " TOTAL :"
|
||||
msgstr ""
|
||||
|
||||
#: lib/timevar.c:552
|
||||
#: lib/timevar.c:562
|
||||
#, c-format
|
||||
msgid "time in %s: %ld.%06ld (%ld%%)\n"
|
||||
msgstr ""
|
||||
|
||||
+63
-161
@@ -4,9 +4,9 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bison 1.49b\n"
|
||||
"POT-Creation-Date: 2002-09-27 16:50+0200\n"
|
||||
"PO-Revision-Date: 2002-08-28 00:20-0300\n"
|
||||
"Project-Id-Version: bison 1.50\n"
|
||||
"POT-Creation-Date: 2002-10-14 14:47+0200\n"
|
||||
"PO-Revision-Date: 2002-10-07 00:30-0300\n"
|
||||
"Last-Translator: Alexandre Folle de Menezes <[email protected]>\n"
|
||||
"Language-Team: Brazilian Portuguese <[email protected]>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -288,23 +288,23 @@ msgstr "$padr
|
||||
msgid "state %d"
|
||||
msgstr "estado %d"
|
||||
|
||||
#: src/print.c:453
|
||||
#: src/print.c:456
|
||||
msgid "Terminals, with rules where they appear"
|
||||
msgstr "Terminais, com as regras onde eles aparecem"
|
||||
|
||||
#: src/print.c:480
|
||||
#: src/print.c:483
|
||||
msgid "Nonterminals, with rules where they appear"
|
||||
msgstr "Não-terminais com as regras onde eles aparecem"
|
||||
|
||||
#: src/print.c:509
|
||||
#: src/print.c:512
|
||||
msgid " on left:"
|
||||
msgstr " à esquerda:"
|
||||
|
||||
#: src/print.c:524
|
||||
#: src/print.c:527
|
||||
msgid " on right:"
|
||||
msgstr " à direita:"
|
||||
|
||||
#: src/print.c:552
|
||||
#: src/print.c:555
|
||||
msgid "Rules never reduced"
|
||||
msgstr "Regras nunca reduzidas"
|
||||
|
||||
@@ -323,49 +323,49 @@ msgstr "tipo de resultado conflita na fu
|
||||
msgid "rule given for %s, which is a token"
|
||||
msgstr "regra fornecida para %s, que é um token"
|
||||
|
||||
#: src/reader.c:264
|
||||
#: src/reader.c:268
|
||||
#, c-format
|
||||
msgid "type clash (`%s' `%s') on default action"
|
||||
msgstr "os tipos (`%s' `%s') não concordam na ação padrão"
|
||||
|
||||
#: src/reader.c:272
|
||||
#: src/reader.c:274
|
||||
msgid "empty rule for typed nonterminal, and no action"
|
||||
msgstr "regra vazia para um não-terminal com tipo, e não há ações"
|
||||
|
||||
#: src/reader.c:343
|
||||
#: src/reader.c:344
|
||||
msgid "two @prec's in a row"
|
||||
msgstr "dois @prec em uma linha"
|
||||
|
||||
#: src/reader.c:353
|
||||
#: src/reader.c:354
|
||||
#, c-format
|
||||
msgid "%%dprec affects only GLR parsers"
|
||||
msgstr "%%dprec afeta apenas analisadores GLR"
|
||||
|
||||
#: src/reader.c:355
|
||||
#: src/reader.c:356
|
||||
#, c-format
|
||||
msgid "%%dprec must be followed by positive number"
|
||||
msgstr "%%dprec deve ser seguido por um número positivo"
|
||||
|
||||
#: src/reader.c:357
|
||||
#: src/reader.c:358
|
||||
#, c-format
|
||||
msgid "only one %%dprec allowed per rule"
|
||||
msgstr "apenas um %%dprec é permitido por regra"
|
||||
|
||||
#: src/reader.c:368
|
||||
#: src/reader.c:369
|
||||
#, c-format
|
||||
msgid "%%merge affects only GLR parsers"
|
||||
msgstr "%%merge afeta apenas analisadores GLR"
|
||||
|
||||
#: src/reader.c:370
|
||||
#: src/reader.c:371
|
||||
#, c-format
|
||||
msgid "only one %%merge allowed per rule"
|
||||
msgstr "apenas um %%merge é permitido por regra"
|
||||
|
||||
#: src/reader.c:513
|
||||
#: src/reader.c:514
|
||||
msgid "no rules in the input grammar"
|
||||
msgstr "não há regras na gramática de entrada"
|
||||
|
||||
#: src/reader.c:545
|
||||
#: src/reader.c:546
|
||||
#, c-format
|
||||
msgid "too many symbols (tokens plus nonterminals); maximum %d"
|
||||
msgstr "muitos símbolos (terminais e não-terminais); máximo %d"
|
||||
@@ -420,57 +420,57 @@ msgstr[1] "%d regras in
|
||||
msgid "start symbol %s does not derive any sentence"
|
||||
msgstr "símbolo de início %s não deriva nenhuma sentença"
|
||||
|
||||
#: scan-gram.l:202
|
||||
#: scan-gram.l:211
|
||||
#, c-format
|
||||
msgid ": invalid character: `%c'\n"
|
||||
msgstr ": caractere inválido: `%c'\n"
|
||||
|
||||
#: scan-gram.l:246
|
||||
#: scan-gram.l:255
|
||||
msgid ": unexpected end of file in a comment\n"
|
||||
msgstr ": fim de arquivo inesperado em um comentário\n"
|
||||
|
||||
#: scan-gram.l:274 scan-gram.l:412
|
||||
#: scan-gram.l:284 scan-gram.l:423
|
||||
msgid ": unexpected end of file in a string\n"
|
||||
msgstr ": fim de arquivo inesperado em uma string\n"
|
||||
|
||||
#: scan-gram.l:311 scan-gram.l:383
|
||||
#: scan-gram.l:322 scan-gram.l:394
|
||||
msgid ": unexpected end of file in a character\n"
|
||||
msgstr ": fim de arquivo inesperado em um caractere\n"
|
||||
|
||||
#: scan-gram.l:332
|
||||
#: scan-gram.l:343
|
||||
#, c-format
|
||||
msgid ": invalid escape: %s\n"
|
||||
msgstr ": escape inválido: %s\n"
|
||||
|
||||
#: scan-gram.l:353
|
||||
#: scan-gram.l:364
|
||||
#, c-format
|
||||
msgid ": unrecognized escape: %s\n"
|
||||
msgstr ": escape não reconhecido: %s\n"
|
||||
|
||||
#: scan-gram.l:473
|
||||
#: scan-gram.l:485
|
||||
msgid ": unexpected end of file in a braced code\n"
|
||||
msgstr ": fim de arquivo inesperado em código entre chaves\n"
|
||||
|
||||
#: scan-gram.l:502
|
||||
#: scan-gram.l:514
|
||||
msgid ": unexpected end of file in a prologue\n"
|
||||
msgstr ": fim de arquivo inesperado em um prólogo\n"
|
||||
|
||||
#: scan-gram.l:560
|
||||
#: scan-gram.l:572
|
||||
#, c-format
|
||||
msgid "$$ of `%s' has no declared type"
|
||||
msgstr "$$ de `%s' não tem tipo declarado"
|
||||
|
||||
#: scan-gram.l:577 scan-gram.l:664
|
||||
#: scan-gram.l:584 scan-gram.l:666
|
||||
#, c-format
|
||||
msgid "invalid value: %s%d"
|
||||
msgstr "valor inválido: %s%d"
|
||||
|
||||
#: scan-gram.l:584
|
||||
#: scan-gram.l:591
|
||||
#, c-format
|
||||
msgid "$%d of `%s' has no declared type"
|
||||
msgstr "$%d de `%s' não tem tipo declarado"
|
||||
|
||||
#: scan-gram.l:595 scan-gram.l:612 scan-gram.l:671 scan-gram.l:688
|
||||
#: scan-gram.l:602 scan-gram.l:619 scan-gram.l:673 scan-gram.l:690
|
||||
#, c-format
|
||||
msgid "%s is invalid"
|
||||
msgstr "%s é inválido"
|
||||
@@ -563,44 +563,44 @@ msgstr "argumento %s amb
|
||||
msgid "Valid arguments are:"
|
||||
msgstr "Argumentos válidos são:"
|
||||
|
||||
#: lib/bitset_stats.c:226
|
||||
#, c-format
|
||||
msgid "%d bitset_allocs, %d freed (%.2f%%).\n"
|
||||
msgstr "%d bitset_allocs, %d liberados (%.2f%%).\n"
|
||||
|
||||
#: lib/bitset_stats.c:229
|
||||
#, c-format
|
||||
msgid "%d bitset_sets, %d cached (%.2f%%)\n"
|
||||
msgstr "%d bitset_sets, %d em cache (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:232
|
||||
#, c-format
|
||||
msgid "%d bitset_resets, %d cached (%.2f%%)\n"
|
||||
msgstr "%d bitset_resets, %d em cache (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:235
|
||||
#, c-format
|
||||
msgid "%d bitset_tests, %d cached (%.2f%%)\n"
|
||||
msgstr "%d bitset_tests, %d em cache (%.2f%%)\n"
|
||||
msgid "%u bitset_allocs, %u freed (%.2f%%).\n"
|
||||
msgstr "%u bitset_allocs, %u liberados (%.2f%%).\n"
|
||||
|
||||
#: lib/bitset_stats.c:239
|
||||
#: lib/bitset_stats.c:238
|
||||
#, c-format
|
||||
msgid "%d bitset_lists\n"
|
||||
msgstr "%d bitset_lists\n"
|
||||
msgid "%u bitset_sets, %u cached (%.2f%%)\n"
|
||||
msgstr "%u bitset_sets, %u em cache (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:241
|
||||
#, c-format
|
||||
msgid "%u bitset_resets, %u cached (%.2f%%)\n"
|
||||
msgstr "%u bitset_resets, %u em cache (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:244
|
||||
#, c-format
|
||||
msgid "%u bitset_tests, %u cached (%.2f%%)\n"
|
||||
msgstr "%u bitset_tests, %u em cache (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:248
|
||||
#, c-format
|
||||
msgid "%u bitset_lists\n"
|
||||
msgstr "%u bitset_lists\n"
|
||||
|
||||
#: lib/bitset_stats.c:250
|
||||
msgid "count log histogram\n"
|
||||
msgstr "histograma de log de contagens\n"
|
||||
|
||||
#: lib/bitset_stats.c:244
|
||||
#: lib/bitset_stats.c:253
|
||||
msgid "size log histogram\n"
|
||||
msgstr "histograma de log de tamanhos\n"
|
||||
|
||||
#: lib/bitset_stats.c:247
|
||||
#: lib/bitset_stats.c:256
|
||||
msgid "density histogram\n"
|
||||
msgstr "histograma de densidades\n"
|
||||
|
||||
#: lib/bitset_stats.c:264
|
||||
#: lib/bitset_stats.c:272
|
||||
msgid ""
|
||||
"Bitset statistics:\n"
|
||||
"\n"
|
||||
@@ -608,24 +608,24 @@ msgstr ""
|
||||
"Estatísticas de bitset:\n"
|
||||
"\n"
|
||||
|
||||
#: lib/bitset_stats.c:267
|
||||
#: lib/bitset_stats.c:275
|
||||
#, c-format
|
||||
msgid "Accumulated runs = %d\n"
|
||||
msgstr "Execuções acumuladas = %d\n"
|
||||
msgid "Accumulated runs = %u\n"
|
||||
msgstr "Execuções acumuladas = %u\n"
|
||||
|
||||
#: lib/bitset_stats.c:311
|
||||
#: lib/bitset_stats.c:320
|
||||
msgid "Could not read stats file."
|
||||
msgstr "Impossível ler o arquivo de estatísticas."
|
||||
|
||||
#: lib/bitset_stats.c:313
|
||||
#: lib/bitset_stats.c:322
|
||||
msgid "Bad stats file size.\n"
|
||||
msgstr "Tamanho do arquivo de estatísticas com erro.\n"
|
||||
|
||||
#: lib/bitset_stats.c:339
|
||||
#: lib/bitset_stats.c:348
|
||||
msgid "Could not write stats file."
|
||||
msgstr "Impossível de escrever no arquivo de estatísticas."
|
||||
|
||||
#: lib/bitset_stats.c:343
|
||||
#: lib/bitset_stats.c:352
|
||||
msgid "Could not open stats file for writing."
|
||||
msgstr "Impossível abrir arquivo de estatísticas para escrita."
|
||||
|
||||
@@ -696,7 +696,7 @@ msgstr "`"
|
||||
msgid "'"
|
||||
msgstr "'"
|
||||
|
||||
#: lib/timevar.c:466
|
||||
#: lib/timevar.c:476
|
||||
msgid ""
|
||||
"\n"
|
||||
"Execution times (seconds)\n"
|
||||
@@ -704,109 +704,11 @@ msgstr ""
|
||||
"\n"
|
||||
"Tempos de execução (segundos)\n"
|
||||
|
||||
#: lib/timevar.c:516
|
||||
#: lib/timevar.c:526
|
||||
msgid " TOTAL :"
|
||||
msgstr " TOTAL :"
|
||||
|
||||
#: lib/timevar.c:552
|
||||
#: lib/timevar.c:562
|
||||
#, c-format
|
||||
msgid "time in %s: %ld.%06ld (%ld%%)\n"
|
||||
msgstr "tempo em %s: %ld.%06ld (%ld%%)\n"
|
||||
|
||||
#~ msgid "state_list_append (state = %d, symbol = %d (%s))\n"
|
||||
#~ msgstr "state_list_append (estado = %d, símbolo = %d (%s))\n"
|
||||
|
||||
#~ msgid "Entering new_itemsets, state = %d\n"
|
||||
#~ msgstr "Entrando new_itemsets, estado = %d\n"
|
||||
|
||||
#~ msgid "Entering get_state, symbol = %d (%s)\n"
|
||||
#~ msgstr "Entrando get_state, símbolo = %d (%s)\n"
|
||||
|
||||
#~ msgid "Exiting get_state => %d\n"
|
||||
#~ msgstr "Saindo get_state => %d\n"
|
||||
|
||||
#~ msgid "Entering append_states, state = %d\n"
|
||||
#~ msgstr "Entrando append_states, estado = %d\n"
|
||||
|
||||
#~ msgid "Processing state %d (reached by %s)\n"
|
||||
#~ msgstr "Processando estado %d (alcançado por %s)\n"
|
||||
|
||||
#~ msgid "undefined associativity"
|
||||
#~ msgstr "associatividade indefinida"
|
||||
|
||||
#~ msgid "Closure: %s\n"
|
||||
#~ msgstr "Fechamento: %s\n"
|
||||
|
||||
#~ msgid " (rule %d)\n"
|
||||
#~ msgstr " (regra %d)\n"
|
||||
|
||||
#~ msgid "RTC: Firsts Input"
|
||||
#~ msgstr "RTC: Entradas Antes"
|
||||
|
||||
#~ msgid "RTC: Firsts Output"
|
||||
#~ msgstr "RTC: Saídas Antes"
|
||||
|
||||
#~ msgid "input"
|
||||
#~ msgstr "entrada"
|
||||
|
||||
#~ msgid "output"
|
||||
#~ msgstr "saída"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Variables\n"
|
||||
#~ "---------\n"
|
||||
#~ "\n"
|
||||
#~ msgstr ""
|
||||
#~ "Variáveis\n"
|
||||
#~ "---------\n"
|
||||
#~ "\n"
|
||||
|
||||
#~ msgid "Value Sprec Sassoc Tag\n"
|
||||
#~ msgstr "Valor Sprec Sassoc Tag\n"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Rules\n"
|
||||
#~ "-----\n"
|
||||
#~ "\n"
|
||||
#~ msgstr ""
|
||||
#~ "Regras\n"
|
||||
#~ "------\n"
|
||||
#~ "\n"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Num (Prec, Assoc, Useful, Ritem Range) Lhs -> Rhs (Ritem range) [Num]\n"
|
||||
#~ msgstr ""
|
||||
#~ "Num (Prec, Assoc, Util, Faixa Ritem) Lhs -> Rhs (Faixa Ritem) [Num]\n"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Rules interpreted\n"
|
||||
#~ "-----------------\n"
|
||||
#~ "\n"
|
||||
#~ msgstr ""
|
||||
#~ "Regras interpretadas\n"
|
||||
#~ "--------------------\n"
|
||||
#~ "\n"
|
||||
|
||||
#~ msgid "Lookaheads: BEGIN\n"
|
||||
#~ msgstr "Previsões: INICIO\n"
|
||||
|
||||
#~ msgid "State %d: %d lookaheads\n"
|
||||
#~ msgstr "Estado %d: %d previsões\n"
|
||||
|
||||
#~ msgid " on %d (%s) -> rule %d\n"
|
||||
#~ msgstr " em %d (%s) -> regra %d\n"
|
||||
|
||||
#~ msgid "Lookaheads: END\n"
|
||||
#~ msgstr "Previsões: FIM\n"
|
||||
|
||||
#~ msgid "relation_transpose: input\n"
|
||||
#~ msgstr "relation_transpose: entrada\n"
|
||||
|
||||
#~ msgid "relation_transpose: output\n"
|
||||
#~ msgstr "relation_transpose: saída\n"
|
||||
|
||||
#~ msgid "growing table and check from: %lu to %lu\n"
|
||||
#~ msgstr "aumentando a tabela e checando origem: %lu para %lu\n"
|
||||
|
||||
#~ msgid "base_t too small to hold %d\n"
|
||||
#~ msgstr "base_t muito pequeno para guardar %d\n"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bison 1.49a\n"
|
||||
"POT-Creation-Date: 2002-09-27 16:50+0200\n"
|
||||
"POT-Creation-Date: 2002-10-14 14:47+0200\n"
|
||||
"PO-Revision-Date: 2002-07-20 13:23+0400\n"
|
||||
"Last-Translator: Dmitry S. Sivachenko <[email protected]>\n"
|
||||
"Language-Team: Russian <[email protected]>\n"
|
||||
@@ -291,23 +291,23 @@ msgstr ""
|
||||
msgid "state %d"
|
||||
msgstr "ÓÏÓÔÏÑÎÉÅ %d"
|
||||
|
||||
#: src/print.c:453
|
||||
#: src/print.c:456
|
||||
msgid "Terminals, with rules where they appear"
|
||||
msgstr "ôÅÒÍÉÎÁÌØÎÙÅ ÓÉÍ×ÏÌÙ Ó ÐÒÁ×ÉÌÁÍÉ, × ËÏÔÏÒÙÈ ÏÎÉ ÐÏÑ×ÌÑÀÔÓÑ"
|
||||
|
||||
#: src/print.c:480
|
||||
#: src/print.c:483
|
||||
msgid "Nonterminals, with rules where they appear"
|
||||
msgstr "îÅÔÅÒÍÉÎÁÌØÎÙÅ ÓÉÍ×ÏÌÙ Ó ÐÒÁ×ÉÌÁÍÉ, × ËÏÔÏÒÙÈ ÏÎÉ ÐÏÑ×ÌÑÀÔÓÑ"
|
||||
|
||||
#: src/print.c:509
|
||||
#: src/print.c:512
|
||||
msgid " on left:"
|
||||
msgstr " ÎÁÌÅ×Ï:"
|
||||
|
||||
#: src/print.c:524
|
||||
#: src/print.c:527
|
||||
msgid " on right:"
|
||||
msgstr " ÎÁÐÒÁ×Ï:"
|
||||
|
||||
#: src/print.c:552
|
||||
#: src/print.c:555
|
||||
#, fuzzy
|
||||
msgid "Rules never reduced"
|
||||
msgstr "%d ÐÒÁ×ÉÌÏ ÎÅ Ó×ÅÄÅÎÏ\n"
|
||||
@@ -327,50 +327,50 @@ msgstr ""
|
||||
msgid "rule given for %s, which is a token"
|
||||
msgstr "ÐÒÁ×ÉÌÏ ÚÁÄÁÎÏ ÄÌÑ %s, ËÏÔÏÒÙÊ Ñ×ÌÑÅÔÓÑ ÌÅËÓÅÍÏÊ"
|
||||
|
||||
#: src/reader.c:264
|
||||
#: src/reader.c:268
|
||||
#, c-format
|
||||
msgid "type clash (`%s' `%s') on default action"
|
||||
msgstr "ËÏÎÆÌÉËÔ ÔÉÐÏ× (`%s' `%s') ÎÁ ÄÅÊÓÔ×ÉÉ ÐÏ ÕÍÏÌÞÁÎÉÀ"
|
||||
|
||||
#: src/reader.c:272
|
||||
#: src/reader.c:274
|
||||
msgid "empty rule for typed nonterminal, and no action"
|
||||
msgstr ""
|
||||
"ÐÕÓÔÏÅ ÐÒÁ×ÉÌÏ ÄÌÑ ÔÉÐÉÚÉÒÏ×ÁÎÎÏÇÏ ÎÅÔÅÒÍÉÎÁÌØÎÏÇÏ ÓÉÍ×ÏÌÁ, É ÎÅÔ ÄÅÊÓÔ×ÉÑ"
|
||||
|
||||
#: src/reader.c:343
|
||||
#: src/reader.c:344
|
||||
msgid "two @prec's in a row"
|
||||
msgstr "Ä×Á @prec ÐÏÄÒÑÄ"
|
||||
|
||||
#: src/reader.c:353
|
||||
#: src/reader.c:354
|
||||
#, c-format
|
||||
msgid "%%dprec affects only GLR parsers"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:355
|
||||
#: src/reader.c:356
|
||||
#, c-format
|
||||
msgid "%%dprec must be followed by positive number"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:357
|
||||
#: src/reader.c:358
|
||||
#, c-format
|
||||
msgid "only one %%dprec allowed per rule"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:368
|
||||
#: src/reader.c:369
|
||||
#, c-format
|
||||
msgid "%%merge affects only GLR parsers"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:370
|
||||
#: src/reader.c:371
|
||||
#, c-format
|
||||
msgid "only one %%merge allowed per rule"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:513
|
||||
#: src/reader.c:514
|
||||
msgid "no rules in the input grammar"
|
||||
msgstr "ÏÔÓÕÔÓÔ×ÕÀÔ ÐÒÁ×ÉÌÁ ×Ï ×ÈÏÄÎÏÊ ÇÒÁÍÍÁÔÉËÅ"
|
||||
|
||||
#: src/reader.c:545
|
||||
#: src/reader.c:546
|
||||
#, c-format
|
||||
msgid "too many symbols (tokens plus nonterminals); maximum %d"
|
||||
msgstr "ÓÌÉÛËÏÍ ÍÎÏÇÏ ÓÉÍ×ÏÌÏ× (ÌÅËÓÅÍÙ ÐÌÀÓ ÎÅÔÅÒÍÉÎÁÌÙ); ÍÁËÓÉÍÁÌØÎÏ %d"
|
||||
@@ -433,62 +433,62 @@ msgstr[2] "%d
|
||||
msgid "start symbol %s does not derive any sentence"
|
||||
msgstr "îÁÞÁÌØÎÙÊ ÓÉÍ×ÏÌ %s ÎÅ ×Ù×ÏÄÉÔ ÎÉ ÏÄÎÏÇÏ ÐÒÅÄÌÏÖÅÎÉÑ"
|
||||
|
||||
#: scan-gram.l:202
|
||||
#: scan-gram.l:211
|
||||
#, c-format
|
||||
msgid ": invalid character: `%c'\n"
|
||||
msgstr ""
|
||||
|
||||
#: scan-gram.l:246
|
||||
#: scan-gram.l:255
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a comment\n"
|
||||
msgstr "ÎÅÏÖÉÄÁÎÎÙÊ ËÏÎÅÃ ÆÁÊÌÁ"
|
||||
|
||||
#: scan-gram.l:274 scan-gram.l:412
|
||||
#: scan-gram.l:284 scan-gram.l:423
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a string\n"
|
||||
msgstr "ÎÅÏÖÉÄÁÎÎÙÊ ËÏÎÅÃ ÆÁÊÌÁ"
|
||||
|
||||
#: scan-gram.l:311 scan-gram.l:383
|
||||
#: scan-gram.l:322 scan-gram.l:394
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a character\n"
|
||||
msgstr "ÎÅÏÖÉÄÁÎÎÙÊ ËÏÎÅÃ ÆÁÊÌÁ"
|
||||
|
||||
#: scan-gram.l:332
|
||||
#: scan-gram.l:343
|
||||
#, fuzzy, c-format
|
||||
msgid ": invalid escape: %s\n"
|
||||
msgstr "ÎÅ×ÅÒÎÏÅ ÚÎÁÞÅÎÉÅ: %s%d"
|
||||
|
||||
#: scan-gram.l:353
|
||||
#: scan-gram.l:364
|
||||
#, fuzzy, c-format
|
||||
msgid ": unrecognized escape: %s\n"
|
||||
msgstr "ÎÅÒÁÓÐÏÚÎÁÎÏ: %s"
|
||||
|
||||
#: scan-gram.l:473
|
||||
#: scan-gram.l:485
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a braced code\n"
|
||||
msgstr "ÎÅÏÖÉÄÁÎÎÙÊ ËÏÎÅÃ ÆÁÊÌÁ"
|
||||
|
||||
#: scan-gram.l:502
|
||||
#: scan-gram.l:514
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a prologue\n"
|
||||
msgstr "ÎÅÏÖÉÄÁÎÎÙÊ ËÏÎÅÃ ÆÁÊÌÁ"
|
||||
|
||||
#: scan-gram.l:560
|
||||
#: scan-gram.l:572
|
||||
#, c-format
|
||||
msgid "$$ of `%s' has no declared type"
|
||||
msgstr "$$ × `%s' ÎÅ ÉÍÅÅÔ ÏÐÉÓÁÎÎÏÇÏ ÔÉÐÁ"
|
||||
|
||||
#: scan-gram.l:577 scan-gram.l:664
|
||||
#: scan-gram.l:584 scan-gram.l:666
|
||||
#, c-format
|
||||
msgid "invalid value: %s%d"
|
||||
msgstr "ÎÅ×ÅÒÎÏÅ ÚÎÁÞÅÎÉÅ: %s%d"
|
||||
|
||||
#: scan-gram.l:584
|
||||
#: scan-gram.l:591
|
||||
#, c-format
|
||||
msgid "$%d of `%s' has no declared type"
|
||||
msgstr "$%d ÉÚ `%s' ÎÅ ÉÍÅÅÔ ÏÐÉÓÁÎÎÏÇÏ ÔÉÐÁ"
|
||||
|
||||
#: scan-gram.l:595 scan-gram.l:612 scan-gram.l:671 scan-gram.l:688
|
||||
#: scan-gram.l:602 scan-gram.l:619 scan-gram.l:673 scan-gram.l:690
|
||||
#, c-format
|
||||
msgid "%s is invalid"
|
||||
msgstr "ÎÅ×ÅÒÎÙÊ ÚÎÁË %s"
|
||||
@@ -581,67 +581,67 @@ msgstr ""
|
||||
msgid "Valid arguments are:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:226
|
||||
#, c-format
|
||||
msgid "%d bitset_allocs, %d freed (%.2f%%).\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:229
|
||||
#, c-format
|
||||
msgid "%d bitset_sets, %d cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:232
|
||||
#, c-format
|
||||
msgid "%d bitset_resets, %d cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:235
|
||||
#, c-format
|
||||
msgid "%d bitset_tests, %d cached (%.2f%%)\n"
|
||||
msgid "%u bitset_allocs, %u freed (%.2f%%).\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:239
|
||||
#: lib/bitset_stats.c:238
|
||||
#, c-format
|
||||
msgid "%d bitset_lists\n"
|
||||
msgid "%u bitset_sets, %u cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:241
|
||||
msgid "count log histogram\n"
|
||||
#, c-format
|
||||
msgid "%u bitset_resets, %u cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:244
|
||||
#, c-format
|
||||
msgid "%u bitset_tests, %u cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:248
|
||||
#, c-format
|
||||
msgid "%u bitset_lists\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:250
|
||||
msgid "count log histogram\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:253
|
||||
msgid "size log histogram\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:247
|
||||
#: lib/bitset_stats.c:256
|
||||
msgid "density histogram\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:264
|
||||
#: lib/bitset_stats.c:272
|
||||
msgid ""
|
||||
"Bitset statistics:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:267
|
||||
#: lib/bitset_stats.c:275
|
||||
#, c-format
|
||||
msgid "Accumulated runs = %d\n"
|
||||
msgid "Accumulated runs = %u\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:311
|
||||
#: lib/bitset_stats.c:320
|
||||
msgid "Could not read stats file."
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:313
|
||||
#: lib/bitset_stats.c:322
|
||||
msgid "Bad stats file size.\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:339
|
||||
#: lib/bitset_stats.c:348
|
||||
msgid "Could not write stats file."
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:343
|
||||
#: lib/bitset_stats.c:352
|
||||
msgid "Could not open stats file for writing."
|
||||
msgstr ""
|
||||
|
||||
@@ -712,17 +712,17 @@ msgstr "`"
|
||||
msgid "'"
|
||||
msgstr "'"
|
||||
|
||||
#: lib/timevar.c:466
|
||||
#: lib/timevar.c:476
|
||||
msgid ""
|
||||
"\n"
|
||||
"Execution times (seconds)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/timevar.c:516
|
||||
#: lib/timevar.c:526
|
||||
msgid " TOTAL :"
|
||||
msgstr ""
|
||||
|
||||
#: lib/timevar.c:552
|
||||
#: lib/timevar.c:562
|
||||
#, c-format
|
||||
msgid "time in %s: %ld.%06ld (%ld%%)\n"
|
||||
msgstr ""
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bison 1.49b\n"
|
||||
"POT-Creation-Date: 2002-09-27 16:50+0200\n"
|
||||
"PO-Revision-Date: 2002-08-24 21:56+0200\n"
|
||||
"Project-Id-Version: bison 1.50\n"
|
||||
"POT-Creation-Date: 2002-10-14 14:47+0200\n"
|
||||
"PO-Revision-Date: 2002-10-08 19:02+0200\n"
|
||||
"Last-Translator: Göran Uddeborg <[email protected]>\n"
|
||||
"Language-Team: Swedish <[email protected]>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -288,23 +288,23 @@ msgstr "$standard"
|
||||
msgid "state %d"
|
||||
msgstr "tillstånd %d"
|
||||
|
||||
#: src/print.c:453
|
||||
#: src/print.c:456
|
||||
msgid "Terminals, with rules where they appear"
|
||||
msgstr "Terminaler, med regler där de förekommer"
|
||||
|
||||
#: src/print.c:480
|
||||
#: src/print.c:483
|
||||
msgid "Nonterminals, with rules where they appear"
|
||||
msgstr "Icketerminaler, med regler där de förekommer"
|
||||
|
||||
#: src/print.c:509
|
||||
#: src/print.c:512
|
||||
msgid " on left:"
|
||||
msgstr " till vänster:"
|
||||
|
||||
#: src/print.c:524
|
||||
#: src/print.c:527
|
||||
msgid " on right:"
|
||||
msgstr " till höger:"
|
||||
|
||||
#: src/print.c:552
|
||||
#: src/print.c:555
|
||||
msgid "Rules never reduced"
|
||||
msgstr "Aldrig reducerade regler"
|
||||
|
||||
@@ -323,49 +323,49 @@ msgstr "resultattypskonflikt vid sammanslagningsfunktion %s: \"%s\" mot \"%s\""
|
||||
msgid "rule given for %s, which is a token"
|
||||
msgstr "regel given för %s, som är ett element"
|
||||
|
||||
#: src/reader.c:264
|
||||
#: src/reader.c:268
|
||||
#, c-format
|
||||
msgid "type clash (`%s' `%s') on default action"
|
||||
msgstr "typkonflikt (\"%s\" \"%s\") för standardåtgärd"
|
||||
|
||||
#: src/reader.c:272
|
||||
#: src/reader.c:274
|
||||
msgid "empty rule for typed nonterminal, and no action"
|
||||
msgstr "tom regel för typad icketerminal, och ingen åtgärd"
|
||||
|
||||
#: src/reader.c:343
|
||||
#: src/reader.c:344
|
||||
msgid "two @prec's in a row"
|
||||
msgstr "två @prec i rad"
|
||||
|
||||
#: src/reader.c:353
|
||||
#: src/reader.c:354
|
||||
#, c-format
|
||||
msgid "%%dprec affects only GLR parsers"
|
||||
msgstr "%%dprec påverkar endast GLR-parsrar"
|
||||
|
||||
#: src/reader.c:355
|
||||
#: src/reader.c:356
|
||||
#, c-format
|
||||
msgid "%%dprec must be followed by positive number"
|
||||
msgstr "%%dprec måste följas av ett positivt tal"
|
||||
|
||||
#: src/reader.c:357
|
||||
#: src/reader.c:358
|
||||
#, c-format
|
||||
msgid "only one %%dprec allowed per rule"
|
||||
msgstr "endast en %%dprec tillåts per regel"
|
||||
|
||||
#: src/reader.c:368
|
||||
#: src/reader.c:369
|
||||
#, c-format
|
||||
msgid "%%merge affects only GLR parsers"
|
||||
msgstr "%%merge påverkar endast GLR-parsrar"
|
||||
|
||||
#: src/reader.c:370
|
||||
#: src/reader.c:371
|
||||
#, c-format
|
||||
msgid "only one %%merge allowed per rule"
|
||||
msgstr "endast en %%merge tillåts per regel"
|
||||
|
||||
#: src/reader.c:513
|
||||
#: src/reader.c:514
|
||||
msgid "no rules in the input grammar"
|
||||
msgstr "inga regler i ingrammatiken"
|
||||
|
||||
#: src/reader.c:545
|
||||
#: src/reader.c:546
|
||||
#, c-format
|
||||
msgid "too many symbols (tokens plus nonterminals); maximum %d"
|
||||
msgstr "för många symboler (element plus icketerminaler); max %d"
|
||||
@@ -420,57 +420,57 @@ msgstr[1] "%d oanv
|
||||
msgid "start symbol %s does not derive any sentence"
|
||||
msgstr "startsymbolen %s genererar inga meningar"
|
||||
|
||||
#: scan-gram.l:202
|
||||
#: scan-gram.l:211
|
||||
#, c-format
|
||||
msgid ": invalid character: `%c'\n"
|
||||
msgstr ": ogiltigt tecken: \"%c\"\n"
|
||||
|
||||
#: scan-gram.l:246
|
||||
#: scan-gram.l:255
|
||||
msgid ": unexpected end of file in a comment\n"
|
||||
msgstr ": oväntat filslut i en kommentar\n"
|
||||
|
||||
#: scan-gram.l:274 scan-gram.l:412
|
||||
#: scan-gram.l:284 scan-gram.l:423
|
||||
msgid ": unexpected end of file in a string\n"
|
||||
msgstr ": oväntat filslut i en sträng\n"
|
||||
|
||||
#: scan-gram.l:311 scan-gram.l:383
|
||||
#: scan-gram.l:322 scan-gram.l:394
|
||||
msgid ": unexpected end of file in a character\n"
|
||||
msgstr ": oväntat filslut i ett tecken\n"
|
||||
|
||||
#: scan-gram.l:332
|
||||
#: scan-gram.l:343
|
||||
#, c-format
|
||||
msgid ": invalid escape: %s\n"
|
||||
msgstr ": ogiltig specialsekvens: %s\n"
|
||||
|
||||
#: scan-gram.l:353
|
||||
#: scan-gram.l:364
|
||||
#, c-format
|
||||
msgid ": unrecognized escape: %s\n"
|
||||
msgstr ": okänd specialsekvens: %s\n"
|
||||
|
||||
#: scan-gram.l:473
|
||||
#: scan-gram.l:485
|
||||
msgid ": unexpected end of file in a braced code\n"
|
||||
msgstr ": oväntat filslut i kod inom klamrar\n"
|
||||
|
||||
#: scan-gram.l:502
|
||||
#: scan-gram.l:514
|
||||
msgid ": unexpected end of file in a prologue\n"
|
||||
msgstr ": oväntat filslut i en prolog\n"
|
||||
|
||||
#: scan-gram.l:560
|
||||
#: scan-gram.l:572
|
||||
#, c-format
|
||||
msgid "$$ of `%s' has no declared type"
|
||||
msgstr "$$ för \"%s\" har ingen deklarerad typ"
|
||||
|
||||
#: scan-gram.l:577 scan-gram.l:664
|
||||
#: scan-gram.l:584 scan-gram.l:666
|
||||
#, c-format
|
||||
msgid "invalid value: %s%d"
|
||||
msgstr "felaktigt värde: %s%d"
|
||||
|
||||
#: scan-gram.l:584
|
||||
#: scan-gram.l:591
|
||||
#, c-format
|
||||
msgid "$%d of `%s' has no declared type"
|
||||
msgstr "$%d för \"%s\" har ingen deklarerad typ"
|
||||
|
||||
#: scan-gram.l:595 scan-gram.l:612 scan-gram.l:671 scan-gram.l:688
|
||||
#: scan-gram.l:602 scan-gram.l:619 scan-gram.l:673 scan-gram.l:690
|
||||
#, c-format
|
||||
msgid "%s is invalid"
|
||||
msgstr "%s är felaktigt"
|
||||
@@ -565,44 +565,44 @@ msgstr "tvetydigt argument %s till %s"
|
||||
msgid "Valid arguments are:"
|
||||
msgstr "Giltiga argument är:"
|
||||
|
||||
#: lib/bitset_stats.c:226
|
||||
#, c-format
|
||||
msgid "%d bitset_allocs, %d freed (%.2f%%).\n"
|
||||
msgstr "%d bitmängdallokeringar, %d frianden (%.2f%%).\n"
|
||||
|
||||
#: lib/bitset_stats.c:229
|
||||
#, c-format
|
||||
msgid "%d bitset_sets, %d cached (%.2f%%)\n"
|
||||
msgstr "%d bitmängdmängder, %d cachade (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:232
|
||||
#, c-format
|
||||
msgid "%d bitset_resets, %d cached (%.2f%%)\n"
|
||||
msgstr "%d bitmängdåterställanden, %d cachade (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:235
|
||||
#, c-format
|
||||
msgid "%d bitset_tests, %d cached (%.2f%%)\n"
|
||||
msgstr "%d bitmängdtester, %d cachade (%.2f%%)\n"
|
||||
msgid "%u bitset_allocs, %u freed (%.2f%%).\n"
|
||||
msgstr "%u bitmängdallokeringar, %u frianden (%.2f%%).\n"
|
||||
|
||||
#: lib/bitset_stats.c:239
|
||||
#: lib/bitset_stats.c:238
|
||||
#, c-format
|
||||
msgid "%d bitset_lists\n"
|
||||
msgstr "%d bitmängdlistor\n"
|
||||
msgid "%u bitset_sets, %u cached (%.2f%%)\n"
|
||||
msgstr "%u bitmängdmängder, %u cachade (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:241
|
||||
#, c-format
|
||||
msgid "%u bitset_resets, %u cached (%.2f%%)\n"
|
||||
msgstr "%u bitmängdåterställanden, %u cachade (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:244
|
||||
#, c-format
|
||||
msgid "%u bitset_tests, %u cached (%.2f%%)\n"
|
||||
msgstr "%u bitmängdtester, %u cachade (%.2f%%)\n"
|
||||
|
||||
#: lib/bitset_stats.c:248
|
||||
#, c-format
|
||||
msgid "%u bitset_lists\n"
|
||||
msgstr "%u bitmängdlistor\n"
|
||||
|
||||
#: lib/bitset_stats.c:250
|
||||
msgid "count log histogram\n"
|
||||
msgstr "anropslogghistogram\n"
|
||||
|
||||
#: lib/bitset_stats.c:244
|
||||
#: lib/bitset_stats.c:253
|
||||
msgid "size log histogram\n"
|
||||
msgstr "storlekslogghistogram\n"
|
||||
|
||||
#: lib/bitset_stats.c:247
|
||||
#: lib/bitset_stats.c:256
|
||||
msgid "density histogram\n"
|
||||
msgstr "densitetshistogram\n"
|
||||
|
||||
#: lib/bitset_stats.c:264
|
||||
#: lib/bitset_stats.c:272
|
||||
msgid ""
|
||||
"Bitset statistics:\n"
|
||||
"\n"
|
||||
@@ -610,24 +610,24 @@ msgstr ""
|
||||
"Bitmängdsstatistik:\n"
|
||||
"\n"
|
||||
|
||||
#: lib/bitset_stats.c:267
|
||||
#: lib/bitset_stats.c:275
|
||||
#, c-format
|
||||
msgid "Accumulated runs = %d\n"
|
||||
msgstr "Accumulerade körningar = %d\n"
|
||||
msgid "Accumulated runs = %u\n"
|
||||
msgstr "Accumulerade körningar = %u\n"
|
||||
|
||||
#: lib/bitset_stats.c:311
|
||||
#: lib/bitset_stats.c:320
|
||||
msgid "Could not read stats file."
|
||||
msgstr "Kunde inte läsa statistikfil."
|
||||
|
||||
#: lib/bitset_stats.c:313
|
||||
#: lib/bitset_stats.c:322
|
||||
msgid "Bad stats file size.\n"
|
||||
msgstr "Dålig statistikfilstorlek.\n"
|
||||
|
||||
#: lib/bitset_stats.c:339
|
||||
#: lib/bitset_stats.c:348
|
||||
msgid "Could not write stats file."
|
||||
msgstr "Kunde inte skriva statistikfil."
|
||||
|
||||
#: lib/bitset_stats.c:343
|
||||
#: lib/bitset_stats.c:352
|
||||
msgid "Could not open stats file for writing."
|
||||
msgstr "Kunde inte öppna statistikfil för skrivning."
|
||||
|
||||
@@ -701,7 +701,7 @@ msgstr "\""
|
||||
msgid "'"
|
||||
msgstr "\""
|
||||
|
||||
#: lib/timevar.c:466
|
||||
#: lib/timevar.c:476
|
||||
msgid ""
|
||||
"\n"
|
||||
"Execution times (seconds)\n"
|
||||
@@ -709,114 +709,31 @@ msgstr ""
|
||||
"\n"
|
||||
"Exekveringstider (sekunder)\n"
|
||||
|
||||
#: lib/timevar.c:516
|
||||
#: lib/timevar.c:526
|
||||
msgid " TOTAL :"
|
||||
msgstr " TOTALT :"
|
||||
|
||||
#: lib/timevar.c:552
|
||||
#: lib/timevar.c:562
|
||||
#, c-format
|
||||
msgid "time in %s: %ld.%06ld (%ld%%)\n"
|
||||
msgstr "tid i %s: %ld.%06ld (%ld%%)\n"
|
||||
|
||||
#~ msgid "state_list_append (state = %d, symbol = %d (%s))\n"
|
||||
#~ msgstr "state_list_append (tillstånd = %d, symbol = %d (%s))\n"
|
||||
|
||||
#~ msgid "Entering new_itemsets, state = %d\n"
|
||||
#~ msgstr "Går in i new_itemsets, tillstånd = %d\n"
|
||||
|
||||
#~ msgid "Entering get_state, symbol = %d (%s)\n"
|
||||
#~ msgstr "Går in i get_state, symbol = %d (%s)\n"
|
||||
|
||||
#~ msgid "Exiting get_state => %d\n"
|
||||
#~ msgstr "Lämnar get_state => %d\n"
|
||||
|
||||
#~ msgid "Entering append_states, state = %d\n"
|
||||
#~ msgstr "Går in i append_states, tillstånd = %d\n"
|
||||
|
||||
#~ msgid "Processing state %d (reached by %s)\n"
|
||||
#~ msgstr "Bearbetar tillstånd %d (nått av %s)\n"
|
||||
|
||||
#~ msgid "undefined associativity"
|
||||
#~ msgstr "odefinierad associativitet"
|
||||
|
||||
#~ msgid "Closure: %s\n"
|
||||
#~ msgstr "Hölje: %s\n"
|
||||
|
||||
#~ msgid " (rule %d)\n"
|
||||
#~ msgstr " (regel %d)\n"
|
||||
|
||||
# RTC betyder "reflexive transitive closure"
|
||||
# Firsts är ett variabelnamn
|
||||
#~ msgid "RTC: Firsts Input"
|
||||
#~ msgstr "RTH: Firsts-indata"
|
||||
|
||||
#~ msgid "RTC: Firsts Output"
|
||||
#~ msgstr "RTH: Firsts-utdata"
|
||||
|
||||
#~ msgid "input"
|
||||
#~ msgstr "indata"
|
||||
|
||||
#~ msgid "output"
|
||||
#~ msgstr "utdata"
|
||||
|
||||
#~ 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 ""
|
||||
#~ "Num (Prec, Assoc, Useful, Ritem Range) Lhs -> Rhs (Ritem range) [Num]\n"
|
||||
#~ msgstr ""
|
||||
#~ "Num (Prec, Assoc, Användbar, Robjektintervall) Vhs -> Hhs "
|
||||
#~ "(Hobjektintervall) [Num]\n"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Rules interpreted\n"
|
||||
#~ "-----------------\n"
|
||||
#~ "\n"
|
||||
#~ msgstr ""
|
||||
#~ "Tolkade regler\n"
|
||||
#~ "--------------\n"
|
||||
#~ "\n"
|
||||
|
||||
#~ msgid "Lookaheads: BEGIN\n"
|
||||
#~ msgstr "Framåtblickar: START\n"
|
||||
|
||||
#~ msgid "State %d: %d lookaheads\n"
|
||||
#~ msgstr "Tillstånd %d: %d framåtblickar\n"
|
||||
|
||||
#~ msgid " on %d (%s) -> rule %d\n"
|
||||
#~ msgstr " vid %d (%s) -> regel %d\n"
|
||||
|
||||
#~ msgid "Lookaheads: END\n"
|
||||
#~ msgstr "Framåtblickar: SLUT\n"
|
||||
|
||||
#~ msgid "relation_transpose: input\n"
|
||||
#~ msgstr "relation_transpose: indata\n"
|
||||
|
||||
#~ msgid "relation_transpose: output\n"
|
||||
#~ msgstr "relation_transpose: utdata\n"
|
||||
|
||||
# "table" och "check" är variabelnamn, som bör vara bekanta för den som
|
||||
# begär denna spårutskrift.
|
||||
#~ msgid "growing table and check from: %lu to %lu\n"
|
||||
#~ msgstr "utökar table och check från: %lu till %lu\n"
|
||||
|
||||
#~ msgid "base_t too small to hold %d\n"
|
||||
#~ msgstr "base_t för liten för att hålla %d\n"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bison 1.49a\n"
|
||||
"POT-Creation-Date: 2002-09-27 16:50+0200\n"
|
||||
"POT-Creation-Date: 2002-10-14 14:47+0200\n"
|
||||
"PO-Revision-Date: 2002-06-25 11:03GMT +02:00\n"
|
||||
"Last-Translator: Altuð Bayram <[email protected]>\n"
|
||||
"Language-Team: Turkish <[email protected]>\n"
|
||||
@@ -290,23 +290,23 @@ msgstr ""
|
||||
msgid "state %d"
|
||||
msgstr "durum %d"
|
||||
|
||||
#: src/print.c:453
|
||||
#: src/print.c:456
|
||||
msgid "Terminals, with rules where they appear"
|
||||
msgstr "Sabit simgeler, kurallarýnýn bulunduklarý yerde"
|
||||
|
||||
#: src/print.c:480
|
||||
#: src/print.c:483
|
||||
msgid "Nonterminals, with rules where they appear"
|
||||
msgstr "Deðiþken simgeler, kurallarýnýn bulunduklarý yerde"
|
||||
|
||||
#: src/print.c:509
|
||||
#: src/print.c:512
|
||||
msgid " on left:"
|
||||
msgstr " solda:"
|
||||
|
||||
#: src/print.c:524
|
||||
#: src/print.c:527
|
||||
msgid " on right:"
|
||||
msgstr " saðda:"
|
||||
|
||||
#: src/print.c:552
|
||||
#: src/print.c:555
|
||||
#, fuzzy
|
||||
msgid "Rules never reduced"
|
||||
msgstr "%d kural asla indirgenmedi\n"
|
||||
@@ -326,50 +326,50 @@ msgstr ""
|
||||
msgid "rule given for %s, which is a token"
|
||||
msgstr "bir andaç olan %s için verilen kural"
|
||||
|
||||
#: src/reader.c:264
|
||||
#: src/reader.c:268
|
||||
#, c-format
|
||||
msgid "type clash (`%s' `%s') on default action"
|
||||
msgstr "öntanýmlý eylem üzerinde (`%s' `%s') tip çatýþmasý"
|
||||
|
||||
#: src/reader.c:272
|
||||
#: src/reader.c:274
|
||||
msgid "empty rule for typed nonterminal, and no action"
|
||||
msgstr ""
|
||||
"Tipli deðiþken simge için boþ kural tanýmlanmýþ, ve eylem belirtilmemiþ"
|
||||
|
||||
#: src/reader.c:343
|
||||
#: src/reader.c:344
|
||||
msgid "two @prec's in a row"
|
||||
msgstr "bir satýrda iki @prec"
|
||||
|
||||
#: src/reader.c:353
|
||||
#: src/reader.c:354
|
||||
#, c-format
|
||||
msgid "%%dprec affects only GLR parsers"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:355
|
||||
#: src/reader.c:356
|
||||
#, c-format
|
||||
msgid "%%dprec must be followed by positive number"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:357
|
||||
#: src/reader.c:358
|
||||
#, c-format
|
||||
msgid "only one %%dprec allowed per rule"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:368
|
||||
#: src/reader.c:369
|
||||
#, c-format
|
||||
msgid "%%merge affects only GLR parsers"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:370
|
||||
#: src/reader.c:371
|
||||
#, c-format
|
||||
msgid "only one %%merge allowed per rule"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:513
|
||||
#: src/reader.c:514
|
||||
msgid "no rules in the input grammar"
|
||||
msgstr "girdi grameri içinde kurallar yok"
|
||||
|
||||
#: src/reader.c:545
|
||||
#: src/reader.c:546
|
||||
#, 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"
|
||||
@@ -429,62 +429,62 @@ msgstr[1] "%d yarars
|
||||
msgid "start symbol %s does not derive any sentence"
|
||||
msgstr "Baþlangýç simgesi %s herhangi bir cümleden türemez"
|
||||
|
||||
#: scan-gram.l:202
|
||||
#: scan-gram.l:211
|
||||
#, c-format
|
||||
msgid ": invalid character: `%c'\n"
|
||||
msgstr ""
|
||||
|
||||
#: scan-gram.l:246
|
||||
#: scan-gram.l:255
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a comment\n"
|
||||
msgstr "beklenmeyen dosya sonu"
|
||||
|
||||
#: scan-gram.l:274 scan-gram.l:412
|
||||
#: scan-gram.l:284 scan-gram.l:423
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a string\n"
|
||||
msgstr "beklenmeyen dosya sonu"
|
||||
|
||||
#: scan-gram.l:311 scan-gram.l:383
|
||||
#: scan-gram.l:322 scan-gram.l:394
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a character\n"
|
||||
msgstr "beklenmeyen dosya sonu"
|
||||
|
||||
#: scan-gram.l:332
|
||||
#: scan-gram.l:343
|
||||
#, fuzzy, c-format
|
||||
msgid ": invalid escape: %s\n"
|
||||
msgstr "geçersiz deðer: %s%d"
|
||||
|
||||
#: scan-gram.l:353
|
||||
#: scan-gram.l:364
|
||||
#, fuzzy, c-format
|
||||
msgid ": unrecognized escape: %s\n"
|
||||
msgstr "tanýnmayan: %s"
|
||||
|
||||
#: scan-gram.l:473
|
||||
#: scan-gram.l:485
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a braced code\n"
|
||||
msgstr "beklenmeyen dosya sonu"
|
||||
|
||||
#: scan-gram.l:502
|
||||
#: scan-gram.l:514
|
||||
#, fuzzy
|
||||
msgid ": unexpected end of file in a prologue\n"
|
||||
msgstr "beklenmeyen dosya sonu"
|
||||
|
||||
#: scan-gram.l:560
|
||||
#: scan-gram.l:572
|
||||
#, c-format
|
||||
msgid "$$ of `%s' has no declared type"
|
||||
msgstr "`%s''in $$'ý bildirilmiþ tip deðil"
|
||||
|
||||
#: scan-gram.l:577 scan-gram.l:664
|
||||
#: scan-gram.l:584 scan-gram.l:666
|
||||
#, c-format
|
||||
msgid "invalid value: %s%d"
|
||||
msgstr "geçersiz deðer: %s%d"
|
||||
|
||||
#: scan-gram.l:584
|
||||
#: scan-gram.l:591
|
||||
#, c-format
|
||||
msgid "$%d of `%s' has no declared type"
|
||||
msgstr "`%2$s''in %1$d'i bildirilmiþ tip deðil"
|
||||
|
||||
#: scan-gram.l:595 scan-gram.l:612 scan-gram.l:671 scan-gram.l:688
|
||||
#: scan-gram.l:602 scan-gram.l:619 scan-gram.l:673 scan-gram.l:690
|
||||
#, c-format
|
||||
msgid "%s is invalid"
|
||||
msgstr "%s geçersizdir"
|
||||
@@ -578,67 +578,67 @@ msgstr ""
|
||||
msgid "Valid arguments are:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:226
|
||||
#, c-format
|
||||
msgid "%d bitset_allocs, %d freed (%.2f%%).\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:229
|
||||
#, c-format
|
||||
msgid "%d bitset_sets, %d cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:232
|
||||
#, c-format
|
||||
msgid "%d bitset_resets, %d cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:235
|
||||
#, c-format
|
||||
msgid "%d bitset_tests, %d cached (%.2f%%)\n"
|
||||
msgid "%u bitset_allocs, %u freed (%.2f%%).\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:239
|
||||
#: lib/bitset_stats.c:238
|
||||
#, c-format
|
||||
msgid "%d bitset_lists\n"
|
||||
msgid "%u bitset_sets, %u cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:241
|
||||
msgid "count log histogram\n"
|
||||
#, c-format
|
||||
msgid "%u bitset_resets, %u cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:244
|
||||
#, c-format
|
||||
msgid "%u bitset_tests, %u cached (%.2f%%)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:248
|
||||
#, c-format
|
||||
msgid "%u bitset_lists\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:250
|
||||
msgid "count log histogram\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:253
|
||||
msgid "size log histogram\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:247
|
||||
#: lib/bitset_stats.c:256
|
||||
msgid "density histogram\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:264
|
||||
#: lib/bitset_stats.c:272
|
||||
msgid ""
|
||||
"Bitset statistics:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:267
|
||||
#: lib/bitset_stats.c:275
|
||||
#, c-format
|
||||
msgid "Accumulated runs = %d\n"
|
||||
msgid "Accumulated runs = %u\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:311
|
||||
#: lib/bitset_stats.c:320
|
||||
msgid "Could not read stats file."
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:313
|
||||
#: lib/bitset_stats.c:322
|
||||
msgid "Bad stats file size.\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:339
|
||||
#: lib/bitset_stats.c:348
|
||||
msgid "Could not write stats file."
|
||||
msgstr ""
|
||||
|
||||
#: lib/bitset_stats.c:343
|
||||
#: lib/bitset_stats.c:352
|
||||
msgid "Could not open stats file for writing."
|
||||
msgstr ""
|
||||
|
||||
@@ -709,17 +709,17 @@ msgstr "`"
|
||||
msgid "'"
|
||||
msgstr "'"
|
||||
|
||||
#: lib/timevar.c:466
|
||||
#: lib/timevar.c:476
|
||||
msgid ""
|
||||
"\n"
|
||||
"Execution times (seconds)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/timevar.c:516
|
||||
#: lib/timevar.c:526
|
||||
msgid " TOTAL :"
|
||||
msgstr ""
|
||||
|
||||
#: lib/timevar.c:552
|
||||
#: lib/timevar.c:562
|
||||
#, c-format
|
||||
msgid "time in %s: %ld.%06ld (%ld%%)\n"
|
||||
msgstr ""
|
||||
|
||||
+2
-2
@@ -21,8 +21,8 @@ DEFS = @DEFS@ \
|
||||
-DPKGDATADIR=\"$(pkgdatadir)\" \
|
||||
-DLOCALEDIR=\"$(datadir)/locale\"
|
||||
|
||||
CFLAGS = @CFLAGS@ $(WARNING_CFLAGS) $(WERROR_CFLAGS)
|
||||
YFLAGS = "-dv"
|
||||
AM_CFLAGS = $(WARNING_CFLAGS) $(WERROR_CFLAGS)
|
||||
AM_YFLAGS = "-dv"
|
||||
|
||||
# config.h is in build/.
|
||||
INCLUDES = -I$(top_builddir) \
|
||||
|
||||
+1
-1
@@ -115,7 +115,7 @@ extern int nvars;
|
||||
|
||||
typedef int item_number_t;
|
||||
# define ITEM_NUMBER_MAX ((item_number_t) INT_MAX)
|
||||
# define ITEM_NUMBER_MIN ((item_number_t) MIN_MAX)
|
||||
# define ITEM_NUMBER_MIN ((item_number_t) INT_MIN)
|
||||
extern item_number_t *ritem;
|
||||
extern unsigned int nritems;
|
||||
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ void lalr_free PARAMS ((void));
|
||||
TO_STATE of the first of them. */
|
||||
|
||||
typedef short goto_number_t;
|
||||
# define GOTO_NUMBER_MAX ((goto_number_t) INT_MAX)
|
||||
# define GOTO_NUMBER_MAX ((goto_number_t) SHRT_MAX)
|
||||
|
||||
extern goto_number_t *goto_map;
|
||||
extern state_number_t *from_state;
|
||||
|
||||
+13
-13
@@ -503,19 +503,19 @@ prepare_actions (void)
|
||||
muscle_insert_base_table ("check", check,
|
||||
check[0], 1, high + 1);
|
||||
|
||||
if (glr_parser)
|
||||
{
|
||||
/* GLR parsing slightly modifies yytable and yycheck
|
||||
(and thus yypact) so that in states with unresolved conflicts,
|
||||
the default reduction is not used in the conflicted entries, so
|
||||
that there is a place to put a conflict pointer. This means that
|
||||
yyconflp and yyconfl are nonsense for a non-GLR parser, so we
|
||||
avoid accidents by not writing them out in that case. */
|
||||
muscle_insert_unsigned_int_table ("conflict_list_heads", conflict_table,
|
||||
conflict_table[0], 1, high+1);
|
||||
muscle_insert_unsigned_int_table ("conflicting_rules", conflict_list,
|
||||
conflict_list[0], 1, conflict_list_cnt);
|
||||
}
|
||||
/* GLR parsing slightly modifies YYTABLE and YYCHECK (and thus
|
||||
YYPACT) so that in states with unresolved conflicts, the default
|
||||
reduction is not used in the conflicted entries, so that there is
|
||||
a place to put a conflict pointer.
|
||||
|
||||
This means that YYCONFLP and YYCONFL are nonsense for a non-GLR
|
||||
parser, so we could avoid accidents by not writing them out in
|
||||
that case. Nevertheless, it seems even better to be able to use
|
||||
the GLR skeletons even without the non-deterministic tables. */
|
||||
muscle_insert_unsigned_int_table ("conflict_list_heads", conflict_table,
|
||||
conflict_table[0], 1, high+1);
|
||||
muscle_insert_unsigned_int_table ("conflicting_rules", conflict_list,
|
||||
conflict_list[0], 1, conflict_list_cnt);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+4
-1
@@ -422,7 +422,10 @@ print_state (FILE *out, state_t *state)
|
||||
print_actions (out, state);
|
||||
if ((report_flag & report_solved_conflicts)
|
||||
&& state->solved_conflicts)
|
||||
fputs (state->solved_conflicts, out);
|
||||
{
|
||||
fputc ('\n', out);
|
||||
fputs (state->solved_conflicts, out);
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------.
|
||||
|
||||
+12
-11
@@ -246,18 +246,22 @@ static void
|
||||
grammar_current_rule_check (void)
|
||||
{
|
||||
symbol_t *lhs = current_rule->sym;
|
||||
char const *lhs_type = lhs->type_name;
|
||||
symbol_t *first_rhs = current_rule->next->sym;
|
||||
|
||||
/* If there is an action, then there is nothing we can do: the user
|
||||
is allowed to shoot in her foot. */
|
||||
is allowed to shoot herself in the foot. */
|
||||
if (current_rule->action)
|
||||
return;
|
||||
|
||||
/* If $$ is being set in default way, report if any type mismatch.
|
||||
*/
|
||||
/* Don't worry about the default action if $$ is untyped, since $$'s
|
||||
value can't be used. */
|
||||
if (! lhs_type)
|
||||
return;
|
||||
|
||||
/* If $$ is being set in default way, report if any type mismatch. */
|
||||
if (first_rhs)
|
||||
{
|
||||
const char *lhs_type = lhs->type_name ? lhs->type_name : "";
|
||||
const char *rhs_type = first_rhs->type_name ? first_rhs->type_name : "";
|
||||
if (strcmp (lhs_type, rhs_type))
|
||||
complain_at (current_rule->location,
|
||||
@@ -266,11 +270,8 @@ grammar_current_rule_check (void)
|
||||
}
|
||||
/* Warn if there is no default for $$ but we need one. */
|
||||
else
|
||||
{
|
||||
if (lhs->type_name)
|
||||
complain_at (current_rule->location,
|
||||
_("empty rule for typed nonterminal, and no action"));
|
||||
}
|
||||
complain_at (current_rule->location,
|
||||
_("empty rule for typed nonterminal, and no action"));
|
||||
}
|
||||
|
||||
|
||||
@@ -541,9 +542,9 @@ reader (void)
|
||||
grammar = p;
|
||||
}
|
||||
|
||||
if (nsyms > SHRT_MAX)
|
||||
if (SYMBOL_NUMBER_MAX < nsyms)
|
||||
fatal (_("too many symbols (tokens plus nonterminals); maximum %d"),
|
||||
SHRT_MAX);
|
||||
SYMBOL_NUMBER_MAX);
|
||||
|
||||
assert (nsyms == ntokens + nvars);
|
||||
|
||||
|
||||
+250
-244
File diff suppressed because it is too large
Load Diff
+16
-14
@@ -79,6 +79,14 @@ scanner_last_string_free (void)
|
||||
static int braces_level = 0;
|
||||
static int percent_percent_count = 0;
|
||||
|
||||
/* Within well-formed rules, RULE_LENGTH is the number of values in
|
||||
the current rule so far, which says where to find `$0' with respect
|
||||
to the top of the stack. It is not the same as the rule->length in
|
||||
the case of mid rule actions.
|
||||
|
||||
Outside of well-formed rules, RULE_LENGTH has an undefined value. */
|
||||
static int rule_length;
|
||||
|
||||
static void handle_dollar PARAMS ((braced_code_t code_kind,
|
||||
char *cp, location_t location));
|
||||
static void handle_at PARAMS ((braced_code_t code_kind,
|
||||
@@ -138,7 +146,7 @@ blanks [ \t\f]+
|
||||
"%nonassoc" return PERCENT_NONASSOC;
|
||||
"%nterm" return PERCENT_NTERM;
|
||||
"%output" return PERCENT_OUTPUT;
|
||||
"%prec" return PERCENT_PREC;
|
||||
"%prec" { rule_length--; return PERCENT_PREC; }
|
||||
"%printer" return PERCENT_PRINTER;
|
||||
"%pure"[-_]"parser" return PERCENT_PURE_PARSER;
|
||||
"%right" return PERCENT_RIGHT;
|
||||
@@ -153,14 +161,15 @@ blanks [ \t\f]+
|
||||
"%yacc" return PERCENT_YACC;
|
||||
|
||||
"=" return EQUAL;
|
||||
":" return COLON;
|
||||
"|" return PIPE;
|
||||
":" { rule_length = 0; return COLON; }
|
||||
"|" { rule_length = 0; return PIPE; }
|
||||
";" return SEMICOLON;
|
||||
|
||||
{eols} YY_LINES; YY_STEP;
|
||||
{blanks} YY_STEP;
|
||||
{id} {
|
||||
yylval->symbol = symbol_get (yytext, *yylloc);
|
||||
rule_length++;
|
||||
return ID;
|
||||
}
|
||||
|
||||
@@ -262,6 +271,7 @@ blanks [ \t\f]+
|
||||
YY_OBS_FINISH;
|
||||
yylval->string = last_string;
|
||||
yy_pop_state ();
|
||||
rule_length++;
|
||||
return STRING;
|
||||
}
|
||||
|
||||
@@ -298,6 +308,7 @@ blanks [ \t\f]+
|
||||
(unsigned char) last_string[1], *yylloc);
|
||||
YY_OBS_FREE;
|
||||
yy_pop_state ();
|
||||
rule_length++;
|
||||
return ID;
|
||||
}
|
||||
}
|
||||
@@ -347,7 +358,7 @@ blanks [ \t\f]+
|
||||
\\r obstack_1grow (&string_obstack, '\r');
|
||||
\\t obstack_1grow (&string_obstack, '\t');
|
||||
\\v obstack_1grow (&string_obstack, '\v');
|
||||
\\[\\""] obstack_1grow (&string_obstack, yytext[1]);
|
||||
\\[\\""''] obstack_1grow (&string_obstack, yytext[1]);
|
||||
\\(.|\n) {
|
||||
LOCATION_PRINT (stderr, *yylloc);
|
||||
fprintf (stderr, _(": unrecognized escape: %s\n"), quote (yytext));
|
||||
@@ -451,6 +462,7 @@ blanks [ \t\f]+
|
||||
yy_pop_state ();
|
||||
YY_OBS_FINISH;
|
||||
yylval->string = last_string;
|
||||
rule_length++;
|
||||
return BRACED_CODE;
|
||||
}
|
||||
}
|
||||
@@ -566,11 +578,6 @@ handle_action_dollar (char *text, location_t location)
|
||||
}
|
||||
else if (('0' <= *cp && *cp <= '9') || *cp == '-')
|
||||
{
|
||||
/* RULE_LENGTH is the number of values in the current rule so
|
||||
far, which says where to find `$0' with respect to the top of
|
||||
the stack. It is not the same as the rule->length in the
|
||||
case of mid rule actions. */
|
||||
int rule_length = symbol_list_length (current_rule->next);
|
||||
int n = strtol (cp, &cp, 10);
|
||||
|
||||
if (n > rule_length)
|
||||
@@ -653,11 +660,6 @@ handle_action_at (char *text, location_t location)
|
||||
}
|
||||
else if (('0' <= *cp && *cp <= '9') || *cp == '-')
|
||||
{
|
||||
/* RULE_LENGTH is the number of values in the current rule so
|
||||
far, which says where to find `$0' with respect to the top of
|
||||
the stack. It is not the same as the rule->length in the
|
||||
case of mid rule actions. */
|
||||
int rule_length = symbol_list_length (current_rule->next);
|
||||
int n = strtol (cp, &cp, 10);
|
||||
|
||||
if (n > rule_length)
|
||||
|
||||
@@ -40,6 +40,7 @@ typedef enum
|
||||
|
||||
/* Internal token numbers. */
|
||||
typedef short symbol_number_t;
|
||||
#define SYMBOL_NUMBER_MAX ((symbol_number_t) SHRT_MAX)
|
||||
|
||||
|
||||
typedef struct symbol_s symbol_t;
|
||||
|
||||
+8
-15
@@ -212,8 +212,7 @@ table_grow (size_t desired)
|
||||
|
||||
table = XREALLOC (table, base_t, table_size);
|
||||
check = XREALLOC (check, base_t, table_size);
|
||||
if (glr_parser)
|
||||
conflict_table = XREALLOC (conflict_table, unsigned int, table_size);
|
||||
conflict_table = XREALLOC (conflict_table, unsigned int, table_size);
|
||||
|
||||
for (/* Nothing. */; old_size < table_size; ++old_size)
|
||||
{
|
||||
@@ -470,27 +469,22 @@ token_actions (void)
|
||||
symbol_number_t j;
|
||||
rule_number_t r;
|
||||
|
||||
int nconflict = conflicts_total_count ();
|
||||
int nconflict = glr_parser ? conflicts_total_count () : 0;
|
||||
|
||||
yydefact = XCALLOC (rule_number_t, nstates);
|
||||
|
||||
actrow = XCALLOC (action_t, ntokens);
|
||||
conflrow = XCALLOC (unsigned int, ntokens);
|
||||
|
||||
conflict_list = XCALLOC (unsigned int, 1 + 2 * nconflict);
|
||||
conflict_list_free = 2 * nconflict;
|
||||
conflict_list_cnt = 1;
|
||||
|
||||
/* Find the rules which are reduced. */
|
||||
if (!glr_parser)
|
||||
for (r = 0; r < nrules; ++r)
|
||||
rules[r].useful = FALSE;
|
||||
|
||||
if (glr_parser)
|
||||
{
|
||||
conflict_list = XCALLOC (unsigned int, 1 + 2 * nconflict);
|
||||
conflict_list_free = 2 * nconflict;
|
||||
conflict_list_cnt = 1;
|
||||
}
|
||||
else
|
||||
conflict_list_free = conflict_list_cnt = 0;
|
||||
|
||||
for (i = 0; i < nstates; ++i)
|
||||
{
|
||||
rule_t *default_rule = action_row (states[i]);
|
||||
@@ -780,7 +774,7 @@ table_ninf_remap (base_t tab[], size_t size, base_t ninf)
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
if (tab[i] < res && tab[i] != ninf)
|
||||
res = base[i];
|
||||
res = tab[i];
|
||||
|
||||
--res;
|
||||
|
||||
@@ -799,8 +793,7 @@ pack_table (void)
|
||||
base = XCALLOC (base_t, nvectors);
|
||||
pos = XCALLOC (base_t, nentries);
|
||||
table = XCALLOC (base_t, table_size);
|
||||
if (glr_parser)
|
||||
conflict_table = XCALLOC (unsigned int, table_size);
|
||||
conflict_table = XCALLOC (unsigned int, table_size);
|
||||
check = XCALLOC (base_t, table_size);
|
||||
|
||||
lowzero = 0;
|
||||
|
||||
@@ -71,3 +71,27 @@ check_SCRIPTS = bison
|
||||
# Run the test suite on the *installed* tree.
|
||||
installcheck-local:
|
||||
$(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
|
||||
|
||||
# Be real mean with it.
|
||||
.PHONY: maintainer-check-g++
|
||||
maintainer-check-g++: $(TESTSUITE)
|
||||
if test -n "$(VALGRIND)"; then \
|
||||
$(TESTSUITE) CC='$(GXX)'; \
|
||||
else \
|
||||
true; \
|
||||
fi
|
||||
|
||||
.PHONY: maintainer-check-posix
|
||||
maintainer-check-posix: $(TESTSUITE)
|
||||
$(TESTSUITE) POSIXLY_CORRECT=1
|
||||
|
||||
.PHONY: maintainer-check-valgrind
|
||||
maintainer-check-valgrind: $(TESTSUITE)
|
||||
if test -n "$(VALGRIND)"; then \
|
||||
$(TESTSUITE) PREBISON='$(VALGRIND) -q' PREPARSER='$(VALGRIND) -q'; \
|
||||
else \
|
||||
true; \
|
||||
fi
|
||||
|
||||
.PHONY: maintainer-check
|
||||
maintainer-check: maintainer-check-posix maintainer-check-valgrind maintainer-check-g++
|
||||
|
||||
+6
-6
@@ -72,7 +72,7 @@ main (void)
|
||||
}
|
||||
]])
|
||||
|
||||
AT_CHECK([bison input.y -d -v -o input.c])
|
||||
AT_CHECK([bison -d -v -o input.c input.y])
|
||||
AT_COMPILE([input])
|
||||
AT_PARSER_CHECK([./input], 0,
|
||||
[[0123456789
|
||||
@@ -103,18 +103,18 @@ AT_DATA([[input.y]],
|
||||
int val;
|
||||
};
|
||||
|
||||
%type <val> a_1 a_2 a_4 a_5
|
||||
%type <val> a_1 a_2 a_5
|
||||
sum_of_the_five_previous_values
|
||||
|
||||
%%
|
||||
exp: a_1 a_2 { $<val>$ = 3; } a_4 a_5 sum_of_the_five_previous_values
|
||||
exp: a_1 a_2 { $<val>$ = 3; } { $<val>$ = $<val>3 + 1; } a_5
|
||||
sum_of_the_five_previous_values
|
||||
{
|
||||
printf ("%d\n", $6);
|
||||
}
|
||||
;
|
||||
a_1: { $$ = 1; };
|
||||
a_2: { $$ = 2; };
|
||||
a_4: { $$ = 4; };
|
||||
a_5: { $$ = 5; };
|
||||
|
||||
sum_of_the_five_previous_values:
|
||||
@@ -143,7 +143,7 @@ main (void)
|
||||
}
|
||||
]])
|
||||
|
||||
AT_CHECK([bison input.y -d -v -o input.c])
|
||||
AT_CHECK([bison -d -v -o input.c input.y])
|
||||
AT_COMPILE([input])
|
||||
AT_PARSER_CHECK([./input], 0,
|
||||
[[15
|
||||
@@ -295,7 +295,7 @@ main (void)
|
||||
}
|
||||
]])
|
||||
|
||||
AT_CHECK([bison input.y --location -d -v -o input.c])
|
||||
AT_CHECK([bison --location -d -v -o input.c input.y])
|
||||
AT_COMPILE([input])
|
||||
AT_PARSER_CHECK([./input], 1,
|
||||
[[sending: 'x' (value = 0, line 0)
|
||||
|
||||
+4
-2
@@ -1,10 +1,12 @@
|
||||
# @configure_input@ -*- shell-script -*-
|
||||
# Configurable variable values for Bison test suite.
|
||||
# Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
# We need a C compiler.
|
||||
CC='@CC@'
|
||||
CFLAGS='@CFLAGS@ @WARNING_CFLAGS@ @WERROR_CFLAGS@'
|
||||
|
||||
# We want no optimization.
|
||||
CFLAGS='@O0CFLAGS@ @WARNING_CFLAGS@ @WERROR_CFLAGS@'
|
||||
|
||||
# We need `config.h'.
|
||||
CPPFLAGS="-I$abs_top_builddir @CPPFLAGS@"
|
||||
|
||||
+1
-1
@@ -5,4 +5,4 @@
|
||||
# We want to use the files shipped with Bison.
|
||||
BISON_PKGDATADIR='@abs_top_srcdir@/data'
|
||||
export BISON_PKGDATADIR
|
||||
exec '@abs_top_builddir@/src/bison' ${1+"$@"}
|
||||
exec $PREBISON '@abs_top_builddir@/src/bison' ${1+"$@"}
|
||||
|
||||
+81
-35
@@ -16,8 +16,6 @@
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
AT_BANNER([[Simple Calculator.]])
|
||||
|
||||
## ---------------------------------------------------- ##
|
||||
## Compile the grammar described in the documentation. ##
|
||||
## ---------------------------------------------------- ##
|
||||
@@ -275,8 +273,8 @@ main (int argc, const char **argv)
|
||||
# Produce `calc.y'.
|
||||
m4_define([AT_DATA_CALC_Y],
|
||||
[_AT_DATA_CALC_Y($[1], $[2], $[3],
|
||||
[m4_bmatch([$1], [--yyerror-verbose],
|
||||
[[%error-verbose]])])])
|
||||
[m4_bpatsubst([$1], [--[^ ]*])])
|
||||
])
|
||||
|
||||
|
||||
|
||||
@@ -284,17 +282,22 @@ m4_define([AT_DATA_CALC_Y],
|
||||
# ------------------------------------------------------------
|
||||
# Run `calc' on INPUT and expect no STDOUT nor STDERR.
|
||||
#
|
||||
# If BISON-OPTIONS contains `--debug', then NUM-STDERR-LINES is the number
|
||||
# of expected lines on stderr.
|
||||
# If BISON-OPTIONS contains `%debug' but not `%glr-parser', then
|
||||
# NUM-STDERR-LINES is the number of expected lines on stderr.
|
||||
#
|
||||
# We don't count GLR's traces yet, since its traces are somewhat
|
||||
# different from LALR's.
|
||||
m4_define([_AT_CHECK_CALC],
|
||||
[AT_DATA([[input]],
|
||||
[[$2
|
||||
]])
|
||||
AT_PARSER_CHECK([./calc input], 0, [], [stderr])dnl
|
||||
AT_CHECK([wc -l <stderr | sed 's/[[^0-9]]//g'], 0,
|
||||
[m4_bmatch([$1], [--debug],
|
||||
[$3], [0])
|
||||
])
|
||||
AT_PARSER_CHECK([./calc input], 0, [], [stderr])
|
||||
m4_bmatch([$1],
|
||||
[%debug.*%glr\|%glr.*%debug],
|
||||
[],
|
||||
[%debug],
|
||||
[AT_CHECK([wc -l <stderr | sed 's/[[^0-9]]//g'], 0, [$3
|
||||
])])
|
||||
])
|
||||
|
||||
|
||||
@@ -309,12 +312,12 @@ AT_CHECK([wc -l <stderr | sed 's/[[^0-9]]//g'], 0,
|
||||
# If BISON-OPTIONS contains `--location', then make sure the ERROR-LOCATION
|
||||
# is correctly output on stderr.
|
||||
#
|
||||
# If BISON-OPTIONS contains `--yyerror-verbose', then make sure the
|
||||
# If BISON-OPTIONS contains `%error-verbose', then make sure the
|
||||
# IF-YYERROR-VERBOSE message is properly output after `parse error, '
|
||||
# on STDERR.
|
||||
#
|
||||
# If BISON-OPTIONS contains `--debug', then NUM-STDERR-LINES is the number
|
||||
# of expected lines on stderr.
|
||||
# If BISON-OPTIONS contains `%debug' but not `%glr', then NUM-STDERR-LINES
|
||||
# is the number of expected lines on stderr.
|
||||
m4_define([_AT_CHECK_CALC_ERROR],
|
||||
[m4_bmatch([$2], [^/],
|
||||
[AT_PARSER_CHECK([./calc $2], 0, [], [stderr])],
|
||||
@@ -322,9 +325,11 @@ m4_define([_AT_CHECK_CALC_ERROR],
|
||||
[[$2
|
||||
]])
|
||||
AT_PARSER_CHECK([./calc input], 0, [], [stderr])])
|
||||
|
||||
m4_bmatch([$1], [--debug],
|
||||
[AT_CHECK([wc -l <stderr | sed 's/[[^0-9]]//g'], 0, [$3
|
||||
m4_bmatch([$1],
|
||||
[%debug.*%glr\|%glr.*%debug],
|
||||
[],
|
||||
[%debug],
|
||||
[AT_CHECK([wc -l <stderr | sed 's/[[^0-9]]//g'], 0, [$3
|
||||
])])
|
||||
|
||||
# Normalize the observed and expected error messages, depending upon the
|
||||
@@ -332,6 +337,7 @@ m4_bmatch([$1], [--debug],
|
||||
# 1. Remove the traces from observed.
|
||||
sed '/^Starting/d
|
||||
/^Entering/d
|
||||
/^Stack/d
|
||||
/^Reading/d
|
||||
/^Reducing/d
|
||||
/^Shifting/d
|
||||
@@ -350,7 +356,7 @@ m4_bmatch([$1], [--location], [],
|
||||
[[sed 's/^[-0-9.]*: //' expout >at-expout
|
||||
mv at-expout expout]])
|
||||
# 4. If error-verbose is not used, strip the`, unexpected....' part.
|
||||
m4_bmatch([$1], [--yyerror-verbose], [],
|
||||
m4_bmatch([$1], [%error-verbose], [],
|
||||
[[sed 's/parse error, .*$/parse error/' expout >at-expout
|
||||
mv at-expout expout]])
|
||||
# 5. Check
|
||||
@@ -358,8 +364,8 @@ AT_CHECK([cat stderr], 0, [expout])
|
||||
])
|
||||
|
||||
|
||||
# AT_CHECK_CALC([BISON-OPTIONS], [PARSER-EXPECTED-STDERR])
|
||||
# --------------------------------------------------------
|
||||
# AT_CHECK_CALC([BISON-OPTIONS])
|
||||
# ------------------------------
|
||||
# Start a testing chunk which compiles `calc' grammar with
|
||||
# BISON-OPTIONS, and performs several tests over the parser.
|
||||
m4_define([AT_CHECK_CALC],
|
||||
@@ -369,7 +375,7 @@ AT_SETUP([Calculator $1])
|
||||
AT_DATA_CALC_Y([$1])
|
||||
|
||||
# Specify the output files to avoid problems on different file systems.
|
||||
AT_CHECK([bison calc.y -o calc.c m4_bpatsubst([$1], [--yyerror-verbose])],
|
||||
AT_CHECK([bison -o calc.c m4_bpatsubst([$1], [%[^ ]*]) calc.y],
|
||||
[0], [], [])
|
||||
|
||||
AT_COMPILE([calc])
|
||||
@@ -427,22 +433,62 @@ AT_CLEANUP
|
||||
|
||||
|
||||
|
||||
# ------------------ #
|
||||
# Test the parsers. #
|
||||
# ------------------ #
|
||||
# ------------------------ #
|
||||
# Simple LALR Calculator. #
|
||||
# ------------------------ #
|
||||
|
||||
AT_CHECK_CALC()
|
||||
AT_BANNER([[Simple LALR Calculator.]])
|
||||
|
||||
AT_CHECK_CALC([--defines])
|
||||
AT_CHECK_CALC([--locations])
|
||||
AT_CHECK_CALC([--name-prefix=calc])
|
||||
AT_CHECK_CALC([--verbose])
|
||||
AT_CHECK_CALC([--yacc])
|
||||
AT_CHECK_CALC([--yyerror-verbose])
|
||||
# AT_CHECK_CALC_LALR([BISON-OPTIONS])
|
||||
# -----------------------------------
|
||||
# Start a testing chunk which compiles `calc' grammar with
|
||||
# BISON-OPTIONS, and performs several tests over the parser.
|
||||
m4_define([AT_CHECK_CALC_LALR],
|
||||
[AT_CHECK_CALC($@)])
|
||||
|
||||
AT_CHECK_CALC([--locations --yyerror-verbose])
|
||||
AT_CHECK_CALC_LALR()
|
||||
|
||||
AT_CHECK_CALC([--defines --locations --name-prefix=calc --verbose --yacc --yyerror-verbose])
|
||||
AT_CHECK_CALC_LALR([--defines])
|
||||
AT_CHECK_CALC_LALR([--locations])
|
||||
AT_CHECK_CALC_LALR([--name-prefix=calc])
|
||||
AT_CHECK_CALC_LALR([--verbose])
|
||||
AT_CHECK_CALC_LALR([--yacc])
|
||||
AT_CHECK_CALC_LALR([%error-verbose])
|
||||
|
||||
AT_CHECK_CALC([--debug])
|
||||
AT_CHECK_CALC([--debug --defines --locations --name-prefix=calc --verbose --yacc --yyerror-verbose])
|
||||
AT_CHECK_CALC_LALR([%error-verbose --locations])
|
||||
|
||||
AT_CHECK_CALC_LALR([%error-verbose --defines --locations --name-prefix=calc --verbose --yacc])
|
||||
|
||||
AT_CHECK_CALC_LALR([%debug])
|
||||
AT_CHECK_CALC_LALR([%error-verbose %debug --defines --locations --name-prefix=calc --verbose --yacc])
|
||||
|
||||
|
||||
# ----------------------- #
|
||||
# Simple GLR Calculator. #
|
||||
# ----------------------- #
|
||||
|
||||
AT_BANNER([[Simple GLR Calculator.]])
|
||||
|
||||
# AT_CHECK_CALC_GLR([BISON-OPTIONS])
|
||||
# ----------------------------------
|
||||
# Start a testing chunk which compiles `calc' grammar with
|
||||
# BISON-OPTIONS and %glr-parser, and performs several tests over the parser.
|
||||
m4_define([AT_CHECK_CALC_GLR],
|
||||
[AT_CHECK_CALC([%glr_parser] $@)])
|
||||
|
||||
|
||||
AT_CHECK_CALC_GLR()
|
||||
|
||||
AT_CHECK_CALC_GLR([--defines])
|
||||
AT_CHECK_CALC_GLR([--locations])
|
||||
AT_CHECK_CALC_GLR([--name-prefix=calc])
|
||||
AT_CHECK_CALC_GLR([--verbose])
|
||||
AT_CHECK_CALC_GLR([--yacc])
|
||||
AT_CHECK_CALC_GLR([%error-verbose])
|
||||
|
||||
AT_CHECK_CALC_GLR([%error-verbose --locations])
|
||||
|
||||
AT_CHECK_CALC_GLR([%error-verbose --defines --locations --name-prefix=calc --verbose --yacc])
|
||||
|
||||
AT_CHECK_CALC_GLR([%debug])
|
||||
AT_CHECK_CALC_GLR([%error-verbose %debug --defines --locations --name-prefix=calc --verbose --yacc])
|
||||
|
||||
+9
-8
@@ -37,7 +37,7 @@ exp: e 'e';
|
||||
e: 'e' | /* Nothing. */;
|
||||
]])
|
||||
|
||||
AT_CHECK([bison input.y -o input.c], 0, [],
|
||||
AT_CHECK([bison -o input.c input.y], 0, [],
|
||||
[[input.y:4.8: warning: rule never reduced because of conflicts: e: /* empty */
|
||||
]])
|
||||
|
||||
@@ -103,7 +103,7 @@ main (int argc, const char *argv[])
|
||||
]])
|
||||
|
||||
# Specify the output files to avoid problems on different file systems.
|
||||
AT_CHECK([bison input.y -o input.c])
|
||||
AT_CHECK([bison -o input.c input.y])
|
||||
AT_COMPILE([input])
|
||||
|
||||
AT_PARSER_CHECK([./input '0<0'])
|
||||
@@ -141,7 +141,7 @@ AT_DATA([input.y],
|
||||
exp: exp OP exp | NUM;
|
||||
]])
|
||||
|
||||
AT_CHECK([bison input.y -o input.c --report=all], 0, [],
|
||||
AT_CHECK([bison -o input.c --report=all input.y], 0, [],
|
||||
[input.y: warning: 1 shift/reduce conflict
|
||||
])
|
||||
|
||||
@@ -249,7 +249,7 @@ AT_DATA([input.y],
|
||||
exp: exp OP exp | NUM;
|
||||
]])
|
||||
|
||||
AT_CHECK([bison input.y -o input.c --report=all])
|
||||
AT_CHECK([bison -o input.c --report=all input.y])
|
||||
|
||||
# Check the contents of the report.
|
||||
AT_CHECK([cat input.output], [],
|
||||
@@ -328,6 +328,7 @@ state 5
|
||||
1 | exp OP exp . [$end, OP]
|
||||
|
||||
$default reduce using rule 1 (exp)
|
||||
|
||||
Conflict between rule 1 and token OP resolved as reduce (%left OP).
|
||||
]])
|
||||
|
||||
@@ -370,7 +371,7 @@ id : '0';
|
||||
%%
|
||||
]])
|
||||
|
||||
AT_CHECK([bison input.y -o input.c --report=all], 0, [],
|
||||
AT_CHECK([bison -o input.c --report=all input.y], 0, [],
|
||||
[[input.y: warning: 1 reduce/reduce conflict
|
||||
input.y:4.4-8: warning: rule never reduced because of conflicts: id: '0'
|
||||
]])
|
||||
@@ -487,7 +488,7 @@ AT_DATA([input.y],
|
||||
exp: exp OP exp | NUM;
|
||||
]])
|
||||
|
||||
AT_CHECK([bison input.y -o input.c], 1, [],
|
||||
AT_CHECK([bison -o input.c input.y], 1, [],
|
||||
[input.y: warning: 1 shift/reduce conflict
|
||||
input.y: expected 0 shift/reduce conflicts
|
||||
])
|
||||
@@ -507,7 +508,7 @@ AT_DATA([input.y],
|
||||
exp: exp OP exp | NUM;
|
||||
]])
|
||||
|
||||
AT_CHECK([bison input.y -o input.c])
|
||||
AT_CHECK([bison -o input.c input.y])
|
||||
AT_CLEANUP
|
||||
|
||||
|
||||
@@ -524,7 +525,7 @@ AT_DATA([input.y],
|
||||
exp: exp OP exp | NUM;
|
||||
]])
|
||||
|
||||
AT_CHECK([bison input.y -o input.c], 1, [],
|
||||
AT_CHECK([bison -o input.c input.y], 1, [],
|
||||
[input.y: warning: 1 shift/reduce conflict
|
||||
input.y: expected 2 shift/reduce conflicts
|
||||
])
|
||||
|
||||
+4
-3
@@ -93,8 +93,9 @@ declarator : ID { printf ("\"%s\" ", ]$[1); }
|
||||
int
|
||||
main (int argc, char** argv)
|
||||
{
|
||||
assert (argc = 2);
|
||||
assert (freopen (argv[1], "r", stdin));
|
||||
assert (argc == 2);
|
||||
if (!freopen (argv[1], "r", stdin))
|
||||
abort ();
|
||||
exit (yyparse ());
|
||||
}
|
||||
|
||||
@@ -182,7 +183,7 @@ z + q;
|
||||
This is total garbage, but it should be ignored.
|
||||
]])
|
||||
|
||||
AT_CHECK([bison types.y -o types.c], 0, [], ignore)
|
||||
AT_CHECK([bison -o types.c types.y], 0, [], ignore)
|
||||
AT_COMPILE([types])
|
||||
])
|
||||
|
||||
|
||||
+1
-1
@@ -105,7 +105,7 @@ my_error (const char *msg)
|
||||
exp:;
|
||||
])
|
||||
|
||||
AT_CHECK([bison --defines input.y -o input.c])
|
||||
AT_CHECK([bison --defines -o input.c input.y])
|
||||
|
||||
# YYLTYPE should be defined, and MY_LLOC declared.
|
||||
AT_DATA([caller.c],
|
||||
|
||||
+1
-1
@@ -181,7 +181,7 @@ main (void)
|
||||
}
|
||||
]])
|
||||
|
||||
AT_CHECK([bison input.y -d -v -o input.c])
|
||||
AT_CHECK([bison -d -v -o input.c input.y])
|
||||
AT_COMPILE([input], [input.c main.c])
|
||||
AT_PARSER_CHECK([./input], 0,
|
||||
[[[1],
|
||||
|
||||
+39
-13
@@ -50,7 +50,7 @@ exp: MY_TOKEN;
|
||||
%%
|
||||
]])
|
||||
|
||||
AT_CHECK([bison input.y -o input.c])
|
||||
AT_CHECK([bison -o input.c input.y])
|
||||
AT_COMPILE([input.o], [-c input.c])
|
||||
|
||||
AT_CLEANUP
|
||||
@@ -72,9 +72,9 @@ exp: { tests = {{{{{{{{{{}}}}}}}}}}; };
|
||||
%%
|
||||
]])
|
||||
|
||||
AT_CHECK([bison -v input.y -o input.c])
|
||||
AT_CHECK([bison -v -o input.c input.y])
|
||||
|
||||
AT_CHECK([fgrep 'tests = {{{{{{{{{{}}}}}}}}}};' input.c], 0, [ignore])
|
||||
AT_CHECK([grep 'tests = {{{{{{{{{{}}}}}}}}}};' input.c], 0, [ignore])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
@@ -99,7 +99,7 @@ exp: '(' exp ')' | NUM ;
|
||||
%%
|
||||
]])
|
||||
|
||||
AT_CHECK([bison -v input.y -o input.c], 0, [],
|
||||
AT_CHECK([bison -v -o input.c input.y], 0, [],
|
||||
[[input.y:6.8-14: warning: symbol `"<="' used more than once as a literal string
|
||||
]])
|
||||
|
||||
@@ -144,7 +144,7 @@ expr:
|
||||
};
|
||||
]])
|
||||
|
||||
AT_CHECK([bison input.y -o input.c -v])
|
||||
AT_CHECK([bison -o input.c -v input.y])
|
||||
|
||||
# Check the contents of the report.
|
||||
AT_CHECK([cat input.output], [],
|
||||
@@ -266,7 +266,7 @@ exp: ;
|
||||
%%
|
||||
]])
|
||||
|
||||
AT_CHECK([bison -v input.y -o input.c])
|
||||
AT_CHECK([bison -v -o input.c input.y])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
@@ -327,7 +327,33 @@ int yylex (void);
|
||||
exp: "a";
|
||||
]])
|
||||
|
||||
AT_CHECK([bison input.y -o input.c])
|
||||
AT_CHECK([bison -o input.c input.y])
|
||||
AT_COMPILE([input.o], [-c input.c])
|
||||
AT_CLEANUP
|
||||
|
||||
|
||||
|
||||
## -------------------- ##
|
||||
## Characters Escapes. ##
|
||||
## -------------------- ##
|
||||
|
||||
|
||||
AT_SETUP([Characters Escapes])
|
||||
|
||||
AT_DATA([input.y],
|
||||
[%{
|
||||
void yyerror (const char *s);
|
||||
int yylex (void);
|
||||
%}
|
||||
[%%
|
||||
exp:
|
||||
'\'' "\'"
|
||||
| '\"' "\""
|
||||
| '"' "'"
|
||||
;
|
||||
]])
|
||||
|
||||
AT_CHECK([bison -o input.c input.y])
|
||||
AT_COMPILE([input.o], [-c input.c])
|
||||
AT_CLEANUP
|
||||
|
||||
@@ -532,7 +558,7 @@ else: "else" statement;
|
||||
%%
|
||||
]])
|
||||
|
||||
AT_CHECK([bison -v input.y -o input.c])
|
||||
AT_CHECK([bison -v -o input.c input.y])
|
||||
|
||||
# Check only the tables. We don't use --no-parser, because it is
|
||||
# still to be implemented in the experimental branch of Bison.
|
||||
@@ -573,7 +599,7 @@ static const unsigned char yyprhs[] =
|
||||
{
|
||||
0, 0, 3, 5, 6, 9, 14
|
||||
};
|
||||
static const signed char yyrhs[] =
|
||||
static const yysigned_char yyrhs[] =
|
||||
{
|
||||
8, 0, -1, 9, -1, -1, 10, 11, -1, 3,
|
||||
4, 5, 8, -1, 6, 8, -1
|
||||
@@ -604,16 +630,16 @@ static const unsigned char yydefact[] =
|
||||
3, 0, 0, 2, 0, 0, 1, 3, 4, 3,
|
||||
6, 5
|
||||
};
|
||||
static const signed char yydefgoto[] =
|
||||
static const yysigned_char yydefgoto[] =
|
||||
{
|
||||
-1, 2, 3, 4, 8
|
||||
};
|
||||
static const signed char yypact[] =
|
||||
static const yysigned_char yypact[] =
|
||||
{
|
||||
-2, -1, 4, -8, 0, 2, -8, -2, -8, -2,
|
||||
-8, -8
|
||||
};
|
||||
static const signed char yypgoto[] =
|
||||
static const yysigned_char yypgoto[] =
|
||||
{
|
||||
-8, -7, -8, -8, -8
|
||||
};
|
||||
@@ -621,7 +647,7 @@ static const unsigned char yytable[] =
|
||||
{
|
||||
10, 1, 11, 5, 6, 0, 7, 9
|
||||
};
|
||||
static const signed char yycheck[] =
|
||||
static const yysigned_char yycheck[] =
|
||||
{
|
||||
7, 3, 9, 4, 0, -1, 6, 5
|
||||
};
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ AT_SYNCLINES_COMPILE([syncline.c])
|
||||
AT_CHECK([[test "`cat stdout`" = 'syncline.c:1: @%:@error "1"' || exit 77]])
|
||||
|
||||
AT_DATA([[input.y]], [$2])
|
||||
AT_CHECK([bison input.y -o input.c])
|
||||
AT_CHECK([bison -o input.c input.y])
|
||||
AT_SYNCLINES_COMPILE([input.c])
|
||||
AT_CHECK([cat stdout], 0, [$3])
|
||||
AT_CLEANUP
|
||||
|
||||
+4
-4
@@ -144,7 +144,7 @@ AT_SETUP([Big triangle])
|
||||
# With 500 and the new parser, which consume far too much memory,
|
||||
# it gets killed too. Of course the parser is to be cleaned.
|
||||
AT_DATA_TRIANGULAR_GRAMMAR([input.y], [200])
|
||||
AT_CHECK([bison input.y -v -o input.c])
|
||||
AT_CHECK([bison -v -o input.c input.y])
|
||||
AT_COMPILE([input])
|
||||
AT_PARSER_CHECK([./input])
|
||||
|
||||
@@ -248,7 +248,7 @@ AT_DATA_HORIZONTAL_GRAMMAR([input.y], [1000])
|
||||
# Ask for 200 MiB, which should be plenty even on a 64-bit host.
|
||||
AT_INCREASE_DATA_SIZE(204000)
|
||||
|
||||
AT_CHECK([bison input.y -v -o input.c])
|
||||
AT_CHECK([bison -v -o input.c input.y])
|
||||
AT_COMPILE([input])
|
||||
AT_PARSER_CHECK([./input])
|
||||
|
||||
@@ -372,7 +372,7 @@ AT_DATA_LOOKAHEADS_GRAMMAR([input.y], [1000])
|
||||
# Ask for 200 MiB, which should be plenty even on a 64-bit host.
|
||||
AT_INCREASE_DATA_SIZE(204000)
|
||||
|
||||
AT_CHECK([bison input.y -v -o input.c])
|
||||
AT_CHECK([bison -v -o input.c input.y])
|
||||
AT_COMPILE([input])
|
||||
AT_PARSER_CHECK([./input])
|
||||
|
||||
@@ -429,7 +429,7 @@ main (int argc, const char **argv)
|
||||
return yyparse ();
|
||||
}
|
||||
]])
|
||||
AT_CHECK([bison input.y -o input.c])
|
||||
AT_CHECK([bison -o input.c input.y])
|
||||
AT_COMPILE([input])
|
||||
])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user