mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-21 09:02:50 -06:00
fix in the parser for callbacks in the middle of a word
This commit is contained in:
@@ -1616,6 +1616,8 @@ pgf_parsing_symbol(PgfParsing* ps, PgfItem* item, PgfSymbol sym)
|
|||||||
/* This is the first time when we encounter this
|
/* This is the first time when we encounter this
|
||||||
* literal category so we must call the callback */
|
* literal category so we must call the callback */
|
||||||
|
|
||||||
|
bool match = false;
|
||||||
|
if (!ps->before->needs_bind) {
|
||||||
PgfLiteralCallback* callback =
|
PgfLiteralCallback* callback =
|
||||||
gu_map_get(ps->callbacks,
|
gu_map_get(ps->callbacks,
|
||||||
parg->ccat->cnccat,
|
parg->ccat->cnccat,
|
||||||
@@ -1647,8 +1649,12 @@ pgf_parsing_symbol(PgfParsing* ps, PgfItem* item, PgfSymbol sym)
|
|||||||
pgf_new_parse_state(ps, offset, BIND_NONE,
|
pgf_new_parse_state(ps, offset, BIND_NONE,
|
||||||
item->inside_prob+item->conts->outside_prob);
|
item->inside_prob+item->conts->outside_prob);
|
||||||
gu_buf_heap_push(state->agenda, pgf_item_prob_order, &item);
|
gu_buf_heap_push(state->agenda, pgf_item_prob_order, &item);
|
||||||
|
match = true;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!match) {
|
||||||
pgf_item_free(ps, item);
|
pgf_item_free(ps, item);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user