Re: Are there "compiler generators"?

gah4 <>
Wed, 1 Jun 2022 14:02:02 -0700 (PDT)

          From comp.compilers

Related articles
[9 earlier articles]
Re: Are there "compiler generators"? (Hans-Peter Diettrich) (2022-05-30)
Re: Are there "compiler generators"? (Kaz Kylheku) (2022-05-30)
Re: Are there "compiler generators"? (Hans-Peter Diettrich) (2022-05-31)
Re: Are there "compiler generators"? (gah4) (2022-05-31)
Re: Are there "compiler generators"? (Roger L Costello) (2022-06-01)
Re: Are there "compiler generators"? (2022-06-01)
Re: Are there "compiler generators"? (gah4) (2022-06-01)
Re: Are there "compiler generators"? ( (2022-06-07)
Re: Are there "compiler generators"? (Thomas Koenig) (2022-06-07)
Re: Are there "compiler generators"? (mac) (2022-06-09)
| List of all articles for this month |

From: gah4 <>
Newsgroups: comp.compilers
Date: Wed, 1 Jun 2022 14:02:02 -0700 (PDT)
Organization: Compilers Central
References: <Adh1qBBaedSlU0KnQV6Jqmq0ocPhiA==> 22-06-003
Injection-Info:; posting-host=""; logging-data="96736"; mail-complaints-to=""
Keywords: tools
Posted-Date: 02 Jun 2022 18:02:42 EDT
In-Reply-To: 22-06-003

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


> 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

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

Post a followup to this message

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