paren matching by hallvabo

import os
a=[]
for c in os.read(0,130):a+=[c]*(c in'([{');os.write(1,c*(c!='?')or')}]'[hash(a.pop())%3])

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

download

return top