]> 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:37:26 +0000 (20:37 -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 9bf7137d18dbf2aae0ea6c235e6cdd62d9f656d1..611091b428e325b05f96acecddd68248a899dd50 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 683d58225b57e1fd664c87700517d2708a2fef6e..7cb99f897d0bb1c9b23428c10ec468352dcef5c5 100644 (file)
@@ -438,12 +438,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);