Loops

  while_loop =
    `while' expression <lazy> `do'
       instructions <lazy>
    `end' <while_loop 2>

While loops are easily handled by packaging the control expression into a lazy object and adding a while_loop method to the lazy class. Repeat-until and Repeat-forever loops can be handled similarly.

For loops can be handled by introducing an iterator class and adding a for_loop method:

  for_loop =
    `for' identifier `:=' expression `to' expression `do' <new_iterator 3>
       instructions <lazy> <for_loop 2>
    `end'