On Sat, 9 Sep 2006, Francis Cianfrocca wrote: >> http://rubyforge.org/projects/codeforpeople/ >> http://codeforpeople.org/lib/ruby/ > > Ugh. This is what sucks about hanging out with all you smart people, you > guys have got me thinking about this now. Ara, you're talking about a FSM > processor here, yes. it's state machine __system__: the machine and the system to process it in an async way... > but have you thought about augmenting it to handle context-free grammars? nope. but i'd take any and all patches! ;-) > Ideally I'd like to be able to define protocols textually, in BNF-like or > yacc-like form. seen this http://raa.ruby-lang.org/project/fsmgen/ i haven't used it - looked interesting... > And given that text, mechanically generate a state machine that would be > restartable so it could be event-driven. And the scanner would be pretty > funky too, it would have to be able to generate a token that means "not > enough input to scan a complete token, go to sleep now." naw, that's easy. just do consumer.q.push token_bits consumer.q.push token_bits consumer.q.push token_bits consumer.q.push token_done and the consumer is automatically sleeping as tokens arrive partially. > I've just been in the middle of implementing AMQP the old-fashioned way (by > hand) so this is timely. what's AMQP ?? -a -- what science finds to be nonexistent, we must accept as nonexistent; but what science merely does not find is a completely different matter... it is quite clear that there are many, many mysterious things. - h.h. the 14th dalai lama