Remove make_first

This commit is contained in:
Dave Halter
2018-06-22 12:54:27 +02:00
parent 1362d4f05d
commit a890ddd6cc

View File

@@ -91,15 +91,6 @@ class Grammar(object):
ilabel = self._make_label(terminal_or_nonterminal)
plans[ilabel] = DFAPlan(next_dfa)
def _make_first(self, nonterminal):
rawfirst = self._first_terminals[nonterminal]
first = set()
for terminal_or_nonterminal in rawfirst:
ilabel = self._make_label(terminal_or_nonterminal)
##assert ilabel not in first, "%s failed on <> ... !=" % terminal_or_nonterminal
first.add(ilabel)
return first
def _cache_labels(func):
def wrapper(self, label):
try: