better escaping in tokenizer, and use ~s to format strings in torepr