diff options
Diffstat (limited to 'dat.h')
-rw-r--r-- | dat.h | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -1,5 +1,8 @@ typedef struct Term Term; typedef struct Binding Binding; +typedef struct Goal Goal; +typedef struct Choicepoint Choicepoint; +typedef int (*Builtin)(Term *, Term *, Goal **, Choicepoint **, Binding **); struct Term { @@ -23,6 +26,20 @@ struct Binding Binding *next; }; +struct Goal +{ + Term *goal; + Goal *next; +}; + +struct Choicepoint +{ + Goal *goalstack; + Term *retryclause; + uvlong id; /* Unique number for each clause. Used to know where to cut to. */ + Choicepoint *next; +}; + enum { CompoundTerm, AtomTerm, |