summaryrefslogtreecommitdiffstats
path: root/Tools/peg_generator/pegen
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/peg_generator/pegen')
-rw-r--r--Tools/peg_generator/pegen/build.py3
-rw-r--r--Tools/peg_generator/pegen/c_generator.py2
-rwxr-xr-xTools/peg_generator/pegen/first_sets.py3
-rw-r--r--Tools/peg_generator/pegen/grammar.py3
-rw-r--r--Tools/peg_generator/pegen/grammar_visualizer.py2
5 files changed, 4 insertions, 9 deletions
diff --git a/Tools/peg_generator/pegen/build.py b/Tools/peg_generator/pegen/build.py
index 8f9348d..931ffc7 100644
--- a/Tools/peg_generator/pegen/build.py
+++ b/Tools/peg_generator/pegen/build.py
@@ -1,12 +1,11 @@
import pathlib
import shutil
import tokenize
-import sys
import sysconfig
import tempfile
import itertools
-from typing import Optional, Tuple, List, IO, Iterator, Set, Dict
+from typing import Optional, Tuple, List, IO, Set, Dict
from pegen.c_generator import CParserGenerator
from pegen.grammar import Grammar
diff --git a/Tools/peg_generator/pegen/c_generator.py b/Tools/peg_generator/pegen/c_generator.py
index c9c6706..40004e7 100644
--- a/Tools/peg_generator/pegen/c_generator.py
+++ b/Tools/peg_generator/pegen/c_generator.py
@@ -1,7 +1,7 @@
import ast
from dataclasses import dataclass, field
import re
-from typing import IO, Any, Dict, List, Optional, Set, Text, Tuple
+from typing import Any, Dict, IO, Optional, List, Text, Tuple, Set
from enum import Enum
from pegen import grammar
diff --git a/Tools/peg_generator/pegen/first_sets.py b/Tools/peg_generator/pegen/first_sets.py
index da30eba..71be5a2 100755
--- a/Tools/peg_generator/pegen/first_sets.py
+++ b/Tools/peg_generator/pegen/first_sets.py
@@ -1,10 +1,9 @@
#!/usr/bin/env python3.8
import argparse
-import collections
import pprint
import sys
-from typing import Optional, Set, Dict
+from typing import Set, Dict
from pegen.build import build_parser
from pegen.grammar import (
diff --git a/Tools/peg_generator/pegen/grammar.py b/Tools/peg_generator/pegen/grammar.py
index 67039d5..78edf41 100644
--- a/Tools/peg_generator/pegen/grammar.py
+++ b/Tools/peg_generator/pegen/grammar.py
@@ -4,7 +4,6 @@ from abc import abstractmethod
from typing import (
AbstractSet,
Any,
- Callable,
Dict,
Iterable,
Iterator,
@@ -13,11 +12,9 @@ from typing import (
Set,
Tuple,
TYPE_CHECKING,
- TypeVar,
Union,
)
-from pegen.parser import memoize, Parser
if TYPE_CHECKING:
from pegen.parser_generator import ParserGenerator
diff --git a/Tools/peg_generator/pegen/grammar_visualizer.py b/Tools/peg_generator/pegen/grammar_visualizer.py
index b1d51d2..7362ec5 100644
--- a/Tools/peg_generator/pegen/grammar_visualizer.py
+++ b/Tools/peg_generator/pegen/grammar_visualizer.py
@@ -1,7 +1,7 @@
import argparse
import sys
-from typing import Any, Iterator, Iterable, Callable
+from typing import Any, Iterator, Callable
from pegen.build import build_parser
from pegen.grammar import Grammar, Rule