Boost logo

Boost Users :

From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2007-06-07 19:19:00


 
Ludovic Aubert wrote:

> thank you, that solved this first issue. thank you for your
> prompt response. I now want to keep it from skipping
> withespaces. I haven't figured out how to do this yet, but I
> will follow your advice about the driver.

You can configure Wave to leave all the whitespace in the generated token
stream. This is a bit tricky, though. You'll have to do two things:

A) The Wave library itself may be instructed to leave the comments in the
generated output token stream using

    ctx.set_language(
        boost::wave::enable_preserve_comments(
            ctx.get_language()));

B) You'll have to implement the may_skip_whitespace() pp hook returning
'false' for all tokens. This instructs the Wave library not to remove any
whitespace tokens from the generated output.

Both options are implemented in the wave driver (search for the --preserve
command line option), looking there will reveal all the magic...

HTH
Regards Hartmut


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net