Commit Graph
100 Commits
Author SHA1 Message Date
Paul Eggert 046ac74eef (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
specifying whether the test is expected to fail.  Use it tp
specify that the [%defines %skeleton "lalr1.cc"] tests currently
fail.
2004-12-11 05:38:19 +00:00
Paul Eggert 161a71f34c Correct URLs to email messages, so that they work with new GNU
organization.
2004-12-11 04:40:53 +00:00
Paul Eggert 267757362f Add Alexandre Duret-Lutz, Baron Schwartz, Frank Heckenbach, Guido
Trentalancia, Peter Fales, Troy A. Johnson, Vin Shelton.  Change Paul
Eggert's email address.
2004-12-11 04:40:20 +00:00
Paul Eggert da2a7671e1 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
changed to use xcalloc, xnmalloc, xnrealloc, respectively,
unless otherwise specified below.

* src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
to allocate kernel_base, kernel_items, kernel_size, since
they needn't be initialized to 0.
(allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
* src/closure.c (new_closure): Likewise, for itemset.
* src/derives.c (derives_compute): Likewise, for delts, derives, q.
* src/lalr.c (set_goto_map): Likewise, for temp_map.
(initialize_F): Likewise, for reads, edge, reads[i], includes[i].
(build_relations): Likewise for edge, states1, includes.
* src/nullable.c (nullable_compute): Likewise, for squeue, relts.
* src/reader.c (packgram): Likewise, for ritem, rules.
* src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
* src/relation.c (relation_digraph): Likewise for VERTICES.
(relation_transpose): Likewise for new_R, end_R.
* src/symtab.c (symbols_token_translations_init): Likewise for
token_translations.
* src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
(token_actions): Likewise for yydefact, actrow, conflrow,
conflict_list.
(save_column): Likewise for froms[symno], tos[symno].
(goto_actions): Likewise for state_count.
(pack_table): Likewise for base, pos, check.
(tables_generate): Likewise for width.

* src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
for initial core.  Just have a separate core, so we needn't worry
about whether kernel_size and kernel_base are initialized.

* src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
kernel_size, kernel_items): Remove unnecessary initialization.
* src/conflicts.c (conflicts): Likewise.
* src/derives.c (derives): Likewise.
* src/muscle_tablc (muscle_insert): Likewise.
* src/relation.c (relation_digraph): Likewise.
* src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
conflrow, conflict_table, conflict_list, table, check):
Likewise.

* src/closure.c (new_closure): Arg is of type unsigned int, not int.
This is because all callers pass unsigned int.
* src/closure.h (new_closure): Likewise.

* src/lalr.c (initialize_F): Initialize reads[i] in all cases.
(build_relations): Initialize includes[i] in all cases.
* src/reader.c (packgram): Always initialize rules[ruleno].prec
and rules[ruleno].precsym.  Initialize members in order.
* src/relation.c (relation_transpose): Always initialize new_R[i]
and end_R[i].
* src/table.c (conflict_row): Initialize 0 at end of conflict_list.

* src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
conflict_list[0] was always 0, but now it isn't initialized.

