mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Use C99-style bool instead of our own style.
This commit is contained in:
@@ -450,7 +450,7 @@ conflict_report_yacc (int src_num, int rrc_num)
|
||||
void
|
||||
conflicts_output (FILE *out)
|
||||
{
|
||||
bool printed_sth = FALSE;
|
||||
bool printed_sth = false;
|
||||
state_number_t i;
|
||||
for (i = 0; i < nstates; i++)
|
||||
{
|
||||
@@ -460,8 +460,8 @@ conflicts_output (FILE *out)
|
||||
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)
|
||||
@@ -487,7 +487,7 @@ conflicts_total_count (void)
|
||||
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;
|
||||
}
|
||||
@@ -516,7 +516,7 @@ conflicts_print (void)
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
12
src/print.c
12
src/print.c
@@ -366,7 +366,7 @@ print_reductions (FILE *out, state_t *state)
|
||||
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++;
|
||||
@@ -376,18 +376,18 @@ print_reductions (FILE *out, state_t *state)
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -400,11 +400,11 @@ static void
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -71,8 +71,8 @@ useful_production (rule_number_t r, bitset N0)
|
||||
|
||||
for (rhsp = rules[r].rhs; *rhsp >= 0; ++rhsp)
|
||||
if (ISVAR (*rhsp) && !bitset_test (N0, *rhsp - ntokens))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -353,14 +353,14 @@ reduce_output (FILE *out)
|
||||
}
|
||||
|
||||
{
|
||||
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)
|
||||
|
||||
@@ -266,13 +266,13 @@ state_compare (const state_t *s1, const state_t *s2)
|
||||
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
|
||||
|
||||
@@ -418,7 +418,7 @@ token_actions (void)
|
||||
/* 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)
|
||||
{
|
||||
@@ -433,9 +433,9 @@ token_actions (void)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user