Re: Are there "compiler generators"?

Thomas Koenig <>
Sun, 29 May 2022 09:14:51 -0000 (UTC)

          From comp.compilers

Related articles
Are there "compiler generators"? (Roger L Costello) (2022-05-28)
Re: Are there "compiler generators"? (Robin Vowels) (2022-05-29)
Re: Are there "compiler generators"? (Jan Ziak) (2022-05-28)
Re: Are there "compiler generators"? (2022-05-29)
Re: Are there "compiler generators"? (Thomas Koenig) (2022-05-29)
Re: Are there "compiler generators"? (Martin Ward) (2022-05-29)
Re: Are there "compiler generators"? (Fernando) (2022-05-29)
Re: Are there "compiler generators"? (gah4) (2022-05-29)
Re: Are there "compiler generators"? (2022-05-30)
Re: Are there "compiler generators"? (Hans-Peter Diettrich) (2022-05-30)
Re: Are there "compiler generators"? (Kaz Kylheku) (2022-05-30)
[9 later articles]
| List of all articles for this month |

From: Thomas Koenig <>
Newsgroups: comp.compilers
Date: Sun, 29 May 2022 09:14:51 -0000 (UTC)
References: 22-05-054
Injection-Info:; posting-host=""; logging-data="54101"; mail-complaints-to=""
Keywords: tools
Posted-Date: 29 May 2022 18:16:02 EDT

Roger L Costello <> schrieb:
> Is it still true in 2022--there are no compiler
> generators?

Consider what a compiler does can be roughly subdivided
into the follwing tasks:

a) Lexing, resulting in a stream of tokens
b) Parsing, resulting in an abstract syntax tree
c) Conversion into intermediate form, resulting in
      SSA (usually, these days)
d) Optimization of the SSA, resulting in modified SSA
e) Conversion into machine language, resulting in some
      internl representation of the machine language
f) Optimization of the machine language
g) Output to later stages (in assembler or in intermediate

Roughly speaking a)-c) is the front end, d) is the middle end and
e)-f) is the back end.

As our moderator writes,

> [There are certainly programs that will generate a combined lexer and parser
> but there's a lot more to a compiler. -John]

a) and b) are well covered. For c), you would need a machine-
implementable description of the language semantics, and there is
no such thing in widespread use. d) is a main component of today's
compilers, which is hand-crafted code. e)-g) can be covered by
machine descriptions, that gcc and LLVM have (it is debatable if
these can be called generators).

So, assuming you can use gcc or LLVM, the main gap is c) - you
would need a formal semantic description, and it would have to
be written in a way that it can be translated automatically.
That might be doable if you design your own langue with that goal.

Defining a format for language semantics which is useful for a
reasonable subset of the multitude of languages in current use and
machine-translatable (a input to a "semantic front end generator",
if you will) will be _extremely_ hard. Maybe starting with the
formal definition of Modula-2 and then thinking in two directions,
how could a semantic front end generator be built from that
description and and how could that format be extended to cover
other languages, could be the start of an approach.

Post a followup to this message

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