Commit Graph

2328 Commits

Author SHA1 Message Date
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
Akim Demaille
be3d9d4219 2004-11-23 Akim Demaille <akim@epita.fr>
* data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
	of #defining from yystype.
	Don't typedef yystype, C++ does not need it.
	This lets it possible to forward declare it as union.
2004-11-23 19:56:12 +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
Akim Demaille
c1f8f16a9b * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings. 2004-11-17 16:48:45 +00:00
Akim Demaille
9a1e998918 Alexandre Duret-Lutz <adl@gnu.org>
* data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
changes.
(YYCDEBUG): Adjust.
Use it instead of cdebug_.
(Parser::debug_stream, Parser::set_debug_stream): New.
(Parser::symprint_): Define cdebug_ for temporary backward
compatibility.
* tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
debug_stream ().
2004-11-17 16:17:50 +00:00
Akim Demaille
85c19f8819 Remove an entry that was not actually committed, yet. 2004-11-17 16:12:46 +00:00
Akim Demaille
68e11668e4 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
* tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
* tests/calc.at (_AT_DATA_CALC_Y): Ditto.
* tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
2004-11-17 14:19:37 +00:00
Akim Demaille
e268877e7e This ChangeLog entry belongs to the previous patch. 2004-11-17 14:13:38 +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
Akim Demaille
e342c3beaf * data/glr.c (YYRHSLOC): Move its definition next to its uses.
Introduce another definition to address simple location arrays.
(yyGLRStack): New member: yyerror_range.
(yyrecoverSyntaxError, yyparse): Update it.
(yyrecoverSyntaxError): Use it when shifting the error token to
have an accurate range, equivalent to the one computed by both
yacc.c and lalr1.cc.
* tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
that column numbers start at column 0, as per GNU Coding
Standards, the others tests, and the doc.
(_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
Adjust to the above change (first column is 0).
And adjust the location of the "<error>", now covering the whole
line.
2004-10-25 10:37:35 +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
Akim Demaille
df09ef2e8f * src/symtab.c (symbol_check_alias_consistency): Also check
type names, destructors, and printers.
Reported by Alexandre Duret-Lutz.
Recode the handling of associativity and precedence in terms
of symbol_precedence_set.
Accept no redeclaration at all, not even equal to the previous
value.
(redeclaration): New.
Use it to factor redeclaration complaints.
(symbol_make_alias): Don't set the type of the alias, let
symbol_check_alias_consistency do it as for other features.
* src/symtab.h (symbol): Add new member prec_location, and
type_location.
* src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
* tests/input.at (Incompatible Aliases): New.
2004-10-11 09:03:55 +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
Akim Demaille
e503aa60d5 * src/parse-gram.y (add_param): Fix the truncation of trailing
spaces.
2004-10-06 15:52:24 +00:00
Akim Demaille
2c0ddf03ab Word changes. 2004-10-05 09:58:58 +00:00