Boost logo

Boost :

From: Stefan Seefeld (seefeld_at_[hidden])
Date: 2007-03-10 12:47:57


Hi there,

I'm using boost::wave to implement a C/C++ preprocessor for the Synopsis
(http://synopsis.fresco.org/) project. I have just been asked for support
of the '-include' command line option, which, for typical compilers, means
to preload an include file before parsing the actual input.

I wonder how to implement that with wave. The wave::context<> constructor
expects two input iterators (begin and end) which it will use during parsing.
Relying only on this would mean I have to write my own iterators (or wrapper
container) that is able to switch from one input source (the one specified by
'-include') to the next (the actual input file).

However, I believe there is a lot of value in wave::context<> being able to
do that internally (either, by allowing to reassign a new pair of iterators,
or by providing a copy constructor for the context that creates a new context
from a new pair of iterators, but inherits the state of an existing context).

Does anything like this exist ? Are there plans to support such use cases ?

Many thanks,
                Stefan

-- 
      ...ich hab' noch einen Koffer in Berlin...

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