queue.append(n)
qhead += 1
- def lookahead_item_set_shift(self, items, terminal):
+ def lookahead_item_set_action(self, items, terminal):
next_items = []
next_item_to_index = {}
reductions = set()
value_stack.append(i)
state_stack.append(items)
items, item_to_index, reductions, _, _ = (
- self.lookahead_item_set_shift(items, lookahead_character)
+ self.lookahead_item_set_action(items, lookahead_character)
)
if len(items) != 0:
if len(reductions) != 0:
value_stack.append((pos, off))
state_stack.append(items)
items, item_to_index, reductions, _, _ = (
- self.lookahead_item_set_shift(items, lookahead_character)
+ self.lookahead_item_set_action(items, lookahead_character)
)
if len(items) != 0:
if len(reductions) != 0:
terminal = 0
while terminal < self.n_terminals:
next_items, next_item_to_index, reductions, terminal0, terminal1 = (
- self.lookahead_item_set_shift(items, terminal)
+ self.lookahead_item_set_action(items, terminal)
)
assert terminal0 == terminal and terminal1 > terminal
if len(next_items) != 0:
terminal = 0
while terminal < self.n_terminals:
next_items, next_item_to_index, reductions, terminal0, terminal1 = (
- self.lookahead_item_set_shift(items, terminal)
+ self.lookahead_item_set_action(items, terminal)
)
assert terminal0 == terminal and terminal1 > terminal
if len(next_items) != 0: