summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/pgen2
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib2to3/pgen2')
-rw-r--r--Lib/lib2to3/pgen2/driver.py3
-rw-r--r--Lib/lib2to3/pgen2/pgen.py2
2 files changed, 2 insertions, 3 deletions
diff --git a/Lib/lib2to3/pgen2/driver.py b/Lib/lib2to3/pgen2/driver.py
index 77e2a40..8a94f0d 100644
--- a/Lib/lib2to3/pgen2/driver.py
+++ b/Lib/lib2to3/pgen2/driver.py
@@ -21,7 +21,7 @@ import logging
import sys
# Pgen imports
-from . import grammar, parse, token, tokenize
+from . import grammar, parse, token, tokenize, pgen
class Driver(object):
@@ -123,7 +123,6 @@ def load_grammar(gt="Grammar.txt", gp=None,
gp = head + tail + ".".join(map(str, sys.version_info)) + ".pickle"
if force or not _newer(gp, gt):
logger.info("Generating grammar tables from %s", gt)
- from pgen2 import pgen
g = pgen.generate_grammar(gt)
if save:
logger.info("Writing grammar tables to %s", gp)
diff --git a/Lib/lib2to3/pgen2/pgen.py b/Lib/lib2to3/pgen2/pgen.py
index 220a71b..0c2d89e 100644
--- a/Lib/lib2to3/pgen2/pgen.py
+++ b/Lib/lib2to3/pgen2/pgen.py
@@ -2,7 +2,7 @@
# Licensed to PSF under a Contributor Agreement.
# Pgen imports
-from pgen2 import grammar, token, tokenize
+from . import grammar, token, tokenize
class PgenGrammar(grammar.Grammar):
pass