
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@gmail.com> 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.