Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: anton@mips.complang.tuwien.ac.at (Anton Ertl) Newsgroups: comp.compilers Subject: Re: Are there "compiler generators"? Date: Sun, 29 May 2022 06:45:21 GMT Organization: Institut fuer Computersprachen, Technische Universitaet Wien Lines: 38 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <22-05-057@comp.compilers> References: <22-05-054@comp.compilers> Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="53684"; mail-complaints-to="abuse@iecc.com" Keywords: tools Posted-Date: 29 May 2022 18:14:55 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:3029 Roger L Costello writes: >Are there compiler generators? Apart from scanner generators and parser generators, there are also: * generators of attribute grammar evaluators (e.g., Ox). They use an attribute grammar as input. * generators of instruction selectors (e.g., burg and friends). Burg uses a tree grammar as input. * generators of virtual machine interpreters and other code dealing with virtual machine instructions (e.g., vmgen). Vmgen uses a description of the virtual machine instructions as inputs. * There is also some work on generating type checkers. All of these could be classified as non-procedural, although they tend to include some procedural code. You need to add substantial amounts of glue code to integrate the pieces generated by these generators into a compiler, especially for languages that do not quite fit in the generators' molds. Plus, there are pieces such as symbol tables and register allocation that are not covered by these generators. I have also seen a paper by a French group (don't remember the names) in the early 1990s where a generator could generate a complete Pascal compiler from a specification. My impression, however, was that the generator could only generate compilers for languages that are relatively close to Pascal, and I saw no good way to make it much more flexible. - anton -- M. Anton Ertl anton@mips.complang.tuwien.ac.at http://www.complang.tuwien.ac.at/anton/