]> 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:17:56 +0000 (20:17 -0400)
* src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
quote rather than implementing quoting here.

ChangeLog
src/scan-gram.l

index 33d806f7d9fb66e9aae5c1addbc7a4615770e9b1..b831d11623ff6a7b3db25b48d843d83bab082243 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 4ed30c6f3162e10b50289130132e7223d4ffdce5..93e0d1033ad39eeb9c75707f5b7de46e366beed3 100644 (file)
@@ -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);