mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
cex: style changes
* src/counterexample.c: Simplify a bit. * src/parse-simulation.c, src/parse-simulation.h: Enforce coding style.
This commit is contained in:
@@ -190,7 +190,7 @@ expand_to_conflict (state_item_number start, symbol_number conflict_sym)
|
||||
{
|
||||
node = (si_bfs_node *) gl_list_get_at (queue, 0);
|
||||
state_item *silast = state_items + node->si;
|
||||
symbol_number sym = item_number_as_symbol_number (*(silast->item));
|
||||
symbol_number sym = item_number_as_symbol_number (*silast->item);
|
||||
if (sym == conflict_sym)
|
||||
break;
|
||||
if (ISVAR (sym))
|
||||
@@ -893,10 +893,10 @@ static bool
|
||||
has_common_prefix (const item_number *itm1, const item_number *itm2)
|
||||
{
|
||||
int i = 0;
|
||||
for (; !item_number_is_rule_number (*(itm1 + i)); ++i)
|
||||
if (*(itm1 + i) != *(itm2 + i))
|
||||
for (; !item_number_is_rule_number (itm1[i]); ++i)
|
||||
if (itm1[i] != itm2[i])
|
||||
return false;
|
||||
return item_number_is_rule_number (*(itm2 + i));
|
||||
return item_number_is_rule_number (itm2[i]);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -157,7 +157,7 @@ parse_state_derivation_completed (const parse_state *ps)
|
||||
derivation *
|
||||
parse_state_derivation (const parse_state *ps)
|
||||
{
|
||||
return (derivation *)ps->derivs.head_elt;
|
||||
return (derivation *) ps->derivs.head_elt;
|
||||
}
|
||||
|
||||
const state_item *
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
Simulating states of the parser:
|
||||
Each state is an array of state-items and an array of derivations.
|
||||
Each consecutive state-item represents a transition/goto or production,
|
||||
and the derivations are the dereivation trees associated with the symbols
|
||||
and the derivations are the derivation trees associated with the symbols
|
||||
transitioned on each step. In more detail:
|
||||
|
||||
Parse states are stored as a tree. Each new parse state contains two "chunks,"
|
||||
|
||||
Reference in New Issue
Block a user