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


Groups > comp.compilers > #3043

Re: Are there "compiler generators"?

From gah4 <gah4@u.washington.edu>
Newsgroups comp.compilers
Subject Re: Are there "compiler generators"?
Date 2022-06-01 14:02 -0700
Organization Compilers Central
Message-ID <22-06-005@comp.compilers> (permalink)
References <Adh1qBBaedSlU0KnQV6Jqmq0ocPhiA==> <22-06-003@comp.compilers>

Show all headers | View raw


On Wednesday, June 1, 2022 at 10:24:49 AM UTC-7, Roger L Costello wrote:

(snip)

> 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.

(snip, our moderator mentioned)
> [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]

There are now 3D printed houses, such as using computer controlled
concrete pouring devices.  One could accept a computerized design
for a house, and then generate it in concrete.  (I think you still need
to do the interior finishing the old way.)

One could write a system around flex, bison, and iburg, that would
accept as input a description of the language, and the output
machine instructions, that would call flex, bison, and iburg as
needed.  The description could be a slightly higher level,
or as flex/bison input with minimal wrapper.
(Maybe not so much optimization, as that tends to be more
specialized.  It could be useful as a first compiler for
a new machine.)

Many imperative languages are similar enough in structure
that it might almost work. It might be especially interesting
for those wanting to make small changes to existing
languages.

Well, I would choose a higher level language than the usual C
for output of lexer and parser.  A language with just the operations
needed for a target compiler.

One could, then, use the code generator not only for the output
from the generated compiler, but for the compiler itself.
(Assume it is for a new machine, with no compilers yet.)

Back to comp.compilers | Previous | NextPrevious in thread | Next 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