[ragel-users] selecting a starting state or how to serialize a machine

Adrian Thurston thurs... at cs.queensu.ca
Fri Mar 2 21:36:17 UTC 2007


Hi Jason, you can save off the cs variable. Also, you can tell ragel that it
should access cs using a pointer, so that the current state lives somewhere
other than the current function. Do this with "access data_pointer->;"

Adrian

Jason wrote:
> I am finding more uses for ragel all the time :-)
> Now I am experimenting with using a ragel to model work flow logic.
> For example, a document has an associated state, approved, rejected,
> pending, etc. So I want to load the document and "post" events that
> will drive the document status to new states, triggering actions
> along
> the way.
> 
> So the question is: How do I tell a ragel machine I want to start at
> a
> particular point (where it left off before)?
> 
> Do I just archive the entire machine variables (fixing up pointers of
> course)?
> 
> thanks,
> Jason
> 
> 
> 



More information about the ragel-users mailing list