Boost logo

Boost :

From: Edward Diener (eddielee_at_[hidden])
Date: 2002-11-07 21:26:07

"Paul Mensonides" <pmenso57_at_[hidden]> wrote in message
> "Andrei Alexandrescu" <andrewalex_at_[hidden]> wrote in message
> news:aqf13l$f7e$
> > A very nice Spirit code sample would be the proverbial dogfood that C++
> eats
> > itself. To clarify:
> >
> > 1. How about an open-source C++ preprocessor (that takes care of #define
> and
> > #include) written in Spirit? Then that preprocessor could be compared
> > existing preprocessors in terms of speed and conformance.
> This one I'd like to see, but it might be too easy. There isn't much to
> Cpp.

Having tried it many years ago in C++ using Yacc/Lex, it is not nearly as
easy as it looks. The most difficult area is macro expansion and
substitution. The other thing to look out for, which is a non-standard
problem, is that every compiler of which I know defines their own macros
based on compiler options and programmers often use these macros to include
or not include lines of code. Finally there is the recursive inclusion of
header files, each with their own preprocessor directives.

Of course it is much easier than the rest of the C++ language but I don't
think anyone should underestimate how difficult it might be.

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