<http://www.cs.brown.edu/~sk/Publications/Talks/SwineBeforePe...; is a fun talk that describes an implementation of state machines in Scheme macros. With a good compiler, those tail calls will be translated to local branches!
Also thanks for this: http://news.ycombinator.com/item?id=134834
It's a wonderfully useful statement, and gets at what I was trying to get at much better than I could.
I stand by SMC being a better fit for simple finite state machines (eg: the kind best specified using state charts); typical uses I've put SMC towards are for ensuring consistency of internal state in complicated UI elements and similar tasks...for which there's no real 'regular language' that needs parsing (or, at least: no real gain to be had in setting up a regular language of input-events when state charts will do).
I'm guessing you're the thurston behind ragel: thank you for making ragel, for making it available, and for making it so well; it is an extremely high-quality piece of work.
But +1 for SMC; used it quite a few times already, in many cases in new product versions replacing legacy code where the original insisted to implement a partially-identified state machine "by hand" (and invariably ended up tripping over all sorts of unforeseen and edge cases).
I've also found that merely the exercise of thinking in terms of FSM definition, often helps to simplify the problem (for example by identifying that there may actually be multiple independent/"orthogonal" FSMs present, instead of one monolithic one).
The difference is that ragel is oriented around consuming a stream-of-chars: the generated state machine expects to be consuming chars as input.
You can pick up on this in the writeup even though Zed's not pointing it out: he first has to define his messages as chars (eg: 'done' == 'D'), then he specifies his states + transitions in terms of those definitions.
SMC instead generates methods for each 'message' and it's the enveloping program's responsibility to call the correct method to update the state.
This is cleaner for simpler state machines.
None of this is intended as a knock on ragel, btw: it's a very solid piece of software, and for more-complicated state machines should be the go-to choice.