Switch to using %r in the format string.
diff --git a/Parser/asdl.py b/Parser/asdl.py
index e8f9b1c..d6f5ec5 100644
--- a/Parser/asdl.py
+++ b/Parser/asdl.py
@@ -98,7 +98,7 @@
 
     def t_default(self, s):
         r" . +"
-        raise ValueError, "unmatched input: %s" % repr(s)
+        raise ValueError, "unmatched input: %r" % s
 
 class ASDLParser(spark.GenericParser, object):
     def __init__(self):
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py
index 46f46d8..d7d2a3f 100755
--- a/Parser/asdl_c.py
+++ b/Parser/asdl_c.py
@@ -47,7 +47,7 @@
         # XXX this should be fixed for real
         if i == -1 and 'GeneratorExp' in cur:
             i = size + 3
-        assert i != -1, "Impossible line %d to reflow: %s" % (size, repr(s))
+        assert i != -1, "Impossible line %d to reflow: %r" % (size, s)
         lines.append(padding + cur[:i])
         if len(lines) == 1:
             # find new size based on brace