Re: Modularize compiler construction?

Kaz Kylheku <>
Sun, 24 Jan 2010 18:18:40 +0000 (UTC)

          From comp.compilers

Related articles
Modularize compiler construction? (Peng Yu) (2010-01-23)
Re: Modularize compiler construction? (Kaz Kylheku) (2010-01-24)
Re: Modularize compiler construction? (BGB / cr88192) (2010-01-24)
Re: Modularize compiler construction? (cr88192) (2010-01-25)
Re: Modularize compiler construction? (Hans-Peter Diettrich) (2010-01-25)
Re: Modularize compiler construction? (Peng Yu) (2010-01-25)
Re: Modularize compiler construction? (Ira Baxter) (2010-01-28)
Re: Modularize compiler construction? (George Neuner) (2010-01-28)
[4 later articles]
| List of all articles for this month |

From: Kaz Kylheku <>
Newsgroups: comp.compilers
Date: Sun, 24 Jan 2010 18:18:40 +0000 (UTC)
Organization: A noiseless patient Spider
References: 10-01-080
Keywords: design
Posted-Date: 25 Jan 2010 00:28:55 EST

On 2010-01-23, Peng Yu <> wrote:
> It seems that the current compiler construction tools (at least in
> bison and flex) are still very primitive. Let's take the following
> example to explain what I mean.

bison and flex are not tools for /complete/ compiler construction.

> easily composing different modules. It seems that there is a great
> semantic gap between what bison & flex offer and what compiler design
> need.

The gap between what you think a tool should do and what it does is
not a ``semantic gap''.

A word processor isn't a first-person shooter video game. If you
expect a word processor to be such a game, that doesn't mean there is
a ``semantic gap'' beween word processors and video games, only that
you have an unrealistic expectation.

Bison does not provide the semantics of translation, only a way to
build a parser, which is far, far from a complete translation scheme.
It can be argued that a parser-generation tool /should/ only do that
one job. A more complete compiler construction suite would still have
a parser generator tool inside it which does only parser generation.

The GNU project does have a much more complete compiler construction
suite: it's called the GNU Compiler Collection (perhaps you've heard
of it). In this suite you can write a new language as a front end
module, which re-uses the posterior modules.

Post a followup to this message

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