summaryrefslogtreecommitdiffstats
path: root/parser.l
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-08-20 16:59:34 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-08-20 16:59:34 -0700
commita38d8cad117770db020c470adc3397da072aab6d (patch)
tree7283e9ded1504e0671fdd4c14d58374ce6887762 /parser.l
parent78b47c100f11eaea568db71b364ff02e752a741e (diff)
downloadtxr-a38d8cad117770db020c470adc3397da072aab6d.tar.gz
txr-a38d8cad117770db020c470adc3397da072aab6d.tar.bz2
txr-a38d8cad117770db020c470adc3397da072aab6d.zip
lexer: no leading 0 in 2-digit hex chars in diagnostic.
* parser.l (grammar): Fix incorrect format strings that are supposed to show an invalid input character in hex. For instance the character 1 comes out as #\x 1 rather than #\x01.
Diffstat (limited to 'parser.l')
-rw-r--r--parser.l6
1 files changed, 3 insertions, 3 deletions
diff --git a/parser.l b/parser.l
index c0114b24..60e06727 100644
--- a/parser.l
+++ b/parser.l
@@ -833,13 +833,13 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U}
<SPECIAL,QSPECIAL,NESTED,BRACED>{UANYN} {
val ch = chr_str(string_utf8(yytext), zero);
if (chr_isspace(ch))
- yyerrprepf(yyg, lit("unexpected whitespace character #\\x~02x"),
+ yyerrprepf(yyg, lit("unexpected whitespace character #\\x~,02x"),
ch, nao);
else if (chr_isunisp(ch))
- yyerrprepf(yyg, lit("unexpected Unicode space character #\\x~02x"),
+ yyerrprepf(yyg, lit("unexpected Unicode space character #\\x~,02x"),
ch, nao);
else if (chr_iscntrl(ch))
- yyerrprepf(yyg, lit("unexpected control character #\\x~02x"),
+ yyerrprepf(yyg, lit("unexpected control character #\\x~,02x"),
ch, nao);
else
yyerrprepf(yyg, lit("unexpected character #\\~a"),