Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > how to build simple FSM using generators ?

Thread Tools

how to build simple FSM using generators ?

Posts: n/a

i've readed "Charming Python: Generator-based state machines" linux/library/l-pygen.html , but i
still can not get the point on how using generator for FSM

i'm interested in a very simple FSM which would be able to recognize
consecutive sequence of texts, please can someone give me a hint on
how to do this using yield ?

by now, my fsm is something like, having a "previous state", iterating
in a while 1 loop, advancing "previous state" to recognized word and
if len(recognized all words) is matched then a sequence had been
recognized, whatever else re-init FSM ;
but can not understand how could yield help me...

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
generators as decorators simple issue Python 7 09-12-2012 03:09 PM
Using unregistered inputs in FSM VHDL 24 07-29-2005 03:30 PM
SWsoft Acronis Disk Director Suite 9.0 Build 508, Acronis OS Selector 8.0 Build 917, Acronis Partition Expert 2003 Build 292, Acronis Power Utilities 2004 Build 502, F-SECURE.ANTI vIRUS.PROXY v1.10.17.WINALL, F-SECURE.ANTI vIRUS v5.50.10260 for CITRI vvcd Computer Support 0 09-25-2004 01:38 AM
how to build simple FSM using generators ? Joh Python 2 09-10-2004 01:49 PM