diff options
Diffstat (limited to 'dat.h')
-rw-r--r-- | dat.h | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -8,6 +8,7 @@ typedef struct Choicepoint Choicepoint; typedef struct Clause Clause; typedef struct Predicate Predicate; typedef struct Module Module; +typedef struct VarName VarName; typedef int (*Builtin)(Term *, Binding **, Module *); struct Operator @@ -35,14 +36,14 @@ struct Term union { vlong ival; double dval; + uvlong varnr; struct Compound; }; }; struct Binding { - Rune *name; - uvlong nr; /* Unique number for each clause. Every time a clause is used, it gets a new number. */ + uvlong varnr; Term *value; Binding *next; }; @@ -93,6 +94,14 @@ struct Module Module *next; }; +struct VarName +{ + Rune *name; + Term *var; + int count; + VarName *next; +}; + /* Operator types */ enum { Xf = 1<<0, /* 1 */ |