Hartmut, You are the best! I will download the cvs head revisions.
-----Ursprüngliche Nachricht----- Von: Hartmut Kaiser [mailto:hartmut.kaiser@gmail.com] Gesendet: Mittwoch, 4. Juli 2007 21:31 An: boost-users@lists.boost.org Betreff: Re: [Boost-users] [wave] some more question...
[...]
The changes are committed to Boost::CVS head. Please note that in order to implement this correctly I had to fix a bug in Spirit as well, which is currently committed to the CVS::HEAD only (we'll try to get this into 1.34.1, but can't promise...).
If I get CVS Head revisions of wave and spirit, this should be fine. Isn't it?
My other question would be: Is there any change to allow the hooking interface to specify, which preprocessor directives should be expanded, an which not. Let me summarize:
I need some few macros to be expanded, which are defined in some 2-3 headers and I do not want wave to preprocess everything (huge source dir). Ideally, it would be great to have some functionality, which can notify the preprocessor whether to skip the preprocessing directive or not, e.g. function void found_include_directive(std::string const &filename, bool include_next); (as well as other functions like expanding_function_like_macro) from the default_preprocessing_hooks interface could additionaly return bool value, which would notify the preprocessor whether to include and expand the file/macro or not. May be in this second case I could solve the first problem as well, since I don't really need these defines, they are parsed as part of dependency, which is not required in my case.
This isn't implemented yet and requires a bit more effort to do so. Give me some time to think about this, ok?
I can live with the really quick bug fixes you submitted. But I think this can be a nice to have feature, to control the preprocessing process. ;)
But there is another feature, which might be interesting for you in this context. The Wave driver tool has some #pragma's allowing to redirect or suppress the genereated output, which actually gives you some kind of partial preprocessing feature:
#pragma wave option(output: "preprocessed/directory.hpp")
Where the argument to the output option may be a "file name", null (no output), default (output as specified on the command line), or push/pop (with the obvious semantics).
If I correctly understand you, I can predefine pragma directives and pass them to context, to suppress some output?? If so, it can be a workaround, but with some harder work to do as the iversion ;) My intention would be to define only 3 headers which might be required for my preprocessing task, as to enumerate all other 30 which should be excluded... And in my case there are different headers (to be excluded) in different app modules, but these 3 headers stay the same.
HTH Regards Hartmut
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Best Regards, Ovanes