Commit Graph
100 Commits
Author SHA1 Message Date
Paul Eggert 4c04c52a9d * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for putsym. 2005-02-24 17:24:23 +00:00
Paul Eggert a730d142be (Mfcalc Symtab): Correct the prototype for putsym. 2005-02-24 17:23:57 +00:00
Paul Eggert a61e1620e7 * doc/bison.texinfo: minor typo fixes 2005-02-23 09:15:27 +00:00
Paul Eggert e4f85c39b2 (Language and Grammar): some -> same
(Epilogue): int he -> in the
2005-02-23 09:15:09 +00:00
Paul Eggert 9ec93868c1 Fix $ in test names. 2005-02-08 00:37:43 +00:00
Paul Eggert d46c3fc694 Renamed from "Invalid \$n", to work around an Autoconf bug with dollar
signs in test names.
2005-02-07 23:14:55 +00:00
Paul Eggert d6d67dbdcb (Improper handling of embedded actions and dollar(-N) in GLR parsers):
Renamed from "Improper handling of embedded actions and $-N in GLR
parsers", work around an Autoconf bug with dollar signs in test names.
2005-02-07 23:14:22 +00:00
Paul Eggert 73ce7e7e63 * src/vcg.c (output_graph): G_VIEW -> normal_view. 2005-01-28 22:07:09 +00:00
Paul Eggert f8b30d02ec (output_graph): G_VIEW -> normal_view in case someone
wants to redefine G_VIEW.
2005-01-28 22:06:55 +00:00
Paul Eggert 2e72b98ed8 * src/vcg.c (get_view_str): Remove case for normal_view. 2005-01-27 22:03:21 +00:00
Paul Eggert a8999f947d (get_view_str): Remove case for normal_view. 2005-01-27 22:03:07 +00:00
Paul Eggert ccf830a458 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug. 2005-01-24 23:48:11 +00:00
Paul Eggert 9b9642fca4 (O0CFLAGS, O0CXXFLAGS): Fix quoting bug. 2005-01-24 23:47:49 +00:00
Paul Eggert e0d634e5c3 * doc/bison.texinfo: Change @dircategory from "GNU programming
tools" to "Software development".
2005-01-24 23:26:33 +00:00
Paul Eggert e62f1a8991 Change @dircategory from "GNU programming tools" to "Software development". 2005-01-24 23:26:17 +00:00
Paul Eggert 7bbc8cb035 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands. 2005-01-23 08:38:33 +00:00
Paul Eggert 38989c080e (AT_CHECK_DOXYGEN): Don't use options after operands. 2005-01-23 08:37:35 +00:00
Paul Eggert b4fb989f02 Regenerate. 2005-01-21 19:29:25 +00:00
Paul Eggert 08b770bc1b * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register". 2005-01-21 19:12:51 +00:00
Paul Eggert cb530ce9e2 (YYCOPY, yystpcpy, yyparse): Remove "register". 2005-01-21 19:12:32 +00:00
Paul Eggert e105489549 Regenerate. 2005-01-17 09:35:41 +00:00
Paul Eggert 95f22ad2a7 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
gcc -Wswitch-default.
* data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
* data/yacc.c (yyparse): Likewise.
2005-01-17 09:33:57 +00:00
Paul Eggert d229d15c76 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
already.  Let config.h define any nonstandard values.
2005-01-13 00:13:37 +00:00
Paul Eggert deb63d8117 (OUTPUT_EXT, TAB_EXT): Define only if not defined
already.  Let config.h define any nonstandard values.
2005-01-13 00:13:21 +00:00
Paul Eggert ecadd90f94 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10). 2005-01-10 18:22:30 +00:00
Paul Eggert 419ab1055e (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10). 2005-01-10 18:22:11 +00:00
Paul Eggert 213744b51e * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
being defined and not used.
* data/lalr1.cc (yyparse): Likewise.
Use "if (false)" rather than "if (0)".
2005-01-08 05:22:36 +00:00
Paul Eggert b47217154a (yyparse): Pacify non-GCC compilers about yyerrorlab
being defined and not used.
Use "if (false)" rather than "if (0)".
2005-01-08 05:22:19 +00:00
Paul Eggert c7a65b99a6 (yyparse): Pacify non-GCC compilers about yyerrorlab
being defined and not used.
2005-01-08 05:21:46 +00:00
Paul Eggert 249d3236d0 TODO: Mention that we should allow NUL bytes in tokens. 2005-01-05 21:35:46 +00:00
Paul Eggert d521d95a3d Mention that we should support NUL bytes in tokens. 2005-01-05 21:35:08 +00:00
Paul Eggert 987cc1fb28 * src/scan-skel.l (<<EOF>>): Don't close standard output. 2005-01-03 07:52:46 +00:00
Paul Eggert 7ec5ab2e48 (<<EOF>>): Don't close standard output.
Problem reported by Hans Aberg.
2005-01-03 07:52:31 +00:00
Paul Eggert 08fe02d9fc Fix bug when stdout is closed. Update copyright to 2005. 2005-01-01 09:28:00 +00:00
Paul Eggert 6201a1a70f (version): Happy new year; update overall
program copyright date from 2004 to 2005.
2005-01-01 09:27:38 +00:00
Paul Eggert f1bbfccee2 (AT_CHECK_OUTPUT): New arg SHELLIO.
(Output file names.): Add a test for the case when standard output
is closed.
2005-01-01 09:23:41 +00:00
Paul Eggert 1821246647 ("@output ".*\n): Don't close standard output. 2005-01-01 09:23:16 +00:00
Paul Eggert 010c0266ef * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
to fix an oversight in the Bison 2.0 manual.
2004-12-26 07:26:32 +00:00
Paul Eggert 592fde9564 Update FDL license revision to 1.2. 2004-12-26 07:25:05 +00:00
Paul Eggert 508a43be8c Bump version number to 2.0a. 2004-12-26 06:50:35 +00:00
Paul Eggert 3a4734aa97 Fix changelog entry for configure.ac. 2004-12-26 06:22:17 +00:00
Paul Eggert c935d93471 * tests/torture.at (Exploding the Stack Size with Alloca): Set
YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
otherwise, we're not testing alloca.  Unfortunately there's no
simple way to consult HAVE_ALLOCA here.

