diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-06-26 19:09:49 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-06-26 19:09:49 -0700 |
commit | b7419ec90436c09ac5cf1b0363cdba5d7e882bfb (patch) | |
tree | bc95170d8391347ff59a9b6401c8cdee94040204 /parser.l | |
parent | f8eb0a80d0e1b2c51461bb59aa69e83a82639081 (diff) | |
download | txr-b7419ec90436c09ac5cf1b0363cdba5d7e882bfb.tar.gz txr-b7419ec90436c09ac5cf1b0363cdba5d7e882bfb.tar.bz2 txr-b7419ec90436c09ac5cf1b0363cdba5d7e882bfb.zip |
Third round of quasiliteral-related fixes.
* parser.l (char_esc): Recognize \@ escape.
(grammar): Add a rule for a \@ escape in quasiliterals,
and quasi word list literals.
Diffstat (limited to 'parser.l')
-rw-r--r-- | parser.l | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -142,6 +142,7 @@ static wchar_t char_esc(int letter) case '\'': return L'\''; case '`': return L'`'; case '/': return L'/'; + case '@': return L'@'; case '\\': return L'\\'; } @@ -841,6 +842,11 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} return LITCHAR; } +<QSILIT,QWLIT>[\\]@ { + yylval->chr = char_esc(yytext[1]); + return LITCHAR; +} + <STRLIT,QSILIT,WLIT,QWLIT>{WS}[\\]\n{WS} { yyextra->lineno++; } |