From c43cb21a0e87acf408b9138c3b7624cbe622d7db Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 15 Jun 2018 17:57:55 +0200 Subject: [PATCH] Add docstring --- parso/pgen2/grammar.py | 5 ----- parso/pgen2/pgen.py | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/parso/pgen2/grammar.py b/parso/pgen2/grammar.py index f48c757..1a2c6e9 100644 --- a/parso/pgen2/grammar.py +++ b/parso/pgen2/grammar.py @@ -16,11 +16,6 @@ fallback token code OP, but the parser needs the actual token code. """ -try: - import cPickle as pickle -except: - import pickle - class Grammar(object): """Pgen parsing tables conversion class. diff --git a/parso/pgen2/pgen.py b/parso/pgen2/pgen.py index b95454b..abfad0a 100644 --- a/parso/pgen2/pgen.py +++ b/parso/pgen2/pgen.py @@ -204,6 +204,9 @@ def _simplify_dfas(dfas): def _make_dfas(start, finish): + """ + This is basically doing what the powerset construction algorithm is doing. + """ # To turn an NFA into a DFA, we define the states of the DFA # to correspond to *sets* of states of the NFA. Then do some # state reduction.