Skip to content

Commit

Permalink
extract-links.c: Fix whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
ampli committed Mar 27, 2024
1 parent 174d2d6 commit adbd788
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions link-grammar/parse/extract-links.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ Parse_set * mk_parse_set(fast_matcher_t *mchxt,
{
dummy = dummy_set(lw, w, null_count-1, pex);
record_choice(dummy, NULL,
pset, NULL,
pset, NULL,
NULL, &xtp->set, pex);
RECOUNT({xtp->set.recount += pset->recount;})
}
Expand Down Expand Up @@ -626,13 +626,13 @@ Parse_set * mk_parse_set(fast_matcher_t *mchxt,
/* Now, we determine if (based on table only) we can see that
the current range is not parsable. */

count_t lcount[4] = { 0 }, rcount[4] = { 0 };
count_t lcount[4] = { 0 }, rcount[4] = { 0 };
if (Lmatch)
Lmatch = fetch_counts(ctxt, lcount, lw, w, le, d->left, lnull_count);
if (Rmatch && (Lmatch || (le == NULL)))
Rmatch = fetch_counts(ctxt, rcount, w, rw, d->right, re, rnull_count);

count_t l_bnr = 0, r_bnl = 0;
count_t l_bnr = 0, r_bnl = 0;
if (Lmatch)
l_bnr = table_count(ctxt, w, rw, d->right, re, rnull_count);
else
Expand All @@ -644,7 +644,7 @@ Parse_set * mk_parse_set(fast_matcher_t *mchxt,

Parse_set *ls[4] = { NULL };
bool ls_exists = false;
if (Lmatch && (Rmatch || (l_bnr > 0)))
if (Lmatch && (Rmatch || (l_bnr > 0)))
{
ls_exists = smk_parse_set(mchxt, ctxt, lcount,
lw, w, le, d->left,
Expand All @@ -659,13 +659,13 @@ Parse_set * mk_parse_set(fast_matcher_t *mchxt,
rnull_count, pex);
if (rset != NULL)
{
for (int i =0; i < 4; i++)
for (int i = 0; i < 4; i++)
{
if (ls[i] == NULL) continue;
/* this ordering is probably not consistent with
* that needed to use list_links */
record_choice(ls[i], d->left,
rset, NULL /* d->right */,
rset, NULL /* d->right */,
d, &xtp->set, pex);
RECOUNT({xtp->set.recount += (w_count_t)ls[i]->recount * rset->recount;})
}
Expand Down Expand Up @@ -706,7 +706,7 @@ Parse_set * mk_parse_set(fast_matcher_t *mchxt,
}
else
{
for (int i = 0; i < 4; i++)
for (int i = 0; i < 4; i++)
{
if (ls[i] == NULL) continue;
/* This ordering is probably not consistent with that
Expand Down Expand Up @@ -742,7 +742,7 @@ static bool set_node_overflowed(Parse_set *set)

for (pc = set->first; pc != NULL; pc = pc->next)
{
n += (w_count_t)pc->set[0]->count * pc->set[1]->count;
n += (w_count_t)pc->set[0]->count * pc->set[1]->count;
if (PARSE_NUM_OVERFLOW < n) return true;
}
return false;
Expand Down

0 comments on commit adbd788

Please sign in to comment.