]> git.saurik.com Git - bison.git/commitdiff
Use locale when quoting.
authorJoel E. Denny <jdenny@clemson.edu>
Sat, 22 Aug 2009 00:09:54 +0000 (20:09 -0400)
committerJoel E. Denny <jdenny@clemson.edu>
Sat, 22 Aug 2009 00:32:11 +0000 (20:32 -0400)
* src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
quote rather than implementing quoting here.
(cherry picked from commit e6c849d82a95be8a595c254cc3046cfae725f064)

ChangeLog
src/scan-gram.l

index 0b7631bd34ae6262f1fba1aa7bcaac6cd57fe2f1..853777a15331095bddfd22cdff2ba16fea87d102 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        Make previous patch more robust.
index 9aec298e3ea44256cf19b05d2b0470cb3070410a..f0f8c2796b084d19dbde8481db4d239f3bd994e4 100644 (file)
@@ -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);