From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,99222a5bd46ef3c9 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: GOTO considered necessary (reworked) Date: 1997/06/21 Message-ID: #1/1 X-Deja-AN: 251520237 References: <5nn2fm$11dk$1@prime.imagin.net> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-06-21T00:00:00+00:00 List-Id: In article , Robert Dewar wrote: >Bob Duff said > ><with loops and ifs and case statements, rather than as above. That is, >forget that it's a FSM, and just write it in the natural way. ("An >identifier is a letter, followed by a sequence of zero or more letters >and digits" translates quite nicely into loops, not gotos.) I know you >agree, since I've seen the GNAT lexer.>> > >You may have seen it, but you have not read it all, it has a number of >gotos of the FSM type in it. Of course it is not full of this, because >FSM's don't have much to do with lexical analyzers except in unusual cases. I've read it all. It has very few gotos (and those, I didn't object to). Mostly, it's made of loop/if/case. It certainly doesn't fit into the pattern envisioned in this thread about FSM's, where every state starts with a label, and every state "goto"s the next state. - Bob