Boost logo

Boost :

Subject: Re: [boost] The C++ Post-Processor
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2009-10-18 11:54:38

> Christian Schladetsch wrote:
> > There are efforts, but I am not aware of any within boost. I
> specifically
> > was interested in developments of Boost.Wave to make a C++ backend. I
> think
> > such would be a good thing for C++. Clang and LLVM are great, and I
> will
> > continue my support for them, but they don't have C++ at heart.
> >
> The open-source community has produced four significant C++ parsers
> that
> I'm aware of: the highly standards-compliant but hard-to-reuse G++, the
> easy-to-reuse but outdated and unmaintained Elsa, a similar project
> that
> is scarcely more maintained, and Clang, which is worked on and has
> recently reached the state where it can compile a iostreams-using Hello
> World program.
> I sincerely doubt that the community would be able to sustain yet
> another C++ parser. What is it about Clang that is insufficient to your
> (nebulous) purposes?
> You hardly need to tell the Boost community about the importance of the
> preprocessor. This is, after all, the library collection that hosts
> Boost.PP.
> The problem is that it's really hard to understand what your point is.
> It seems that you want to improve the C++ preprocessor to the point
> where it is effectively an embedded C++ implementation, so that you can
> do full LISP-style metaprogramming. It's a nice idea, but somewhat
> misguided. The preprocessor is a text replacement tool and not
> turing-complete. Enhancing it to the point of being able to process
> reflection information - where's the point? Can you think of a way to
> do
> this that wouldn't be better done by instead changing C++ so that you
> can do metaprogramming in C++ itself?
> As for a C++ interpreter, I believe there is some work underway to make
> a C interpreter based on Clang/LLVM. If that project gets off, it would
> be a small step to a C++ interpreter. Not that templates lend
> themselves very well to interpretation.
> I also believe that CERN has a limited C++ interpreter.

I agree with everything except Sebastians notion the preprocessor was not
Turing complete, because it is (this has been shown in the past). But that's
just a minor detail.

Wave is a nice tool (hey, remember, I'm biased), and it has its usage as a
first tool in a language analysis tool-chain, but in order to sustain more
complex use cases it needs more love. So, Christian, feel free to

Regards Hartmut

Meet me at BoostCon

Boost list run by bdawes at, gregod at, cpdaniel at, john at