From: Kalus M. <mic...@on...> - 2008-07-16 22:15:52
|
Hi Bernard. Am 16.07.2008 um 23:32 schrieb Bernard Mentink: > I implemented the "Elegant FSM" version of Julien's code Section > 3.3 i.e: > > The FSM is then defined as > > 4 WIDE FSM: > \ input: | other? | num? | minus? | dp? | > \ state: --------------------------------------------- > ( 0 ) DROP >0 EMIT >1 EMIT >1 EMIT >2 > ( 1 ) DROP >1 EMIT >1 DROP >1 EMIT >2 > ( 2 ) DROP >2 EMIT >2 DROP >2 DROP >2 ; > > > That seems to me the most readable and flexible of all his examples. > I have given Mathias the code for including in the Lib. Well, so you finaly got used to the ]-trick of FSM: I agree, this way to set up the array realy looks good. Something like ' drop , ' >0 , .. is uglier. :-) Michael |