forked from GitHub/gf-core
bugfix in the bottom-up prediction for the parser
This commit is contained in:
@@ -1105,7 +1105,9 @@ pgf_parsing_lookahead(PgfParsing *ps, PgfParseState* state,
|
||||
if (seq->idx != NULL) {
|
||||
PgfLexiconIdxEntry* entry = gu_buf_extend(state->lexicon_idx);
|
||||
entry->idx = seq->idx;
|
||||
entry->offset = (current - ps->sentence);
|
||||
entry->offset =
|
||||
(gu_seq_length(seq->syms) == 0) ? state->start_offset
|
||||
: (size_t) (current - ps->sentence);
|
||||
}
|
||||
|
||||
if (len+1 <= max)
|
||||
|
||||
Reference in New Issue
Block a user