mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23: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:
@@ -1,3 +1,9 @@
|
|||||||
|
2009-08-21 Joel E. Denny <jdenny@clemson.edu>
|
||||||
|
|
||||||
|
Use locale when quoting.
|
||||||
|
* src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
|
||||||
|
quote rather than implementing quoting here.
|
||||||
|
|
||||||
2009-08-20 Eric Blake <ebb9@byu.net>
|
2009-08-20 Eric Blake <ebb9@byu.net>
|
||||||
|
|
||||||
Make previous patch more robust.
|
Make previous patch more robust.
|
||||||
|
|||||||
@@ -617,12 +617,9 @@ splice (\\[ \f\t\v]*\n)*
|
|||||||
}
|
}
|
||||||
\\(.|\n) {
|
\\(.|\n) {
|
||||||
char const *p = yytext + 1;
|
char const *p = yytext + 1;
|
||||||
char quoted_ws[] = "` '";
|
/* Quote only if escaping won't make the character visible. */
|
||||||
if (isspace (*p) && isprint (*p))
|
if (isspace (*p) && isprint (*p))
|
||||||
{
|
p = quote (p);
|
||||||
quoted_ws[1] = *p;
|
|
||||||
p = quoted_ws;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
p = quotearg_style_mem (escape_quoting_style, p, 1);
|
p = quotearg_style_mem (escape_quoting_style, p, 1);
|
||||||
complain_at (*loc, _("invalid character after \\-escape: %s"), p);
|
complain_at (*loc, _("invalid character after \\-escape: %s"), p);
|
||||||
|
|||||||
Reference in New Issue
Block a user