RE: how to "repeat " ...

"Thurn, Martin" <[email protected]> Wed, 24 May 2006 12:06:52 -0400
Newsgroups gmane.comp.lex.flex.general
Message-ID <[email protected]>
  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 " ...
=09
=09
	The following is the requirement.=20
=09
	I have a script file with the following tokens,=20
=09
	send "abc"=20
	receive=20
	wait 8=20
	repeat 10=20
	send "abc"=20
	receive=20
	wait 9=20
	repeat_end=20
=09
	If the commands between repeat and repeat_end have to be executed=20
	10(repeat count) times , is there any straightforward way in lex/flex =
to=20
	implement this?=20
=09

	________________________________

	Blab-away for as little as 1=A2/min. Make PC-to-Phone Calls =
<http://us.rd.yahoo.com/mail_us/taglines/postman2/*http://us.rd.yahoo.com=
/evt=3D39663/*http://voice.yahoo.com>  using Yahoo! Messenger with =
Voice.