Re: Are there "compiler generators"?

gah4 <gah4@u.washington.edu>
Wed, 1 Jun 2022 14:02:02 -0700 (PDT)

          From comp.compilers

Related articles
[9 earlier articles]
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: gah4 <gah4@u.washington.edu>
Newsgroups: comp.compilers
Date: Wed, 1 Jun 2022 14:02:02 -0700 (PDT)
Organization: Compilers Central
References: <Adh1qBBaedSlU0KnQV6Jqmq0ocPhiA==> 22-06-003
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="96736"; mail-complaints-to="abuse@iecc.com"
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:


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


Post a followup to this message

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