summaryrefslogtreecommitdiff
path: root/dat.h
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-09-19 21:21:26 +0000
committerrodri <rgl@antares-labs.eu>2024-09-19 21:21:26 +0000
commitbfd97dce0cd0b532b0a6065fd1cf891169ebd204 (patch)
treee1ff97f74c77bb7c0ffcc320bf7470aa0e5f16cb /dat.h
parent97bc549d4b8bf638946ac4ff3b066941bca9a03b (diff)
downloadsemblance-front.tar.gz
semblance-front.tar.bz2
semblance-front.zip
fixes and advances.front
Diffstat (limited to 'dat.h')
-rw-r--r--dat.h44
1 files changed, 29 insertions, 15 deletions
diff --git a/dat.h b/dat.h
index 052270f..7937e86 100644
--- a/dat.h
+++ b/dat.h
@@ -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 */
};