mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
added evaluator.h which I had forgoten
This commit is contained in:
32
src/runtime/c/pgf/evaluator.h
Normal file
32
src/runtime/c/pgf/evaluator.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef PGF_EVALUATOR_H_
|
||||
#define PGF_EVALUATOR_H_
|
||||
|
||||
struct PgfEvalState {
|
||||
PgfPGF* pgf;
|
||||
GuPool* pool;
|
||||
GuExn* err;
|
||||
GuBuf* stack;
|
||||
};
|
||||
|
||||
typedef struct PgfClosure PgfClosure;
|
||||
typedef struct PgfEvalState PgfEvalState;
|
||||
|
||||
typedef PgfClosure* (*PgfFunction)(PgfEvalState* state, PgfClosure* val);
|
||||
|
||||
struct PgfClosure {
|
||||
PgfFunction code;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
PgfClosure header;
|
||||
PgfAbsFun* absfun;
|
||||
PgfClosure* args[];
|
||||
} PgfValue;
|
||||
|
||||
PgfClosure*
|
||||
pgf_evaluate_value(PgfEvalState* state, PgfClosure* closure);
|
||||
|
||||
void
|
||||
pgf_evaluate_save_variables(PgfEvalState* state, PgfValue* val);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user