Path: utzoo!yunexus!geac!daveb From: daveb@geac.UUCP (David Collier-Brown) Newsgroups: comp.software-eng Subject: Re: Control flow and common sense Message-ID: <2700@geac.UUCP> Date: 5 May 88 12:49:05 GMT Article-I.D.: geac.2700 Posted: Thu May 5 08:49:05 1988 References: <4605@ihlpf.ATT.COM> <5110@pucc.Princeton.EDU> Reply-To: daveb@geac.UUCP (David Collier-Brown) Organization: /usr/lib/news/organisation Lines: 30 In article <5110@pucc.Princeton.EDU> EGNILGES@pucc.Princeton.EDU writes: | If you are not too concerned about efficiency, the best | way to implement a finite state machine is as a two-dimensional | table searched by old state and current symbol, yielding new | state and perhaps some representation of an action to be carried | out. The neat thing is that your end users can check or even | specify the table, and (if your project is sufficiently complex) | the table can serve as the basis for tools that draw finite-state | diagrams, check test coverage, or even produce automated documentation. Yup! try using Wart, from the kermit distribution. It is a full-fleged (if trivially inefficent) DFA compiler ,with a very nice notation: event { some code } event { more code } event { general-case code } --dave (I have a slightly more compact version, wart2) c-b -- David Collier-Brown. {mnetor yunexus utgpu}!geac!daveb Geac Computers International Inc., | Computer Science loses its 350 Steelcase Road,Markham, Ontario, | memory (if not its mind) CANADA, L3R 1B3 (416) 475-0525 x3279 | every 6 months.