* src/reader.c (packgram): No longer end `ritem' with a 0

sentinel: it is not used.
This commit is contained in:
Akim Demaille
2002-05-06 08:23:28 +00:00
parent 9bbd181ae0
commit a900a6248c
4 changed files with 11 additions and 10 deletions

View File

@@ -1,3 +1,9 @@
2002-05-06 Akim Demaille <akim@epita.fr>
* src/reader.c (packgram): No longer end `ritem' with a 0
sentinel: it is not used.
2002-05-05 Akim Demaille <akim@epita.fr>
New experimental feature: display the lookaheads in the report and
@@ -30,7 +36,6 @@
* data/bison.simple, data/bison.c++: b4_token_number_max is now
b4_translate_max.
2002-05-05 Akim Demaille <akim@epita.fr>
* src/output.c (output_unsigned_int_table): New.
@@ -43,7 +48,6 @@
to compute types instead of constant types.
* tests/regression.at (Web2c Actions): Adjust.
2002-05-04 Akim Demaille <akim@epita.fr>
* src/symtab.h (SALIAS, SUNDEF): Rename as...

View File

@@ -81,11 +81,9 @@
contains minus R, which identifies it as the end of a portion and
says which rule it is for.
The portions of RITEM come in order of increasing rule number and
are followed by an element which is zero to mark the end. nritems
is the total length of ritem, not counting the final zero. Each
element of RITEM is called an "item" and its index in RITEM is an
item number.
The portions of RITEM come in order of increasing rule number.
NRITEMS is the total length of RITEM. Each element of RITEM is
called an "item" and its index in RITEM is an item number.
Item numbers are used in the finite state machine to represent
places that parsing can get to.

View File

@@ -1740,7 +1740,7 @@ packgram (void)
int ruleno;
symbol_list *p;
ritem = XCALLOC (item_number_t, nritems + 1);
ritem = XCALLOC (item_number_t, nritems);
rules = XCALLOC (rule_t, nrules) - 1;
itemno = 0;
@@ -1787,7 +1787,6 @@ packgram (void)
p = p->next;
}
ritem[itemno] = 0;
assert (itemno == nritems);
if (trace_flag)

View File

@@ -258,7 +258,7 @@ reduce_grammar_tables (void)
nrules -= nuseless_productions;
}
/* Adjust NRITEMS and NITEMS. */
/* Adjust NRITEMS. */
{
int r;
int length;