mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 13:53:03 +00:00
Use locale when quoting.
* src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
quote rather than implementing quoting here.
(cherry picked from commit e6c849d82a)
This commit is contained in:
@@ -560,12 +560,9 @@ splice (\\[ \f\t\v]*\n)*
|
||||
}
|
||||
\\(.|\n) {
|
||||
char const *p = yytext + 1;
|
||||
char quoted_ws[] = "` '";
|
||||
/* Quote only if escaping won't make the character visible. */
|
||||
if (isspace (*p) && isprint (*p))
|
||||
{
|
||||
quoted_ws[1] = *p;
|
||||
p = quoted_ws;
|
||||
}
|
||||
p = quote (p);
|
||||
else
|
||||
p = quotearg_style_mem (escape_quoting_style, p, 1);
|
||||
complain_at (*loc, _("invalid character after \\-escape: %s"), p);
|
||||
|
||||
Reference in New Issue
Block a user