diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2012-12-14 15:32:49 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2012-12-14 15:32:49 +0000 |
| commit | 20aaa4a9899ce454d3c20594a2b7d2d3d38dbc88 (patch) | |
| tree | 0f2556c655a29e08cb961b6aa56f0c6d51aa51b6 /src/runtime/c/pgf/pgf.h | |
| parent | 9ab3a6034d017f87bfc62ac2fc9351e514841a24 (diff) | |
The first prototype for exhaustive generation in the C runtime. The trees are always listed in decreasing probability order. There is also an API for generation from Python
Diffstat (limited to 'src/runtime/c/pgf/pgf.h')
| -rw-r--r-- | src/runtime/c/pgf/pgf.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/runtime/c/pgf/pgf.h b/src/runtime/c/pgf/pgf.h index 9963534b5..1f3947bff 100644 --- a/src/runtime/c/pgf/pgf.h +++ b/src/runtime/c/pgf/pgf.h @@ -54,6 +54,9 @@ extern GU_DECLARE_TYPE(PgfConcr, struct); #include <pgf/expr.h> #include <pgf/lexer.h> +/// An enumeration of #PgfExpr elements. +typedef GuEnum PgfExprEnum; + PgfPGF* pgf_read(const char* fpath, GuPool* pool, GuExn* err); @@ -109,9 +112,12 @@ pgf_print_name(PgfConcr*, PgfCId id); void pgf_linearize(PgfConcr* concr, PgfExpr expr, GuWriter* wtr, GuExn* err); -GuEnum* +PgfExprEnum* pgf_parse(PgfConcr* concr, PgfCId cat, PgfLexer *lexer, GuPool* pool); +PgfExprEnum* +pgf_generate(PgfPGF* pgf, PgfCId cat, GuPool* pool); + // an experimental function. Please don't use it void pgf_print_chunks(PgfConcr* concr, PgfCId cat, PgfLexer *lexer, GuPool* pool); |
