mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 09:43:03 +00:00
style: prefer bool to char
* src/state.h, src/state.c (state::consistent): Make it a bool. Adjust dependencies.
This commit is contained in:
@@ -329,7 +329,7 @@ state_lookahead_tokens_count (state *s, bool default_reduction_only_for_accept)
|
|||||||
&& default_reduction_only_for_accept))
|
&& default_reduction_only_for_accept))
|
||||||
n_lookahead_tokens += rp->num;
|
n_lookahead_tokens += rp->num;
|
||||||
else
|
else
|
||||||
s->consistent = 1;
|
s->consistent = true;
|
||||||
|
|
||||||
return n_lookahead_tokens;
|
return n_lookahead_tokens;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ state_new (symbol_number accessing_symbol,
|
|||||||
res->reductions = NULL;
|
res->reductions = NULL;
|
||||||
res->errs = NULL;
|
res->errs = NULL;
|
||||||
res->state_list = NULL;
|
res->state_list = NULL;
|
||||||
res->consistent = 0;
|
res->consistent = false;
|
||||||
res->solved_conflicts = NULL;
|
res->solved_conflicts = NULL;
|
||||||
res->solved_conflicts_xml = NULL;
|
res->solved_conflicts_xml = NULL;
|
||||||
|
|
||||||
|
|||||||
@@ -81,6 +81,8 @@
|
|||||||
#ifndef STATE_H_
|
#ifndef STATE_H_
|
||||||
# define STATE_H_
|
# define STATE_H_
|
||||||
|
|
||||||
|
# include <stdbool.h>
|
||||||
|
|
||||||
# include <bitset.h>
|
# include <bitset.h>
|
||||||
|
|
||||||
# include "gram.h"
|
# include "gram.h"
|
||||||
@@ -208,9 +210,9 @@ struct state
|
|||||||
store in this member a reference to the node containing each state. */
|
store in this member a reference to the node containing each state. */
|
||||||
struct state_list *state_list;
|
struct state_list *state_list;
|
||||||
|
|
||||||
/* If non-zero, then no lookahead sets on reduce actions are needed to
|
/* Whether no lookahead sets on reduce actions are needed to decide
|
||||||
decide what to do in state S. */
|
what to do in state S. */
|
||||||
char consistent;
|
bool consistent;
|
||||||
|
|
||||||
/* If some conflicts were solved thanks to precedence/associativity,
|
/* If some conflicts were solved thanks to precedence/associativity,
|
||||||
a human readable description of the resolution. */
|
a human readable description of the resolution. */
|
||||||
|
|||||||
Reference in New Issue
Block a user