lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Jan 14, 2010, at 8:05 AM, David Kastrup wrote:

> No, the whole "state machine" is one coroutine.  You just program the
> control flow that is to be modelled by the state machine.  Yield/resume
> pairs are used to get new input, and the input is processed with normal
> conditionals and other branches.  Every code path containing a yield
> call corresponds to a state.

Which maps nicely to the state machine = regular language = structured programming equivalence, but I'm not sure it always maps well to the cases where one wants to use a state machine.