1
0
forked from GitHub/gf-core

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

This commit is contained in:
kr.angelov
2012-12-14 15:32:49 +00:00
parent 79711380a2
commit 8aefd1e072
7 changed files with 255 additions and 38 deletions

View File

@@ -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);