Replace recursion with a loop in our parser combinators