mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-21 02:39:31 -06:00
word completion in the C parser now returns information about the function which generates the token
This commit is contained in:
@@ -1254,9 +1254,12 @@ pgf_parsing_add_transition(PgfParsing* ps, PgfToken tok, PgfItem* item)
|
||||
|
||||
if (ps->prefix != NULL && *current == 0) {
|
||||
if (gu_string_is_prefix(ps->prefix, tok)) {
|
||||
PgfProductionApply* papp = gu_variant_data(item->prod);
|
||||
|
||||
ps->tp = gu_new(PgfTokenProb, ps->out_pool);
|
||||
ps->tp->tok = tok;
|
||||
ps->tp->cat = item->conts->ccat->cnccat->abscat->name;
|
||||
ps->tp->fun = papp->fun->absfun->name;
|
||||
ps->tp->prob = item->inside_prob + item->conts->outside_prob;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -200,6 +200,7 @@ pgf_parse_with_oracle(PgfConcr* concr, PgfType* typ,
|
||||
typedef struct {
|
||||
PgfToken tok;
|
||||
PgfCId cat;
|
||||
PgfCId fun;
|
||||
prob_t prob;
|
||||
} PgfTokenProb;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user