Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #3041

Re: Are there "compiler generators"?

From Roger L Costello <costello@mitre.org>
Newsgroups comp.compilers
Subject Re: Are there "compiler generators"?
Date 2022-06-01 11:23 +0000
Organization Compilers Central
Message-ID <22-06-003@comp.compilers> (permalink)

Show all headers | View raw


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]

Back to comp.compilers | Previous | NextNext in thread | Find similar


Thread

Re: Are there "compiler generators"? Roger L Costello <costello@mitre.org> - 2022-06-01 11:23 +0000
  Re: Are there "compiler generators"? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2022-06-01 18:05 +0000
  Re: Are there "compiler generators"? gah4 <gah4@u.washington.edu> - 2022-06-01 14:02 -0700
  Re: Are there "compiler generators"? "minf...@arcor.de" <minforth@arcor.de> - 2022-06-07 07:22 -0700
    Re: Are there "compiler generators"? Thomas Koenig <tkoenig@netcologne.de> - 2022-06-07 18:34 +0000

csiph-web