Apply the productions rules n times to the given axiom, and return the result.
(self, axiom: Iterable[Token], n: int = 1)
| 177 | left = token |
| 178 | |
| 179 | def loop(self, axiom: Iterable[Token], n: int = 1) -> Iterable[Token]: |
| 180 | """Apply the productions rules n times to the given axiom, and return the result.""" |
| 181 | for _ in range(n): |
| 182 | axiom = self.rewrite(axiom) |
| 183 | return axiom |