unescapeInitTail is only called for String, not for `Char:
|
-- strings |
|
, ( "'\\\"' (([^ '\\\"' '\\\\' '\\n']) | ('\\\\' ('\\\"' | '\\\\' | '\\\'' | 'n' | 't' | 'r')))* '\\\"'" |
|
, "TOK_String (unescapeInitTail (lexeme lexbuf))" ) |
|
-- chars |
|
, ( "'\\'' (([^ '\\\'' '\\\\']) | ('\\\\' ('\\\\' | '\\\'' | 'n' | 't' | 'r'))) '\\\''" |
|
, "TOK_Char (lexeme lexbuf).[1]") |
This causes e.g. a tab character to be lexed as backslash.
unescapeInitTailis only called forString, not for `Char:bnfc/source/src/BNFC/Backend/OCaml/CFtoOCamlLex.hs
Lines 195 to 200 in b1ecdb7
This causes e.g. a tab character to be lexed as backslash.