Better HN
topnewbestaskshowjobs
Log inSign up

0fa2

3 karma · joined May 15, 2012 (14y ago) · 1 submissions

Submissions

comment 14y ago · link · parent

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.