mirror of
https://github.com/davidhalter/parso.git
synced 2026-08-12 10:54:59 +08:00
Remove make_first
This commit is contained in:
@@ -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