mirror of
https://github.com/davidhalter/parso.git
synced 2026-10-24 21:47:22 +08:00
Remove make_first
This commit is contained in:
1 parent
1362d4f05d
commit
a890ddd6cc
1 file changed
-9
@@ -91,15 +91,6 @@ class Grammar(object):
|
|||||||
ilabel = self._make_label(terminal_or_nonterminal)
|
ilabel = self._make_label(terminal_or_nonterminal)
|
||||||
plans[ilabel] = DFAPlan(next_dfa)
|
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 _cache_labels(func):
|
||||||
def wrapper(self, label):
|
def wrapper(self, label):
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in new issue
Block a user