paren matching by macik

import std.stdio;void main(){char[char]x=[40:41,91:93,'{':'}'];for(char[]l,y;readln=l;write(l))foreach(ref c;l){if(c in x)y=c~y;if(c==63)c=x[y[0]],y=y[1..$];}}

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

download

return to the top page