Composition Calculus by tanakh

typedef struct a{struct a*x,*y;}a;c(a*x,a*y){a*r=malloc(8);r->x=x;r->y=y;}_(c){putchar(c);}s(a*p){p>'z'?_(40),s(p->x),_(32),s(p->y),_(41):_(p);}t(a*p){p>'z'?p->x>'z'&&p->x->x>'z'&&p->x->x->x<47?p->y=c(p->x->y,p->y),p->x=p->x->x->y:t(p->x),t(p->y):0;}char b[];a*p;main(i){for(;gets(b);s(p),_(10))for(p=b[0],i=0;b[i+1];t(p))t(p=c(p,b[i+=2]));}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page