* src/table.c (table_grow): When conflict_table grew, the grown
area wasn't cleared.  Fix this.
2004-12-10 07:50:44 +00:00
Paul Eggert 86a54ab102 (allocate_itemsets): Use xnmalloc, not xcalloc,
to allocate kernel_base, kernel_items, kernel_size, since
they needn't be initialized to 0.
(set_states): Don't reuse kernel_size and kernel_base
for initial core.  Just have a separate core, so we needn't worry
about whether kernel_size and kernel_base are initialized.
(shift_symbol, redset, shiftset, kernel_base,
kernel_size, kernel_items): Remove unnecessary initialization.
2004-12-10 07:48:43 +00:00
Paul Eggert 8175837596 (CALLOC, MALLOC, REALLOC): Remove. 2004-12-10 07:47:58 +00:00
Paul Eggert 67961b9ea0 Add strdup.m4. 2004-12-09 07:55:04 +00:00
Paul Eggert 44aabce335 Add strdup.c, strdup.h. 2004-12-09 07:54:47 +00:00
Paul Eggert 00baeeac7e goto-number minor cleanup. 2004-12-08 07:30:21 +00:00
Paul Eggert 78143b92af (save_column, default_goto):
Use goto_number, not int, for goto numbers.
2004-12-08 05:54:51 +00:00
Paul Eggert 60e3ecc734 (set_goto_map): Don't allow ngotos to equal
GOTO_NUMBER_MAXIMUM, since we occasionally compute
ngotos + 1 without checking for overflow.
(build_relations): Use END_NODE, not -1, to denote end of edges.
(set_goto_map, map_goto, initialize_F, add_loopback_edge,
build_relations): Use goto_number, not int, for goto numbers.
2004-12-08 05:54:20 +00:00
Paul Eggert b03595a5c2 (GOTO_NUMBER_MAXIMUM): New macro. 2004-12-08 05:53:55 +00:00
Paul Eggert 78e526d5fa * bootstrap (gnulib_modules): Add extensions. 2004-11-23 08:50:37 +00:00
Paul Eggert 42e826a47d (gnulib_modules): Add extensions. 2004-11-23 08:50:17 +00:00
Paul Eggert afbb696d19 XFREE -> free 2004-11-22 21:05:25 +00:00
Paul Eggert b9b51bf05a Fix wording problem in comment. 2004-10-27 22:22:51 +00:00
Paul Eggert 97cbc73e2a * data/glr.c (yyloc_default): Remove; not used. 2004-10-27 22:20:01 +00:00
Paul Eggert 288006a259 (yyloc_default): Remove; not used. 2004-10-27 22:19:44 +00:00
Paul Eggert f74b6f91f6 Goto numbers are no longer arbitrarily limited to 16-bit counts. 2004-10-25 16:26:20 +00:00
Paul Eggert 93602febc0 Remove some arbitrary limits on goto numbers and relations. 2004-10-22 23:35:17 +00:00
Paul Eggert 7886c2d419 Use size_t rather than unsigned int in previous patch. 2004-10-22 23:14:00 +00:00
Paul Eggert ed4cdb7afc (END_NODE): New macro.
(relation_node): Now unsigned int, not short int.
2004-10-22 23:10:39 +00:00
Paul Eggert 0859e438eb (relation_print, traverse, relation_transpose):
Check for END_NODE rather than looking at sign.
2004-10-22 23:10:07 +00:00
Paul Eggert f55ec70868 (goto_number): Now unsigned int, not short int.
(GOTO_NUMBER_MAXIMUM): Remove.
2004-10-22 23:09:27 +00:00
Paul Eggert 4cf44c0045 (goto_map, ngotos, from_state, to_state): Omit
initial values, since they're never used.
(set_goto_map): ngotos is now unsigned, so test for overflow
2004-10-22 23:08:33 +00:00
Paul Eggert dba08b0461 doc/bison.texinfo (Language and Grammar): In example, "int" is a
keyword, not an identifier.
2004-10-22 18:12:50 +00:00
Paul Eggert 14d4662b83 (Language and Grammar): In example, "int" is a keyword, not an identifier. 2004-10-22 18:10:59 +00:00
Paul Eggert 2ed24dd8c7 Regenerate. 2004-10-09 18:08:21 +00:00
Paul Eggert 146bc99dcf .cvsignore fixes to accommodate gnulib changes,
and the practice of naming build directories "_build".
2004-10-09 17:59:04 +00:00
Paul Eggert 7d1be3bdff Add "*_gl.m4". 2004-10-09 17:57:39 +00:00
Paul Eggert bd22e8363a Add getopt_.h, xalloc-die.c. 2004-10-09 17:57:21 +00:00
Paul Eggert 13c29075c5 Add "_*". Sort. 2004-10-09 17:57:06 +00:00
Paul Eggert 3fee967f83 Fix comment in latest checkin; there wasn't a bug. 2004-09-27 22:06:45 +00:00
Paul Eggert 5b7e1e73e6 * src/parse-gram.y (add_param): Fix bug where NUL was mishandled. 2004-09-27 22:04:13 +00:00
Paul Eggert ead9e56eb2 (add_param): Fix bug where NUL was mishandled.
Avoid the use of strchr to avoid future recurrences.
2004-09-27 22:03:42 +00:00
Paul Eggert 2ed973bf1d Regenerate. 2004-08-18 20:35:31 +00:00
Paul Eggert 9378b5082b Adjust to latest gnulib. 2004-08-13 14:29:05 +00:00
Paul Eggert a9f027b9c4 Adjust to latest gnulib.
(gnulib_modules): Add xalloc-die.
Set LC_ALL=C so that file names sort consistently.
Prefer the gnulib copies of gettext.m4, glibc21.m4,
inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
uintmax_t.m4, ulonglong.m4.
(intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
po.m4 since we are now using _gl.m4 instead.
2004-08-13 14:28:43 +00:00
Paul Eggert 87a8ad5cd3 Remove src/scan-action.l. 2004-08-11 04:19:14 +00:00
Paul Eggert dca81a78f8 uniqstr wasn't being used for handle_syncline like it should. 2004-08-08 04:57:06 +00:00
Paul Eggert c9cbf7c58e Fix bug with non-%union parsers that have printers or destructors,
which led to a Bison core dump.
2004-07-22 14:42:11 +00:00
Paul Eggert ac700aa646 (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
UNION-FLAG.  All callers changed.
(_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
Use type char, not unsigned int, when declaring an array of char;
this lets us remove a cast.
(Printers and Destructors): Add non-%union test cases.
2004-07-22 14:40:21 +00:00
Paul Eggert ee42c6166b (symbol_destructors_output, symbol_printers_output):
Don't assume %union.
2004-07-22 14:39:58 +00:00
Paul Eggert c0659069d0 (yystype) [defined YYSTYPE]: Define to YYSTYPE, not to our own type. 2004-07-22 14:39:34 +00:00
Paul Eggert 60c8294801 (b4_symbol_actions): Don't assume %union was used. 2004-07-22 14:39:03 +00:00
Paul Eggert fa7e68c397 Reorganize GLR section a bit. 2004-06-22 06:50:29 +00:00
Paul Eggert 0817d1eccb One more "lookahead" -> "look-ahead" change. 2004-06-21 21:01:42 +00:00
Paul Eggert 99a9344e77 New section "Simple GLR Parsers". 2004-06-21 20:55:20 +00:00
Paul Eggert 85f23fae45 Regenerate. 2004-06-21 20:51:32 +00:00
Paul Eggert 8dd162d3ff Use "look-ahead" instead of "lookahead", consistently. 2004-06-21 20:20:31 +00:00
Paul Eggert 57a90331bd Update location of patched M4 distribution. 2004-06-03 22:38:23 +00:00
Paul Eggert 69daa921b8 Update location of patched M4 version. 2004-06-03 22:28:57 +00:00
Paul Eggert 8ed3234a14 Don't assume the C++ compiler takes the same arguments as the C compiler. 2004-05-30 18:58:00 +00:00
Paul Eggert 0797198341 Fix some "make check" problems with Tru64 C++. 2004-05-30 00:56:57 +00:00
Paul Eggert 2905865228 Workaround for SGI C++ compiler. 2004-05-29 07:16:29 +00:00
Paul Eggert fd418816b9 Increase prerequisite version numbers to match what the code really needs. 2004-05-27 20:51:16 +00:00
Paul Eggert 329d23c5d6 Regenerate. 2004-05-27 07:40:12 +00:00
Paul Eggert 62cb8a9920 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug.
* configure.ac (AC_PREREQ): Bump to 2.58.
2004-05-27 07:38:17 +00:00
Paul Eggert caa52c10c5 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to 0.11.5.
* bootstrap: Remove gettext version checking.
2004-05-26 19:25:21 +00:00
Paul Eggert 5c9be03d6d Also mention that %union can depend on prerequisite types. 2004-05-26 17:45:45 +00:00
Paul Eggert 2cef3017cd * README: Mention GNU m4 1.4 bugs and Akim's patched version.
* README-alpha: Don't tell people not to package this.
2004-05-26 07:20:06 +00:00
Paul Eggert b9c85d5cef * bootstrap: Don't assume $(...) works; use ... instead. 2004-05-26 06:46:02 +00:00
Paul Eggert 4bfd5e4e53 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's put into
the -d output file.
2004-05-25 19:09:01 +00:00
Paul Eggert 6712933e0f Undo change made earlier today: it caused autopoint to not bring
in ABOUT-NLS.  Ouch.  Instead, substitute our own diagnostic for
autopoint's.
2004-05-25 05:43:14 +00:00
Paul Eggert 6a36ff9495 The gettext version checking is causing more trouble than it's curing;
remove it.
2004-05-24 20:08:54 +00:00
Paul Eggert 209ea708c4 Ensure that the C++ compiler used for testing actually works on a
simple test program; if not, skip the C++-related tests.
2004-05-24 06:58:02 +00:00
Paul Eggert 383e69dc79 Output yylloc macro defn in glr.c even if locations are not being generated. 2004-05-21 22:23:04 +00:00
Paul Eggert 41ca25499e * configure.ac (AC_INIT): Update to 1.875e. 2004-05-21 22:12:21 +00:00
Paul Eggert e476c87d93 Version 1.875d. 2004-05-21 21:03:41 +00:00
Paul Eggert 233a88ad11 Use size_t (not unsigned int) for hashes, since the gnulib hash module
now uses size_t.
2004-05-07 07:35:10 +00:00
Paul Eggert 9668e2be96 Don't DEFUN AM_INTL_SUBDIR twice. 2004-05-03 23:10:25 +00:00
Paul Eggert a76ca26309 Regenerate. 2004-05-03 07:58:53 +00:00
Paul Eggert 12ffdd2835 * src/parse-gram.y: Put copyright notice inside %{ %} so it
gets copied to the output file.
2004-05-03 07:57:06 +00:00
Paul Eggert 4febdd9667 Reject unescaped newlines in strings. 2004-05-03 07:42:52 +00:00
Paul Eggert e23d0dd71e Remove more 'intl'-related files while bootstrapping. 2004-05-03 07:36:12 +00:00
Paul Eggert 1f65350a16 Get files from the gnulib and po repositories, instead of relying
on them being in our CVS.  Upgrade to latest versions of gnulib and Automake.
2004-04-28 20:00:56 +00:00
Paul Eggert f97de3247f (GZIP_ENV): Don't use --rsyncable if gzip doesn't
support it.  (The latest stable gzip doesn't.)
2004-04-28 19:52:27 +00:00
Paul Eggert 6e26ca8c27 Remove more K&R C support. 2004-04-28 06:52:51 +00:00
Paul Eggert b970803c91 Rewrite so that subpipe.h can stand alone. Assume C89 or better. 2004-04-28 06:30:05 +00:00
Paul Eggert 126e375187 Remove PARAMS. 2004-04-28 06:22:58 +00:00
Paul Eggert 7d7d666369 Remove PARAMS and upgrade to latest obstack.h. 2004-04-28 06:15:34 +00:00
Paul Eggert ca6f187f64 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
unused declaration.
2004-04-28 06:06:31 +00:00
Paul Eggert 0f53f2226d (%union synch line): Put a dummy member in
the union, because empty unions aren't allowed in C.
Caught by GCC 3.4.0.
2004-04-28 06:03:54 +00:00
Paul Eggert 45d5982f04 (Parser::stos_) [! YYDEBUG]: Define even in this
case, as stos_ is now used by destructors due to the 2004-02-09
change.
2004-04-28 05:48:39 +00:00
Paul Eggert 1f916a78e6 Update copyright to 2004. 2004-04-13 17:43:15 +00:00
Paul Eggert 4f16766c00 * src/conflicts.c (conflicts_print): Correct format string typo:
use `%%' to produce literal `%'.  (trivial change)
2004-04-13 17:42:59 +00:00
Paul Eggert 584bbcd839 Regenerate. 2004-03-31 00:41:30 +00:00
Paul Eggert 779e7ceb93 Use 'short int' rather than 'short', and similarly for 'long', 'unsigned', etc. 2004-03-31 00:37:21 +00:00
Paul Eggert 2ae64eed27 (version): Update copyright year to 2004. 2004-03-30 08:11:20 +00:00
Paul Eggert 1452af69b4 Add support for hex token numbers. 2004-03-08 20:49:34 +00:00
Paul Eggert 006d217ddd (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from compilers. 2004-02-25 21:13:00 +00:00
Paul Eggert 6a60c4cf45 Add a marker for when 1.875c was published. 2004-02-25 20:23:33 +00:00
Paul Eggert 0b31edd3e1 Regenerate. 2004-02-02 22:52:54 +00:00
Paul Eggert dd0e0635ec Replace INCLUDES with AM_CPPFLAGS, fixing a bug in src/Makefile.am
reported by Paul Hilfinger.
2004-02-02 22:36:49 +00:00
Paul Eggert d0d5aa6425 (yytokenName): Bullet-proof against YYEMPTY token.
(yyreportSyntaxError): Handle case where lookahead token is
YYEMPTY.
2004-02-02 22:35:53 +00:00
Paul Eggert eda429346a a -> an (minor typo fix) 2003-10-21 17:42:48 +00:00
Paul Eggert 6a5ecb38fc Don't run 'testsuite --clean' if testsuite doesn't exist. 2003-10-07 23:34:20 +00:00
Paul Eggert 92ac370570 Do not allow NUL bytes in string literals or character constants. 2003-10-07 07:32:57 +00:00
Paul Eggert 91d2c560a8 Don't document %no-default-prec for now. 2003-10-05 07:34:36 +00:00
Paul Eggert 0cc3da3a4e In GLR grammars, $N and @N now yield non-modifiable lvalues. 2003-10-05 06:46:53 +00:00