summaryrefslogtreecommitdiffstats
path: root/parser.l
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-02-12 18:18:44 -0800
committerKaz Kylheku <kaz@kylheku.com>2012-02-12 18:18:44 -0800
commitc056272954ddc5af1c61bb7c174bdccaf208f1a1 (patch)
tree1318218e41b3e9af31d5aa239fb23d3ab0c374f0 /parser.l
parentfb08292e908f1af8b93f26ba57c16d97cd3e08ca (diff)
downloadtxr-c056272954ddc5af1c61bb7c174bdccaf208f1a1.tar.gz
txr-c056272954ddc5af1c61bb7c174bdccaf208f1a1.tar.bz2
txr-c056272954ddc5af1c61bb7c174bdccaf208f1a1.zip
* lib.c (obj_print): Print control characters in string and
character literals as hex escapes, followed by semicolon if necessary. Don't use iswprint function since it is locale-specific and concludes that non-ASCII characters are unprintable. Changed print syntax for lazy strings. (obj_pprint): Changed print syntax for lazy strings. * parser.l: Bugfix in hex/octal character constant. num_esc(yytext) was called rather than num_esc(yytext+1). * parser.y (chrlit): Bugfix: missing case for hex and octal constants which are given by a LITCHAR token. * stream.c (vformat): Bugfix: strings were being printed as if using ~a even under ~s.
Diffstat (limited to 'parser.l')
-rw-r--r--parser.l2
1 files changed, 1 insertions, 1 deletions
diff --git a/parser.l b/parser.l
index 10328440..e206661d 100644
--- a/parser.l
+++ b/parser.l
@@ -601,7 +601,7 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U}
}
<CHRLIT>(x{HEX}+|o{OCT}+) {
- yylval.chr = num_esc(yytext);
+ yylval.chr = num_esc(yytext+1);
return LITCHAR;
}