From 1ca09448f9032b92ef436f4e0f658309d60e7ffd Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Thu, 10 Apr 2014 14:14:31 +0000 Subject: now fully functional Java API for custom literals --- src/runtime/c/pgf/pgf.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/runtime/c/pgf/pgf.h') diff --git a/src/runtime/c/pgf/pgf.h b/src/runtime/c/pgf/pgf.h index 87ca3ae28..d8c364b56 100644 --- a/src/runtime/c/pgf/pgf.h +++ b/src/runtime/c/pgf/pgf.h @@ -151,6 +151,23 @@ GuEnum* pgf_complete(PgfConcr* concr, PgfCId cat, GuString string, GuString prefix, GuExn* err, GuPool* pool); +GuPool* +pgf_concr_get_pool(PgfConcr* concr); + +typedef struct PgfLiteralCallback PgfLiteralCallback; + +struct PgfLiteralCallback { + PgfExprProb* (*match)(PgfLiteralCallback* self, + size_t lin_idx, + GuString sentence, size_t* poffset, + GuPool *out_pool); +}; + +void +pgf_concr_add_literal(PgfConcr *concr, PgfCId cat, + PgfLiteralCallback* callback, + GuExn* err); + /// @} void -- cgit v1.2.3