#2725: Fix missing local, and handle errors without tracebacks.
diff --git a/Parser/asdl.py b/Parser/asdl.py
index 418ac57..ce9d0d3 100644
--- a/Parser/asdl.py
+++ b/Parser/asdl.py
@@ -405,7 +405,8 @@
     try:
         return parser.parse(tokens)
     except ASDLSyntaxError:
-        output(sys.exc_info()[1])
+        err = sys.exc_info()[1]
+        output(str(err))
         lines = buf.split("\n")
         output(lines[err.lineno - 1]) # lines starts at 0, files at 1
 
@@ -422,6 +423,8 @@
     for file in files:
         output(file)
         mod = parse(file)
+        if not mod:
+            break
         output("module", mod.name)
         output(len(mod.dfns), "definitions")
         if not check(mod):