added createCategory, dropCategory

This commit is contained in:
krangelov
2021-09-09 17:33:25 +02:00
parent a44787fc4e
commit f7aad0c0e0
12 changed files with 141 additions and 25 deletions

View File

@@ -164,9 +164,9 @@ struct PgfUnmarshaller {
virtual PgfLiteral lint(size_t size, uintmax_t *v)=0;
virtual PgfLiteral lflt(double v)=0;
virtual PgfLiteral lstr(PgfText *v)=0;
virtual PgfType dtyp(int n_hypos, PgfTypeHypo *hypos,
virtual PgfType dtyp(size_t n_hypos, PgfTypeHypo *hypos,
PgfText *cat,
int n_exprs, PgfExpr *exprs)=0;
size_t n_exprs, PgfExpr *exprs)=0;
virtual void free_ref(object x)=0;
};
@@ -347,4 +347,16 @@ void pgf_drop_function(PgfDB *db, PgfRevision revision,
PgfText *name,
PgfExn *err);
PGF_API_DECL
void pgf_create_category(PgfDB *db, PgfRevision revision,
PgfText *name,
size_t n_hypos, PgfTypeHypo *context, prob_t prob,
PgfMarshaller *m,
PgfExn *err);
PGF_API_DECL
void pgf_drop_category(PgfDB *db, PgfRevision revision,
PgfText *name,
PgfExn *err);
#endif // PGF_H_