blob: 7937e866cb1bc2685ce3f6533fdb0fc173097e99 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
enum
{
TDOUBLE,
TPOINT,
TVECTOR,
TNORMAL,
TQUAT,
};
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
{
int type;
union {
double dval;
Point3 pval;
Quaternion qval;
};
};
struct Symbol
{
char *name;
int type;
union {
Var var; /* ID */
double dconst; /* CONST */
double (*fn)(double); /* BLTIN */
};
Symbol *next;
};
struct Node
{
int type;
double num; /* NODENUM */
Symbol *sym; /* NODESYM */
};
|