diff --git a/lark/parsers/grammar_analysis.py b/lark/parsers/grammar_analysis.py index 4386588c..28d3cb63 100644 --- a/lark/parsers/grammar_analysis.py +++ b/lark/parsers/grammar_analysis.py @@ -177,13 +177,13 @@ def __init__(self, parser_conf: ParserConf, debug: bool=False, strict: bool=Fals self.FIRST, self.FOLLOW, self.NULLABLE = calculate_sets(rules) - def expand_rule(self, source_rule: NonTerminal, rules_by_origin=None) -> State: + def expand_rule(self, source_rule: NonTerminal, rules_by_origin=None) -> OrderedSet[RulePtr]: "Returns all init_ptrs accessible by rule (recursive)" if rules_by_origin is None: rules_by_origin = self.rules_by_origin - init_ptrs = OrderedSet() + init_ptrs = OrderedSet[RulePtr]() def _expand_rule(rule: NonTerminal) -> Iterator[NonTerminal]: assert not rule.is_term, rule