in reply to Recursive parse -

It happens to be SQL, but not sure that matters directly.

Sure it does, SQL::Statement, parse sql