From cdc64fd7a30d68dbd930ded963a804089821d08e Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 27 Jan 2012 22:55:14 -0800 Subject: * parser.l: Support hex and octal escapes in string and quasiliterals, as the documentation says. Also support an optional trailing ; delimiter in hex escapes. * txr.1: Documented. --- parser.l | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'parser.l') diff --git a/parser.l b/parser.l index d9883e6c..5ef544e1 100644 --- a/parser.l +++ b/parser.l @@ -584,6 +584,11 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} lineno++; } +[\\](x{HEX}+;?|o{OCT}+) { + yylval.chr = num_esc(yytext+1); + return LITCHAR; + } + (x{HEX}+|o{OCT}+) { yylval.chr = num_esc(yytext); return LITCHAR; -- cgit v1.2.3