Re: Are there "compiler generators"?

Roger L Costello <costello@mitre.org>
Wed, 1 Jun 2022 11:23:43 +0000

          From comp.compilers

Related articles
[7 earlier articles]
Re: Are there "compiler generators"? gah4@u.washington.edu (gah4) (2022-05-29)
Re: Are there "compiler generators"? anton@mips.complang.tuwien.ac.at (2022-05-30)
Re: Are there "compiler generators"? DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2022-05-30)
Re: Are there "compiler generators"? 480-992-1380@kylheku.com (Kaz Kylheku) (2022-05-30)
Re: Are there "compiler generators"? DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2022-05-31)
Re: Are there "compiler generators"? gah4@u.washington.edu (gah4) (2022-05-31)
Re: Are there "compiler generators"? costello@mitre.org (Roger L Costello) (2022-06-01)
Re: Are there "compiler generators"? anton@mips.complang.tuwien.ac.at (2022-06-01)
Re: Are there "compiler generators"? gah4@u.washington.edu (gah4) (2022-06-01)
Re: Are there "compiler generators"? minforth@arcor.de (minf...@arcor.de) (2022-06-07)
Re: Are there "compiler generators"? tkoenig@netcologne.de (Thomas Koenig) (2022-06-07)
Re: Are there "compiler generators"? acolvin@efunct.com (mac) (2022-06-09)
| List of all articles for this month |
From: Roger L Costello <costello@mitre.org>
Newsgroups: comp.compilers
Date: Wed, 1 Jun 2022 11:23:43 +0000
Organization: Compilers Central
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="19522"; mail-complaints-to="abuse@iecc.com"
Keywords: design, comment
Posted-Date: 01 Jun 2022 13:24:47 EDT
Thread-Topic: Are there "compiler generators"?
Thread-Index: Adh1qBBaedSlU0KnQV6Jqmq0ocPhiA==

Page 161 of the book "Introducing Compiling Techniques" by J.P. Bennett says:
---------------------
Code generator generators


Just as there are parser generators, so there are code generator
generators. In general they all use the same idea, to match patterns
of instructions generated by the front end to patterns of instructions
available to the target machine.


IBURG


Iburg generates a fast tree parser. It takes a grammar describing the
patterns to be matched, with actions that generate the target code.
The grammar is augmented by the 'cost' of the code generated, and is
in general ambiguous. The Iburg generated parser finds the lowest cost
parse of a given sentence. Typically the cost will be the execution
time of the code, but for a compiler concerned with compact code
generation, it could be code size.


The idea of using a grammar to describe target code, and finding the
lowest cost parse, in order to generate the best code predates Iburg.
An early system due to Susan Graham used YACC productions to achieve
the same end.


---------------------


Wow!


So a compiler can be generated declaratively by using a set of
declarative generator tools, e.g., Flex for lexical analysis, Bison
for syntax/semantic analysis, and Iburg for code generation.


Has anyone used this combination of tools to create a whole compiler?


/Roger
[I expect that someone has used lex, yacc, and iburg in the same
compiler sometime in the past 30 years. But that doesn't mean that
they combine into a compiler generator any more than a saw, a hammer,
and a paintbrush combine into a house generator. They're tools, each
does what it does. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.