All pastes #158016 Raw Edit

Pikhq

public text v1 · immutable
·published 2006-09-01 21:58 UTC
rendered paste body
                                                                                                                                                                 [Uncompressor in Brainfuck. Assumes that EOF=0, and cells wrap]
char opcode@0;
char i@1;
char temp0@2;
char temp1@3;
char temp3@4;
,[ while(opcode!=0) {
	>>>>+<<<< temp3=1
	[->>+>+<<<]>>[-<<+>>] temp1=opcode
	>-------------------------------------------[ if(temp1 == plus) {
		>- temp3=0
		<<, i=getchar;
		[ while(i!=0) {
			- i = i minus 1
			>[-]+++++++++++++++++++++++++++++++++++++++++++. putchar(plus)
		<}]
	}]
	>>--[ if(temp1 == minus) {
		>- temp3=0
		<<, i=getchar;
		[ while(i!=0) {
			- i = i minus 1
			>[-]+++++++++++++++++++++++++++++++++++++++++++++. putchar(minus)
		<}]
	}]
	>>[-] temp1=0
	<<<[->>+>+<<<]>>[-<<+>>] temp1=opcode
	>------------------------------------------------------------[ if(temp1 == less than) {
		>- temp3=0
		<<, i=getchar;
		[ while(i!=0) {
			- i = i minus 1
			>[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++. putchar(less than)
		<}]
	}]
	>>--[ if(temp1== greater than) {
		>- temp3=0
		<<, i=getchar;
		[ while(i!=0) {
			- i = i minus 1
			>[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++. putchar(greater than)
		<}]
	}]
	>>>[ if(temp3!=0) {
		<<<<. putchar(opcode)
		>>>>- temp3=0
	}]
	[-]<[-]<[-]<[-]<[-] blank all memory
	, opcode=getchar()
]