Macro preprocessor.

Phil Hunt philh at vision25.demon.co.uk
Wed Aug 11 18:10:51 EDT 1999


In article <slrn7r291c.137.kaz at ashi.FootPrints.net>
           kaz at ashi.FootPrints.net "Kaz Kylheku" writes:
> Hi folks. I wrote a macro preprocessor that can be used with a language that
> uses indendation for statement or declaration grouping, because it is
> intelligent about dealing with leading whitespace. 

Sounds interesting. What license is it released under?

> http://users.footprints.net/~kaz/mpp.html
> 
> I haven't done work on it in a long while and I need some motivation to to add
> features to it to make it more useful. (It needs conditionals, numeric
> variables and operations, iteration constructs). It would help, like, to
> have some users. :)

Parrot (a gui builder system I'm developing) needs a preprocessor, I
might give it a go for that.

> [...] 
> If
> you don't want the # character to introduce directives, you can change it to
> something else on the fly. (If you change it within a header, the change won't
> automatically be propagated to the host file that included it.)
> 
>     #code leftbrace [
>     #code rightbrace ]
>     #code escape %
> 
>     %def foo [ bar ]    

Python uses # for comments, so this would come in useful.

-- 
Phil Hunt....philh at vision25.demon.co.uk





More information about the Python-list mailing list