From: Hartmut Kaiser (HartmutKaiser_at_[hidden])
Date: 2005-02-09 18:03:07
Pavel Vozenilek wrote:
> >> - time_conversion_helper.hpp (don't know where to put it
> >> but it would come very handy many times)
> > Hmmm... Where does this belong? Any ideas?
> Maybe as small, standalone utility in date-time.
Good idea. Other thought's?
> >> Maybe also "expand" pragma could be added, which simply
> >> expands block of code, w/o explaining how.
> > Could you elaborate, please?
> When I want to check how preprocessed source looks like now
> I do things like cl /E xyz.cpp and then search through
> multimegabyte file.
> If I could have
> #pragma wave expand
> .. what is here gets expanded but the rest not
> #pragma wave expand-end
> This would help to avoid these huge files
> when I am not interested in trace output.
That will require an additional thought (or two). I'll get back to you on
> >> I would like to have something as my own private
> >> preprocessor:
> >> @@ifdef CUSTOMER_X
> >> ....
> >> @@else
> >> ....
> >> @@endif
> >> @@ifdef CUSTOMER_Y
> >> @@include "licensing_info_text"
> >> #include <...>
> >> ...
> >> @@endif
> >> Could it be described how/whether it can be done with Wawe?
> >> Or maybe even sample.
> > By default Wave respects the standard directive syntax only
> (starting with
> > a
> > '#').
> > But you can implement this very easily by providing your own lexing
> > component, which fakes the pp tokens (used internally for #include,
> > #define
> > etc.) when recognising the @@include, @@define etc. in the
> input stream.
> Maybe docs could give some hints what is needed
> to touch.
Ok, I'll add a new section about lexer customization, because this seems to
be interesting for several people.
> One possible feature: would it make sense to have macro as
> __TU_FILE__ which always expands into the name
> of "initially processed file"?
> Say one may like to automatically register modules
> where certain feature is used.
> (No idea how this would play with precompiled headers.)
The name of the translation unit is constant, right? And since wave doesn't
support precompiled headers yet, it shouldn't be a problem at all. And even
Wave will get such a feature added it is possible to keep track of this
I'll give it an additional thought, but currently I don't see any reason not
to add it to Wave.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk