When you scan "repeat N", remember N and go into state R.
When you scan a command in state R, append the command onto array A.
When you scan "repeat_end", emit array A N times, clear A, and go back to
state INITIAL.
- - Martin
P.S. Please send only PLAIN TEXT email to mailing lists.
P.P.S. I hope I'm not doing your homework for you 8-)
________________________________
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of bhaarthi
R
Sent: Wednesday, May 24, 2006 00:38
To: [email protected]
Subject: how to "repeat " ...
The following is the requirement.
I have a script file with the following tokens,
send "abc"
receive
wait 8
repeat 10
send "abc"
receive
wait 9
repeat_end
If the commands between repeat and repeat_end have to be executed
10(repeat count) times , is there any straightforward way in lex/flex
to
implement this?
________________________________
Blab-away for as little as 1ยข/min. Make PC-to-Phone Calls
<http://us.rd.yahoo.com/mail_us/taglines/postman2/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com>
using Yahoo! Messenger with Voice.
_______________________________________________
help-flex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-flex