void
conflicts_output (FILE *out)
{
- bool printed_sth = FALSE;
+ bool printed_sth = false;
state_number_t i;
for (i = 0; i < nstates; i++)
{
fprintf (out, _("State %d contains "), i);
fprintf (out, "%s.\n",
conflict_report (count_sr_conflicts (s),
- count_rr_conflicts (s, TRUE)));
- printed_sth = TRUE;
+ count_rr_conflicts (s, true)));
+ printed_sth = true;
}
}
if (printed_sth)
if (conflicts[i])
{
count += count_sr_conflicts (states[i]);
- count += count_rr_conflicts (states[i], FALSE);
+ count += count_rr_conflicts (states[i], false);
}
return count;
}
if (conflicts[i])
{
src_total += count_sr_conflicts (states[i]);
- rrc_total += count_rr_conflicts (states[i], TRUE);
+ rrc_total += count_rr_conflicts (states[i], true);
}
}
if (redp->rules[j] != default_rule)
print_reduction (out, width,
symbols[i]->tag,
- redp->rules[j], TRUE);
+ redp->rules[j], true);
else
defaulted = 1;
count++;
if (defaulted)
print_reduction (out, width,
symbols[i]->tag,
- default_rule, TRUE);
+ default_rule, true);
defaulted = 0;
print_reduction (out, width,
symbols[i]->tag,
- redp->rules[j], FALSE);
+ redp->rules[j], false);
}
}
}
if (default_rule)
print_reduction (out, width,
- _("$default"), default_rule, TRUE);
+ _("$default"), default_rule, true);
}
print_actions (FILE *out, state_t *state)
{
/* Print shifts. */
- print_transitions (state, out, TRUE);
+ print_transitions (state, out, true);
print_errs (out, state);
print_reductions (out, state);
/* Print gotos. */
- print_transitions (state, out, FALSE);
+ print_transitions (state, out, false);
}
for (rhsp = rules[r].rhs; *rhsp >= 0; ++rhsp)
if (ISVAR (*rhsp) && !bitset_test (N0, *rhsp - ntokens))
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
}
{
- bool b = FALSE;
+ bool b = false;
int i;
for (i = 0; i < ntokens; i++)
if (!bitset_test (V, i) && !bitset_test (V1, i))
{
if (!b)
fprintf (out, "%s\n\n", _("Terminals which are not used"));
- b = TRUE;
+ b = true;
fprintf (out, " %s\n", symbols[i]->tag);
}
if (b)
int i;
if (s1->nitems != s2->nitems)
- return FALSE;
+ return false;
for (i = 0; i < s1->nitems; ++i)
if (s1->items[i] != s2->items[i])
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
static unsigned int
/* Find the rules which are reduced. */
if (!glr_parser)
for (r = 0; r < nrules; ++r)
- rules[r].useful = FALSE;
+ rules[r].useful = false;
for (i = 0; i < nstates; ++i)
{
{
for (j = 0; j < ntokens; ++j)
if (actrow[j] < 0 && actrow[j] != ACTION_MIN)
- rules[item_number_as_rule_number (actrow[j])].useful = TRUE;
+ rules[item_number_as_rule_number (actrow[j])].useful = true;
if (yydefact[i])
- rules[yydefact[i] - 1].useful = TRUE;
+ rules[yydefact[i] - 1].useful = true;
}
}