|
Boost : |
Subject: Re: [boost] [wave] limited extensibility
From: Christopher Lux (christopherlux_at_[hidden])
Date: 2010-02-07 04:28:28
Hi Hartmut,
that sounds perfect.
When passing the line, i think, possible comments should be stripped
to prevent problems when this line is stripped from the output. The
on_illformed hook should also have a boolean return value signaling to
pass the line to the output or to strip it (similar to other hooks).
Regards
-chris
On Sat, Feb 6, 2010 at 7:00 PM, Hartmut Kaiser <hartmut.kaiser_at_[hidden]> wrote:
> Extending Wave to recognize more preprocessor directives without involving
> changes to the lexer seems possible by introducing a on_illformed()
> preprocessing hook and pass it the whole line starting with the faulty
> token. This would allow you to do the parsing on your own, instructing Wave
> to continue preprocessing afterwards. The default behavior of on_illformed
> would be to throw the ill_formed_directive exception as before.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk