Fix lexer bug concerning identifiers that contain single quotes

Currently, identifiers containing single quotes are not recognised because we
try to parse them before processing the escape characters. Just replacing
every \' by a ' before passing the string to the parser fixes this problem.