parse do and while