mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-21 17:12:50 -06:00
fix in the dictionary lookup
This commit is contained in:
@@ -1079,7 +1079,7 @@ pgf_symbols_cmp(GuString* psent, BIND_TYPE* pbind, PgfSymbols* syms)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
pgf_parsing_lookahead(PgfParsing *ps, PgfParseState* state,
|
pgf_parsing_lookahead(PgfParsing *ps, PgfParseState* state,
|
||||||
size_t i, size_t j, ptrdiff_t min, ptrdiff_t max)
|
int i, int j, ptrdiff_t min, ptrdiff_t max)
|
||||||
{
|
{
|
||||||
// This is a variation of a binary search algorithm which
|
// This is a variation of a binary search algorithm which
|
||||||
// can retrieve all prefixes of a string with minimal
|
// can retrieve all prefixes of a string with minimal
|
||||||
@@ -1087,7 +1087,7 @@ pgf_parsing_lookahead(PgfParsing *ps, PgfParseState* state,
|
|||||||
// prefix separately.
|
// prefix separately.
|
||||||
|
|
||||||
while (i <= j) {
|
while (i <= j) {
|
||||||
size_t k = (i+j) / 2;
|
int k = (i+j) / 2;
|
||||||
PgfSequence* seq = gu_seq_index(ps->concr->sequences, PgfSequence, k);
|
PgfSequence* seq = gu_seq_index(ps->concr->sequences, PgfSequence, k);
|
||||||
|
|
||||||
GuString start = ps->sentence + state->end_offset;
|
GuString start = ps->sentence + state->end_offset;
|
||||||
|
|||||||
Reference in New Issue
Block a user