return "%s(pc=%r, actions=%r)" % (
type(self).__name__, self.pc, self.actions)
- def Child(self, actions, params, rank, repeat=1):
+ def Child(self, action, params, rank, repeat=1):
+ actions, params = action(params, rank)
return type(self)(self, actions, params, rank, repeat)
def vanish(self):
action = self.actions[self.pc]
if isinstance(action, (parser.ActionDef, parser.ActionRef)):
- actions, params = action(s_params, rank)
- child = self.__class__(self, actions, params, rank)
+ child = self.Child(action, s_params, rank)
owner.replace(self, child)
child.step(owner, created)
break