Code Comments
Programming Forum and web based access to our favorite programming groups.Hello, I am trying to implement a simple loop. E.g. something like repeat 100 command1 command2 endrepeat command3 command1 The idea is to switch to an exclusive start state whenever "repeat" is match ed. Then all commands of the repeat body should be expanded and written into a temporary file. If "endrep" is matched, lex should return to the standard state. Then the input files would have to be switched. I am not sure about the switching. Maybe yacc could be used to set a global variable, too. I aam trying to get familiar with lex/yacc, but loops seem to be quite hard. The O'Reilly book sort of skips this topic, too :-( Any suggestions would be highly appreciated!
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.