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) |
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 |
|
|
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. */ |
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); |
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 |
|
|