/[bison]/bison/src/tables.c
ViewVC logotype

Diff of /bison/src/tables.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by akim, Wed Jul 31 21:52:00 2002 UTC revision 1.2 by akim, Thu Aug 1 18:12:11 2002 UTC
# Line 732  pack_vector (vector_number_t vector) Line 732  pack_vector (vector_number_t vector)
732        for (k = 0; ok && k < t; k++)        for (k = 0; ok && k < t; k++)
733          {          {
734            loc = j + state_number_as_int (from[k]);            loc = j + state_number_as_int (from[k]);
735            if (loc > (int) table_size)            if (loc >= (int) table_size)
736              table_grow (loc);              table_grow (loc);
737    
738            if (table[loc] != 0)            if (table[loc] != 0)
# Line 839  pack_table (void) Line 839  pack_table (void)
839    base_ninf = table_ninf_remap (base, nvectors, BASE_MIN);    base_ninf = table_ninf_remap (base, nvectors, BASE_MIN);
840    table_ninf = table_ninf_remap (table, high + 1, ACTION_MIN);    table_ninf = table_ninf_remap (table, high + 1, ACTION_MIN);
841    
   for (i = 0; i < nvectors; i++)  
     {  
       XFREE (froms[i]);  
       XFREE (tos[i]);  
       XFREE (conflict_tos[i]);  
     }  
   
   free (froms);  
   free (tos);  
   free (conflict_tos);  
842    free (pos);    free (pos);
843  }  }
844    
# Line 862  pack_table (void) Line 852  pack_table (void)
852  void  void
853  tables_generate (void)  tables_generate (void)
854  {  {
855      int i;
856    
857    /* That's a poor way to make sure the sizes are properly corelated,    /* That's a poor way to make sure the sizes are properly corelated,
858       in particular the signedness is not taking into account, but it's       in particular the signedness is not taking into account, but it's
859       not useless.  */       not useless.  */
# Line 877  tables_generate (void) Line 869  tables_generate (void)
869    width = XCALLOC (base_t, nvectors);    width = XCALLOC (base_t, nvectors);
870    
871    token_actions ();    token_actions ();
   bitsetv_free (LA);  
   free (LArule);  
872    
873    goto_actions ();    goto_actions ();
874    XFREE (goto_map + ntokens);    XFREE (goto_map + ntokens);
# Line 892  tables_generate (void) Line 882  tables_generate (void)
882    
883    free (tally);    free (tally);
884    free (width);    free (width);
885    
886      for (i = 0; i < nvectors; i++)
887        {
888          XFREE (froms[i]);
889          XFREE (tos[i]);
890          XFREE (conflict_tos[i]);
891        }
892    
893      free (froms);
894      free (tos);
895      free (conflict_tos);
896  }  }
897    
898    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26