You can use coroutines as long as your state machine can be structured like code. Loops are Kleene closures, Ifs are alternation, and lists of statements are concatenation.
I used nested C# Enumerators to implement a parser which didn't turn into too much of a mess, but it was a small project.
Structured programming limits you in the state machines you can construct, but probably in a good way.
I used nested C# Enumerators to implement a parser which didn't turn into too much of a mess, but it was a small project.
Structured programming limits you in the state machines you can construct, but probably in a good way.