diff options
author | Peter Mikkelsen <petermikkelsen10@gmail.com> | 2022-01-22 20:34:21 +0000 |
---|---|---|
committer | Peter Mikkelsen <petermikkelsen10@gmail.com> | 2022-01-22 20:34:21 +0000 |
commit | f28544ec25ceee5fe2b783f1980cdf19caf0e977 (patch) | |
tree | f4a0658fc30b6c1ea1e7acde8e17985c479a3fce /apl9.h | |
parent | 09d3d9272193a809cca535019f34cc5e7a5d4953 (diff) |
Implement fgh and gh trains
Diffstat (limited to 'apl9.h')
-rw-r--r-- | apl9.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -39,6 +39,7 @@ typedef enum FunctypeOp, FunctypeQuad, FunctypeHybrid, + FunctypeTrain, } functionType; typedef enum @@ -59,6 +60,7 @@ typedef enum typedef struct Array Array; typedef struct Statement Statement; typedef struct Operator Operator; +typedef struct FunctionTrain FunctionTrain; typedef struct Function Function; typedef struct Datum Datum; typedef struct Symbol Symbol; @@ -103,6 +105,12 @@ struct Operator Datum *right; }; +struct FunctionTrain +{ + int nfuncs; + Function *funcs; +}; + struct Function { functionType type; @@ -111,6 +119,7 @@ struct Function Rune *dfn; Operator operator; QuadnameDef *quad; + FunctionTrain train; }; Array *left; }; @@ -179,6 +188,7 @@ Rune *ppdatum(Datum); Rune *ppdatums(Datum *, int); Rune *pparray(Array *); Rune *ppoperator(Operator); +Rune *ppfunction(Function); /* lexer.c */ Statement *lexline(Rune *, int); @@ -219,6 +229,7 @@ void incref(Array *); /* functions.c */ Array *runfunc(Function, Array *,Array *); Array *rundfn(Rune *, Array *, Array *); +Array *runtrain(Function *, int, Array *, Array *, Array *); /* quadnames.c */ Datum quadnamedatum(QuadnameDef); |