use token-string map for ostream operator

I think this is way more readable than hardcoding everything in a
switch. Additionally, it is also dynamic this way.