(This made it into 2.0.)
2004-12-26 06:13:31 +00:00
Paul Eggert 577d7c33df (Exploding the Stack Size with Alloca): Set
YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
otherwise, we're not testing alloca.  Unfortunately there's no
simple way to consult HAVE_ALLOCA here.
2004-12-26 06:12:18 +00:00
Paul Eggert da436e4383 Regenerate. 2004-12-26 05:51:10 +00:00
Paul Eggert da12206a7c Version 2.0. 2004-12-26 05:50:28 +00:00
Paul Eggert 82de6b0dde Reformat news for version 2.0. 2004-12-26 05:49:52 +00:00
Paul Eggert 6c7ffa8380 (AC_INIT): Bump version to 2.0. 2004-12-26 05:49:16 +00:00
Paul Eggert 895789c673 (yydestruct_): Pacify unused variable warning for yymsg, too. 2004-12-26 05:42:27 +00:00
Paul Eggert 55a91a8242 (new_itemsets): Use memset rather than zeroing by hand. This avoids a
warning about comparing int to size_t when GCC warnings are enabled.
2004-12-26 05:26:30 +00:00
Paul Eggert d7e14fc000 * NEWS: Bison-generated parsers no longer default to using the
alloca function (when available) to extend the parser stack, due
to widespread problems in unchecked stack-overflow detection.
* data/glr.c (YYMAXDEPTH): Remove undef when zero.  It's the user's
responsibility to set it to a positive value.  This lets the user
specify a value that is not a preprocessor constant.
* data/yacc.c (YYMAXDEPTH): Likewise.
(YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
* doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
to be a compile-time constant.  However, explain the constraints on it.
Also, explain the constraints on YYINITDEPTH.
(Table of Symbols): Explain that alloca is no longer the default.
Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
to 1.
2004-12-22 21:19:47 +00:00
Paul Eggert 0a2c51373a * doc/bison.texinfo (Location Default Action): Mention that n must be zero when k is. 2004-12-22 18:28:26 +00:00
Paul Eggert f28ac696ee (Location Default Action): Mention that n must be zero when k is zero. 2004-12-22 18:26:37 +00:00
Paul Eggert 9bec482e39 (YYLLOC_DEFAULT): Use GNU spacing conventions. 2004-12-20 03:44:10 +00:00
Paul Eggert f6fbd3da9d Remove uses of 'short int' and 'unsigned short int' in the parser generators.
* src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
Use size_t, not int or short int, to count objects.
* src/closure.c (nritemset, closure): Likewise.
* src/closure.h (nritemset, closure): Likewise.
* src/nullable.c (nullable_compute): Likewise.
* src/print.c (print_core): Likewise.
* src/print_graph.c (print_core): Likewise.
* src/state.c (state_compare, state_hash): Likewise.
* src/state.h (struct state): Likewise.
* src/tables.c (default_goto, goto_actions): Likewise.

* src/gram.h (rule_number, rule): Use int, not short int.
* src/output.c (prepare_rules): Likewise.
* src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
errs, reductions): Likewise.
* src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
Likewise.
* src/tables.c (vector_number, tally, action_number,
ACTION_NUMBER_MINIMUM): Likewise.
* src/output.c (muscle_insert_short_int_table): Remove.
2004-12-17 20:29:19 +00:00
Paul Eggert 76dcf299b7 Regenerate. 2004-12-16 20:42:40 +00:00
Paul Eggert bc82c5a593 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
Parenthesize rhs to avoid obscure problems with mistakes like
"foo$$bar = foo$1bar;".  Problem reported by twlevo at xs4all.
* data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
b4_rhs_location): Likewise.
* data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
b4_rhs_location): Likewise.
2004-12-16 20:41:54 +00:00
Paul Eggert 1e547e6e8c Fix some problems reported by twlevo at xs4all. 2004-12-16 00:09:28 +00:00
Paul Eggert ea193b9dae * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
(struct node, struct graph):
Rename member expand to stretch.  All uses changed.
(struct graph): Remove member layoutalgorithm.  All uses removed.
* src/vcg.c (get_layoutalgorithm_str): Remove.  All uses removed.
* src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
All uses changed.
(N_STRETCH): Rename from N_EXPAND.  All uses changed.
2004-12-16 00:09:08 +00:00
Paul Eggert 3239db74b1 (symbol_new): Report an error if the input grammar contains too many
symbols.
2004-12-16 00:08:21 +00:00
Paul Eggert e603eaa5d4 * data/glr.c: Fix yyerror_range usage. 2004-12-14 18:49:09 +00:00
Paul Eggert 63d72da75b (struct yyGLRStack): yyerror_range now has 3 items,
not 2, since it's not portable to subtract 1 from the start of an
array.  The new item 0 is never set or used.  All uses changed.

(yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
the default definition of YYLLOC_DEFAULT.  Problem reported
by Frank Heckenbach.
2004-12-14 18:48:42 +00:00
Paul Eggert bbd3fa0c61 Regenerate. 2004-12-12 09:29:18 +00:00
Paul Eggert fafb007d45 Fix YYRHSLOC problem reported by Frank Heckenbach. 2004-12-12 09:26:07 +00:00
Paul Eggert 9fafc4ddfd (YYRHSLOC): Don't have two definitions, one for
the normal case and one for the error case.  Just use the
first one uniformly.  Problem reported by Frank Heckenbach.
(YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
use exactly the same macro in both places.
(yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
so that the normal-case YYRHSLOC works for the error case too.
All uses changed.
2004-12-12 09:25:45 +00:00
Paul Eggert 24e0cbd0e1 (YYRHSLOC): New macro, taken from glr.c.
(YYLLOC_DEFAULT): Use the same macro as glr.c.
2004-12-12 09:25:24 +00:00
Paul Eggert 766de5eb7c (Location Default Action): Don't claim that
we have an array of locations.  Use the same macro for both glr
and lalr parsers.  Mention YYRHSLOC.  Mention what happens when
the index is 0.
2004-12-12 09:24:56 +00:00
Paul Eggert a4e1a53bf9 * HACKING: Update email addresses to send announcements to. 2004-12-11 08:06:29 +00:00
Paul Eggert bf46a7c193 Update email addresses to send announcements to. 2004-12-11 08:06:10 +00:00
Paul Eggert 48814dcd46 * configure.ac (AC_INIT): Bump version to 1.875f. 2004-12-11 07:23:35 +00:00
Paul Eggert 1c1609b7d0 (AC_INIT): Bump version to 1.875f. 2004-12-11 07:23:21 +00:00
Paul Eggert 68b082af0c Update log file entry for latest checkin to tests/actions.at. 2004-12-11 07:08:34 +00:00
Paul Eggert a14a26fa44 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
specifying whether the test should be skipped.  Use it tp
specify that the [%defines %skeleton "lalr1.cc"] tests currently
fail on some hosts, and should be skipped.
2004-12-11 07:07:48 +00:00
Paul Eggert 5bdca67817 Update GNU m4 URL. 2004-12-11 06:28:24 +00:00
Paul Eggert 337116ba3d Version 1.875e. 2004-12-11 06:26:25 +00:00
Paul Eggert db5c43f791 Include "complain.h", for "fatal". 2004-12-11 06:16:44 +00:00
Paul Eggert 7b21ee09da (relation_print, relation_digraph):
Relation sizes are of type relation_node, not size_t (this is
merely a doc fix, since the two types are equivalent).
(relation_transpose): Relation sizes are of type relation_node,
not int.
(top, infinity): Now of type relation_node, not int.
(traverse, relation_transpose): Use relation_node, not int.
2004-12-11 06:13:07 +00:00
Paul Eggert 88636fbd49 (relation_print, relation_digraph):
Relation sizes are of type relation_node, not size_t (this is
merely a doc fix, since the two types are equivalent).
(relation_transpose): Relation sizes are of type relation_node,
not int.
2004-12-11 06:12:41 +00:00
Paul Eggert 80a183578b (yyuserAction, yyrecoverSyntaxError): Mark args
with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
(yyparse): Remove unused local introduced in 2004-10-25 patch.
2004-12-11 06:07:11 +00:00
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