in reply to Parse::RecDescent

Try Give these a shot:

Text::Balanced or Regexp::Common::balanced