Hi folks,<div><br></div><div>I've been working on a hobby project for a little while now, a Python-driven C preprocessor. I'm using clang's Lex and Frontend libraries (and friends). As well as the usual stuff, it adds the ability to:</div>
<div> - define macros in Python (i.e. the macro is a Python function), inline in the C/C++ source or in the driving Python program.</div><div> - intercept and resolve missing files in #include directives using a Python callback.</div>
<div><br></div><div>So anyway, I do actually have a question: does anyone think this could be useful? I embarked on this quest initially as part of a larger project, a Python-based C++ source-to-source translator. I haven't done much on that front yet, as I ended up having too much fun bending clang to my will. If you can think of anything that it could be useful for, please let me know. As much fun as I've had, I'd like even more for it to be useful to someone.</div>
<div><br></div><div>If you're interested in reading more (only slightly more), I've written up a post on my blog. It also has instructions on installing, if you're keen to play.</div><div>    <a href="http://blog.awilkins.id.au">http://blog.awilkins.id.au</a></div>
<div><br clear="all">Cheers,<br>Andrew Wilkins<br>
</div><div><br></div><div>P.S. I'm loving Clang: very clean code, pretty easy it understand (what I've read), and very efficient!</div>