Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: gah4 Newsgroups: comp.compilers Subject: Re: The dragon book says separating lexical analysis and parsing is beneficial, so why doesn't ANTLR separate them? Date: Thu, 9 Jun 2022 23:01:04 -0700 (PDT) Organization: Compilers Central Lines: 29 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <22-06-030@comp.compilers> References: <22-06-023@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="88723"; mail-complaints-to="abuse@iecc.com" Keywords: design, history Posted-Date: 10 Jun 2022 11:41:35 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com In-Reply-To: <22-06-023@comp.compilers> Xref: csiph.com comp.compilers:3064 On Thursday, June 9, 2022 at 9:50:50 AM UTC-7, Roger L Costello wrote: > Page 84-85 of the dragon book [1] says: > There are several reasons for separating the analysis phase of compiling into > lexical analysis and parsing. OK, no-one else has said it yet, so I will. With small memories and slow computers 70 or 60 years ago, the time and space were important. Then we had microcomputers, where we had to relearn everything learned on mainframes years before, so that was 50 or 40 years ago. But by 30 or 20 years ago, memories were big and computers fast. While programs needing compiling have also gotten larger, I am not convinced that either speed or size is much of a problem now. The separation of tasks, modular programming, often makes sense, so it is likely still reasonable to keep them separate. But I don't believe because of space or size. (Well, maybe running compilers on an Arduino Nano still have a size or space limit. But most don't do that.) There is still the old saying: "premature optimization is the root of all evil"