diff options
author | rodri <rgl@antares-labs.eu> | 2024-09-19 21:21:26 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-09-19 21:21:26 +0000 |
commit | bfd97dce0cd0b532b0a6065fd1cf891169ebd204 (patch) | |
tree | e1ff97f74c77bb7c0ffcc320bf7470aa0e5f16cb /dat.h | |
parent | 97bc549d4b8bf638946ac4ff3b066941bca9a03b (diff) | |
download | semblance-front.tar.gz semblance-front.tar.bz2 semblance-front.zip |
fixes and advances.front
Diffstat (limited to 'dat.h')
-rw-r--r-- | dat.h | 44 |
1 files changed, 29 insertions, 15 deletions
@@ -7,10 +7,29 @@ enum TQUAT, }; -typedef struct Var Var; -typedef struct Symbol Symbol; +enum +{ + NODENUM, + NODESYM, +}; + typedef struct Const Const; typedef struct Builtin Builtin; +typedef struct Var Var; +typedef struct Symbol Symbol; +typedef struct Node Node; + +struct Const +{ + char *name; + double val; +}; + +struct Builtin +{ + char *name; + double (*fn)(); +}; struct Var { @@ -27,21 +46,16 @@ struct Symbol char *name; int type; union { - Var var; - double val; /* constant value */ - double (*fn)(double); - } u; + Var var; /* ID */ + double dconst; /* CONST */ + double (*fn)(double); /* BLTIN */ + }; Symbol *next; }; -struct Const +struct Node { - char *name; - double val; -}; - -struct Builtin -{ - char *name; - double (*fn)(); + int type; + double num; /* NODENUM */ + Symbol *sym; /* NODESYM */ }; |