diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-06-05 08:43:17 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-06-05 08:43:17 -0700 |
commit | d6f20f3610af0648b00a3200a32e24b17c04d763 (patch) | |
tree | 3750f1c328ce617e1d75ba2adb50780216a40676 /parser.l | |
parent | c32afe5ce6c0c05e7fc978b321113228b4fa49f9 (diff) | |
download | txr-d6f20f3610af0648b00a3200a32e24b17c04d763.tar.gz txr-d6f20f3610af0648b00a3200a32e24b17c04d763.tar.bz2 txr-d6f20f3610af0648b00a3200a32e24b17c04d763.zip |
* parser.l: Adding an explicit lexical rule to
catch backslashes occurring within a regex, not followed by a
character. This can happen in dynamically parsed regexes
such as "abc\\".
Diffstat (limited to 'parser.l')
-rw-r--r-- | parser.l | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -751,6 +751,11 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} return REGCHAR; } +<REGEX>[\\] { + yyerrprepf(lit("dangling backslash in regex"), nao); + return ERRTOK; +} + <REGEX>{UANYN} { wchar_t buf[8]; utf8_from(buf, yytext); |