A repeated verb followed by the particle 着 (zhe) is used to show that an action has be repeated for a period of time, and as a result a new situation has arisen which the speaker wishes to comment on.
Structure
Verb + 着 + Verb + 着 + 就 + Comment + 了
Examples
说着 说着 我 就 发现 自己 也 糊涂 了。I was talking and talking, and then I confused myself.
我 今天 一直 都 在 看 语法 的 书, 看着 看着,就 睡着 了。Today, I was constantly studying the grammar books. As I was studying, I fell asleep.
我 在 北京 的 胡同 里 走 着 走 着 就 走丢 了。As I was walking in one of Beijing's back roads, I got lost.