[Top][All Lists]

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

[Chicken-users] State machine using call/cc

From: Joel Reymont
Subject: [Chicken-users] State machine using call/cc
Date: Wed, 8 Dec 2004 09:22:58 +0000

I realize that this is a question not specific to Chicken but would
anyone have an example of a state machine implemented with call/cc?

I'm looking to have a single dispatch function that is called from C/C++
and is passed a string and should return a string to be sent out.
Dispatch would call an appropriate state machine instance (continuation?)
with an event deserialized from the passed string and the state machine
would advance to the next state internally.

I'm have no problem with the dispatch function yet as I have not gotten
to it. I just can't figure out how to do the state machine with call/cc
and have it advance from state to state upon event _as well as_ return
the result of the state's action as a string.

    Thanks in advance, Joel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]