]> git.saurik.com Git - bison.git/commitdiff
* src/reader.c (packgram): No longer end `ritem' with a 0
authorAkim Demaille <akim@epita.fr>
Mon, 6 May 2002 08:23:28 +0000 (08:23 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 6 May 2002 08:23:28 +0000 (08:23 +0000)
sentinel: it is not used.

ChangeLog
src/gram.h
src/reader.c
src/reduce.c

index d49ff431b090f59e2db24efa043b18afbf91f557..c65881056b8850eada2e27f20ee0a267c7a11912 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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...
index af4e636cac758950f83e80c1cad1a7d0007a0199..88946cffbed60774f3eeda3cfc354dee6c4e5084 100644 (file)
    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.
index 6106037c790e7cf5c2d244ee12ec738d1bb9ae5a..f075346012197a711ae9ff244e294de55c48a9a1 100644 (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)
index 61ad2b2e0657046058ae292827697f888a28ad96..2d51a24c9f55742c4578eea4169c1df7dfc6e9a6 100644 (file)
@@ -258,7 +258,7 @@ reduce_grammar_tables (void)
     nrules -= nuseless_productions;
   }
 
-  /* Adjust NRITEMS and NITEMS.  */
+  /* Adjust NRITEMS.  */
   {
     int r;
     int length;