summaryrefslogtreecommitdiff
path: root/src/runtime/c/pgf/data.h
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2012-03-07 16:39:29 +0000
committerkr.angelov <kr.angelov@gmail.com>2012-03-07 16:39:29 +0000
commited5de8335bb1d984918702abff70aadc4d554539 (patch)
tree7e61957d0b103da4409bf39ba55bbe42efc772d2 /src/runtime/c/pgf/data.h
parent96493c274ba1a02d52f4739f4c222f2b2cbdee54 (diff)
libpgf: implementation for built in literal categories
Diffstat (limited to 'src/runtime/c/pgf/data.h')
-rw-r--r--src/runtime/c/pgf/data.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/runtime/c/pgf/data.h b/src/runtime/c/pgf/data.h
index 4a8fc062b..4af0a6614 100644
--- a/src/runtime/c/pgf/data.h
+++ b/src/runtime/c/pgf/data.h
@@ -124,13 +124,22 @@ struct PgfPGF {
extern GU_DECLARE_TYPE(PgfPGF, struct);
+typedef struct {
+ double prob;
+ PgfExpr expr;
+} PgfExprProb;
+
+extern GU_DECLARE_TYPE(PgfExprProb, struct);
+
struct PgfFunDecl {
PgfType* type;
- int arity; // Only for computational defs?
+ int arity;
PgfEquationsM defns; // maybe null
- double prob;
+ PgfExprProb ep;
};
+extern GU_DECLARE_TYPE(PgfFunDecl, struct);
+
struct PgfCatFun {
double prob;
PgfCId fun;
@@ -160,7 +169,7 @@ struct PgfCncCat {
struct PgfCncFun {
PgfCId name;
- PgfFunDecl *absfun;
+ PgfExprProb *ep;
int funid;
GuLength n_lins;
PgfSeqId lins[];
@@ -260,7 +269,6 @@ typedef struct PgfSymbolKP
typedef enum {
PGF_PRODUCTION_APPLY,
PGF_PRODUCTION_COERCE,
- PGF_PRODUCTION_CONST,
PGF_PRODUCTION_META
} PgfProductionTag;
@@ -307,9 +315,6 @@ extern GU_DECLARE_TYPE(PgfBindType, enum);
extern GU_DECLARE_TYPE(PgfLiteral, GuVariant);
-PgfCCatId
-pgf_literal_cat(PgfLiteral lit);
-
// PgfPatt
typedef enum {