Boost logo

Boost :

Subject: Re: [boost] The C++ Post-Processor
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2009-10-18 11:15:57


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.

Sebastian


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk