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: Are there "compiler generators"? Date: Sun, 29 May 2022 23:29:58 -0700 (PDT) Organization: Compilers Central Lines: 22 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <22-05-061@comp.compilers> References: <22-05-054@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="71262"; mail-complaints-to="abuse@iecc.com" Keywords: tools Posted-Date: 30 May 2022 14:47:26 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-05-054@comp.compilers> Xref: csiph.com comp.compilers:3033 On Saturday, May 28, 2022 at 7:16:21 PM UTC-7, Roger L Costello wrote: > There are lexer generators. Flex is a lexer generator. > There are parser generators. Bison is a parser generator. > Are there compiler generators? My old favorite, and probably still favorite, compiler book is: "Retargetable C Compiler, A: Design and Implementation" (It is more likely to be your favorite if you are interested in a C compiler.) LCC uses, more or less, a code generator generator. You supply the instruction combinations to do operations that are needed, and it uses dynamic programming to select the optimal code. It is usual to generate assembly code for an assembler. Mostly that leaves the middle end, especially for optimization, that doesn't have its own generator.