You should have received a copy of the GNU General Public License
along with Bison; see the file COPYING. If not, write to
- the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* See comments in state.h for the data structures that represent it.
Note that useless productions (hence useless nonterminals) are
browsed too, hence we need to allocate room for _all_ the
symbols. */
- int count = 0;
- short int *symbol_count = xcalloc (nsyms + nuseless_nonterminals,
- sizeof *symbol_count);
+ size_t count = 0;
+ size_t *symbol_count = xcalloc (nsyms + nuseless_nonterminals,
+ sizeof *symbol_count);
for (r = 0; r < nrules; ++r)
for (rhsp = rules[r].rhs; *rhsp >= 0; ++rhsp)
static void
new_itemsets (state *s)
{
- int i;
+ size_t i;
if (trace_flag & trace_automaton)
fprintf (stderr, "Entering new_itemsets, state = %d\n", s->number);
- for (i = 0; i < nsyms; i++)
- kernel_size[i] = 0;
+ memset (kernel_size, 0, nsyms * sizeof *kernel_size);
nshifts = 0;
save_reductions (state *s)
{
int count = 0;
- int i;
+ size_t i;
/* Find and count the active items that represent ends of rules. */
for (i = 0; i < nritemset; ++i)