diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-02-05 08:28:14 +0100 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-02-05 08:28:14 +0100 |
commit | a51d9c18b071f7c3cb624771ecc21c3a9a464640 (patch) | |
tree | 1052bd0814668427071323113375d0c19c05727f /parser.l | |
parent | 4c6802f7284e17b7cbc1f178f90775182d379be6 (diff) | |
download | txr-a51d9c18b071f7c3cb624771ecc21c3a9a464640.tar.gz txr-a51d9c18b071f7c3cb624771ecc21c3a9a464640.tar.bz2 txr-a51d9c18b071f7c3cb624771ecc21c3a9a464640.zip |
* parser.l: Allow semicolon terminator on hex and octal
escapes in a regex. Removed o escape character from octal
constants in strings and quasiliterals: no such thing is documented.
Octal constants can be semicolon-terminated like hex ones.
* txr.1: Documented semicolons after octal constants in
string literals and after hex and octal constants in regexes.
Diffstat (limited to 'parser.l')
-rw-r--r-- | parser.l | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -494,7 +494,7 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} return REGCHAR; } -<REGEX>[\\](x{HEX}+|{OCT}+) { +<REGEX>[\\](x{HEX}+|{OCT}+);? { yylval.chr = num_esc(yytext + 1); return REGCHAR; } @@ -595,7 +595,7 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} lineno++; } -<STRLIT,QSILIT>[\\](x{HEX}+;?|o{OCT}+) { +<STRLIT,QSILIT>[\\](x{HEX}+|{OCT}+);? { yylval.chr = num_esc(yytext+1); return LITCHAR; } |