postfix to infix by kinaba

#!ruby -pl
x=proc{|p|c=19&86%$_[~/.$/];chop;c<4?(b=$&+x[c];t=x[c&2]+b;p>c&2?"(#{t})":t):$&}
$_=x[0]

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

download

return top