postfix to infix by murky-satyr

for(;r=readline();)print(function f(q,p,c){[,r,c]=/(.*)(.)$/(r)
return~(p='+-*/'.indexOf(c))?(c+=f(p),c=f(p&=2)+c,q>p?'('+c+')':c):c}())

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

download

return to the top page