-
Notifications
You must be signed in to change notification settings - Fork 0
/
builder.c
68 lines (58 loc) · 1.72 KB
/
builder.c
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
62
63
64
65
66
67
68
#include <stdio.h>
#include <stdlib.h>
typedef void **t;
void *N[] = {N, N};
t G, H, M=N, p=N;
#define Z ; if (A == D) goto
#define C ; *(T =++ G) =D ++; D -= (G =* -- T) ||! (G = calloc(2, sizeof* N)); \
*T ++= A; G -=(t) *T --- D; G -=!! (D = T);
#define F ; A =* D; *D ++=G +!!G; D =* (G = D); G -=!! G;
#define U ; T = A; A =* D ++; D =* D;
#define L ; A = D; D =
#define S = D; D = A;
#define X ; T = A; A =* ++D; *D --= T;
#define E(n) ; main(n, 0);
#define R ; return 0 ;
#define T(B) B B B
#define Q &n ["0111112011138777764877667586677758767675999:"]
#define V(n,N,O) ; if (n Q) { N ; } else { O ; }
#define Y X C L H C H S
#define W U D S L T Y Z
#define I(P,B) P##a: L P U U Z P##c; D S B L P U P S Z P##a; \
P##b: L P U U L P Y Z P##a; P##c:
void prn(t T, int l)
{
int i, n=0;
t A=T;
if (T != N && ((t)T[1])[1] == T) {
for (i = 0; i < l; ++i) printf(" ");
printf("%p %p = atom\n", (void*)T, T[1]);
return;
}
while (T != N) {
for (i = 0; i < l; ++i) printf(" ");
printf("%p[%d] = %p\n", (void*)A, n++, (void*)T[0]);
prn(T[0], l+1);
T = T[1];
}
}
int main(int n, char **v)
{
t a, x, y, z;
t T, A, D;
T=A=D=N F C if (v) { E(0) L G U L a S
E(12) C F E(19) C F E(26) C F E(33)
prn(a, 0); printf("-- \n"); prn(p, 0) R }
V(7, L G U V(12, F y S,; ) x S,; );
V(8, V(2, L z S L p C p S
I(z, a S L z U x S I(x, U L N C L a U L T C
/*!*/ L N U L T C L p C p S)),
V(1, C F T(E(n+1)),
L G U E(7) L G U x S L T L x C C F E(n+1)
L x C F T(E(40)) R)),
V(4, T(L y V(1, U y S,; ) L x U x S L T V(2, C C F E(n+1),
a S L a U L T U L T C L a X)) R,
V(2, V(1, /*!*/ L N L N C, C a S L a C L a X),
L N C F T(E(n+1)) L G U)));
V(3, V(8, L y, L x C) C F,; ) R;
}