add \" esc in string and fix state switch missing in char esc