Pyth, 5146454341 40 bytes
I remove the curly braces and split at \
, just like Reto Koradi's CJam answer does. The codes bar
, dot
and hat
are recognized simply by the last decimal digit of the character code of the first character, modulo 3. I just add (RIP)barf
""""
to the first part and remove it in the end to save the code for handling the first part specially.
jtMsMCm,+@".^_"eChd*\ -ld4>d3c-+*4Nz`H\\