ysth, Thank you for the respone.
But here the scenario is that, while parsing, we dont know anything about the line we are going to return to. So we cant save at any line.
Eg; while parsing, we see a "$" sign at the 20 th line(can vary). when we see a "$" sign at any line,we have to read the 3rd line back.Now we have to move to 17th line(3 lines back). When i was parsing and reached 17th line in order , i didnt know that i had to return to this line. so i cant save it. only after reaching the 20th line, i know that i have to return to the 17th line.