Path: utzoo!attcan!uunet!husc6!think!bloom-beacon!gatech!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!uiucdcs!uiucdcsm!kenny From: kenny@uiucdcsm.cs.uiuc.edu Newsgroups: comp.lang.c Subject: Re: State Machines (was Re: gotos) Message-ID: <4700012@uiucdcsm> Date: 17 May 88 16:32:00 GMT References: <1945@sugar.UUCP> Lines: 22 Nf-ID: #R:sugar.UUCP:1945:uiucdcsm:4700012:000:942 Nf-From: uiucdcsm.cs.uiuc.edu!kenny May 17 11:32:00 1988 /* Written 3:04 am May 16, 1988 by mouse@mcgill-vision.UUCP in uiucdcsm:comp.lang.c */ In article <1945@sugar.UUCP>, peter@sugar.UUCP (Peter da Silva) writes: > I submit that there is one case where gotos are no worse and possibly > better than the alternative. And that is state machine type code, as > is found in lexers. Ideally, one should use a real lexer language. [...] /* End of text from uiucdcsm:comp.lang.c */ Moreover, with the release of flex to the public, one doesn't need to be on a Un*x system to use a real lexer language; I've already heard from a gentleman who's got flex up and running on an IBM PC. The advent of Bison does the same for LR parser languages, or would were it not for the fact that whenever you use Bison, it puts the FSF copyright on your code. There are a couple of clients that I can't use Bison with, because of pre-existing agreements *not* to release the work I do for them. Kevin