-
Notifications
You must be signed in to change notification settings - Fork 170
Closed
Labels
Milestone
Description
unescapeInitTail
is only called for String
, not for `Char:
bnfc/source/src/BNFC/Backend/OCaml/CFtoOCamlLex.hs
Lines 195 to 200 in b1ecdb7
-- 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.