Skip to main content
6 of 7
Removed leading-whitespace logic.
breadbox
  • 7.3k
  • 33
  • 45

C, 250 245 236 193 185 chars

char*p,b[99];f(char*s){int t=0;for(;*p-32? *p>47?printf("%d ",strtol(p,&p,10)):*p==40?f(p++),++p: t&&s[t]%5==2|*p%5-2?printf("%c ",s[t--]):*p>41?s[++t]=*p++:0:++p;);} main(){f(p=gets(b));} 
breadbox
  • 7.3k
  • 33
  • 45