mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 21:03:04 +00:00
Use locale when quoting.
* src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use quote rather than implementing quoting here.
This commit is contained in:
@@ -617,12 +617,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