|
|
1 typedef struct _node_ {
2 char type; /* type of node */
3 char flags; /* bitflags */
4 unsigned short mod; /* modifier */
5 unsigned short line; /* line number */
6 union {
7 Int number; /* numeric value */
8 unsigned short fhigh; /* high word of float */
9 string *string; /* string value */
10 char *ptr; /* character pointer */
11 struct _node_ *left; /* left child */
12 } l;
13 union {
14 Int number; /* numeric value */
15 Uint flow; /* low longword of float */
16 struct _node_ *right; /* right child */
17 } r;
18 } node;
19
20 # define NFLT_GET(n, f) ((f).high = (n)->l.fhigh, (f).low = (n)->r.flow)
21 # define NFLT_PUT(n, f) ((n)->l.fhigh = (f).high, (n)->r.flow = (f).low)
22 # define NFLT_ISZERO(n) FLT_ISZERO((n)->l.fhigh, (n)->r.flow)
23 # define NFLT_ISONE(n) FLT_ISONE((n)->l.fhigh, (n)->r.flow)
24 # define NFLT_ISMONE(n) FLT_ISMONE((n)->l.fhigh, (n)->r.flow)
25 # define NFLT_ONE(n) FLT_ONE((n)->l.fhigh, (n)->r.flow)
26 # define NFLT_ABS(n) FLT_ABS((n)->l.fhigh, (n)->r.flow)
27 # define NFLT_NEG(n) FLT_NEG((n)->l.fhigh, (n)->r.flow)
28
29 # define F_CONST 0x01 /* constant expression */
30 # define F_SIDEFX 0x02 /* expression has side effect */
31 # define F_VARARGS 0x04 /* parameter list is varargs */
32 # define F_ENTRY 0x08 /* (first) statement has case/default entry */
33 # define F_REACH 0x10 /* statement block has case/default entry */
34 # define F_BREAK 0x20 /* break */
35 # define F_CONTINUE 0x40 /* continue */
36 # define F_RETURN 0x80 /* return */
37 # define F_END (F_BREAK | F_CONTINUE | F_RETURN)
38 # define F_FLOW (F_ENTRY | F_REACH | F_END)
39
40 extern void node_init P((int));
41 extern node *node_new P((unsigned int));
42 extern node *node_int P((Int));
43 extern node *node_float P((xfloat*));
44 extern node *node_nil P((void));
45 extern node *node_str P((string*));
46 extern node *node_fcall P((int, char*, Int));
47 extern node *node_mon P((int, int, node*));
48 extern node *node_bin P((int, int, node*, node*));
49 extern void node_toint P((node*, Int));
50 extern void node_tostr P((node*, string*));
51 extern void node_free P((void));
52 extern void node_clear P((void));
53
54 # define N_ADD 1
55 # define N_ADD_INT 2
56 # define N_ADD_EQ 3
57 # define N_ADD_EQ_INT 4
58 # define N_ADD_EQ_1 5
59 # define N_ADD_EQ_1_INT 6
60 # define N_AGGR 7
61 # define N_AND 8
62 # define N_AND_INT 9
63 # define N_AND_EQ 10
64 # define N_AND_EQ_INT 11
65 # define N_ASSIGN 12
66 # define N_BLOCK 13
67 # define N_BREAK 14
68 # define N_CASE 15
69 # define N_CAST 16
70 # define N_CATCH 17
71 # define N_COMMA 18
72 # define N_CONTINUE 19
73 # define N_DIV 20
74 # define N_DIV_INT 21
75 # define N_DIV_EQ 22
76 # define N_DIV_EQ_INT 23
77 # define N_DO 24
78 # define N_ELSE 25
79 # define N_EQ 26
80 # define N_EQ_INT 27
81 # define N_FAKE 28
82 # define N_FLOAT 29
83 # define N_FOR 30
84 # define N_FOREVER 31
85 # define N_FUNC 32
86 # define N_GE 33
87 # define N_GE_INT 34
88 # define N_GLOBAL 35
89 # define N_GT 36
90 # define N_GT_INT 37
91 # define N_IF 38
92 # define N_INDEX 39
93 # define N_INT 40
94 # define N_LAND 41
95 # define N_LE 42
96 # define N_LE_INT 43
97 # define N_LOCAL 44
98 # define N_LOR 45
99 # define N_LSHIFT 46
100 # define N_LSHIFT_INT 47
101 # define N_LSHIFT_EQ 48
102 # define N_LSHIFT_EQ_INT 49
103 # define N_LT 50
104 # define N_LT_INT 51
105 # define N_LVALUE 52
106 # define N_MOD 53
107 # define N_MOD_INT 54
108 # define N_MOD_EQ 55
109 # define N_MOD_EQ_INT 56
110 # define N_MULT 57
111 # define N_MULT_INT 58
112 # define N_MULT_EQ 59
113 # define N_MULT_EQ_INT 60
114 # define N_NE 61
115 # define N_NE_INT 62
116 # define N_NIL 63
117 # define N_NOT 64
118 # define N_OR 65
119 # define N_OR_INT 66
120 # define N_OR_EQ 67
121 # define N_OR_EQ_INT 68
122 # define N_PAIR 69
123 # define N_POP 70
124 # define N_QUEST 71
125 # define N_RANGE 72
126 # define N_RETURN 73
127 # define N_RLIMITS 74
128 # define N_RSHIFT 75
129 # define N_RSHIFT_INT 76
130 # define N_RSHIFT_EQ 77
131 # define N_RSHIFT_EQ_INT 78
132 # define N_SPREAD 79
133 # define N_STR 80
134 # define N_SUB 81
135 # define N_SUB_INT 82
136 # define N_SUB_EQ 83
137 # define N_SUB_EQ_INT 84
138 # define N_SUB_EQ_1 85
139 # define N_SUB_EQ_1_INT 86
140 # define N_SUM 87
141 # define N_SUM_EQ 88
142 # define N_SWITCH_INT 89
143 # define N_SWITCH_RANGE 90
144 # define N_SWITCH_STR 91
145 # define N_TOFLOAT 92
146 # define N_TOINT 93
147 # define N_TOSTRING 94
148 # define N_TST 95
149 # define N_UPLUS 96
150 # define N_XOR 97
151 # define N_XOR_INT 98
152 # define N_XOR_EQ 99
153 # define N_XOR_EQ_INT 100
154 # define N_MIN_MIN 101
155 # define N_MIN_MIN_INT 102
156 # define N_PLUS_PLUS 103
157 # define N_PLUS_PLUS_INT 104
158
159 extern int nil_node;
160
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.