rule_filter_t filter)
{
int r;
- bool first = TRUE;
+ bool first = true;
symbol_t *previous_lhs = NULL;
/* rule # : LHS -> RHS */
fprintf (out, "%s\n\n", title);
else if (previous_lhs && previous_lhs != rules[r].lhs)
fputc ('\n', out);
- first = FALSE;
+ first = false;
rule_lhs_print (&rules[r], previous_lhs, out);
rule_rhs_print (&rules[r], out);
previous_lhs = rules[r].lhs;
{
rule_t *rule = &rules[i];
item_number_t *r = NULL;
- int rhs_count = 0;
+ unsigned int rhs_itemno = rule->rhs - ritem;
+ unsigned int rhs_count = 0;
/* Find the last RHS index in ritems. */
for (r = rule->rhs; *r >= 0; ++r)
++rhs_count;
- fprintf (out, "%3d (%2d, %2d, %2d, %2d-%2d) %2d ->",
+ fprintf (out, "%3d (%2d, %2d, %2d, %2u-%2u) %2d ->",
i,
rule->prec ? rule->prec->prec : 0,
rule->prec ? rule->prec->assoc : 0,
rule->useful,
- rule->rhs - ritem,
- rule->rhs - ritem + rhs_count - 1,
+ rhs_itemno,
+ rhs_itemno + rhs_count - 1,
rule->lhs->number);
/* Dumped the RHS. */
for (r = rule->rhs; *r >= 0; r++)