improve string reading to lex octal and hexadecimal sequences properly