Python 2 (195236), Python 3 (198?)
from __future__ import print_function
def d(i):
t=0;p=['']*3+[1]
while i:
if'/'==i[0]:t+=1
else:
if'\\'==i[0]:i=i[1:]
p[t]+=i[0]
i=i[1:]
print(end=p[0]);p[0]=''
if t>2:
while p[1]in i:i=i.replace(*p[1:])
t=0;p[1:]=['','',1]
print p[0]d(i);i=0
Called as d(r"""/foo/Hello, world!//B\/\\R/foo/B/\R""")
. The triple quotes are only needed if the ///
program contains newlines: otherwise simple quotes are ok. This
EDIT: This interpreter does not print anything untilnow prints stuff as expected (previously it exitsonly printed at the very end, cf. comments). For Python 3, remove the first line (but I don't have Python 3 on my ancient install, so in this sensecannot be sure there is not compliantno other change).