now the robust parser is purely top-down and the meta rules compete on a fair basis with the grammar rules

This commit is contained in:
kr.angelov
2012-06-12 09:29:51 +00:00
parent ebfd7ac5cd
commit b765b0c054
6 changed files with 256 additions and 79 deletions

View File

@@ -3,6 +3,7 @@
#include <gu/type.h>
#include <gu/variant.h>
#include <gu/assert.h>
#include <math.h>
bool
pgf_tokens_equal(PgfTokens t1, PgfTokens t2)
@@ -184,6 +185,12 @@ GU_DEFINE_TYPE(
GU_MEMBER(PgfCatFun, prob, double),
GU_MEMBER(PgfCatFun, fun, PgfCId));
static float inf_float = INFINITY;
GU_DEFINE_TYPE(PgfMetaChildMap, GuMap,
gu_type(PgfCat), NULL,
gu_type(float), &inf_float);
GU_DEFINE_TYPE(
PgfCat, struct,
GU_MEMBER(PgfCat, context, PgfHypos),