diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-08-20 16:59:34 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-08-20 16:59:34 -0700 |
commit | a38d8cad117770db020c470adc3397da072aab6d (patch) | |
tree | 7283e9ded1504e0671fdd4c14d58374ce6887762 | |
parent | 78b47c100f11eaea568db71b364ff02e752a741e (diff) | |
download | txr-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.
-rw-r--r-- | parser.l | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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"), |