Philip J. Eby hacks again. This time, a parser for configuration languages whose syntax is based on Python. Particularly interesting: with the parser, you can beautifully build abstract languages that use Python for code in parts - you can convert Python blocks contained in it from the token form back into cleanly formatted and indented Python code. The parser, of course, knows all the edge cases of source formatting in Python and can handle them as well.

This is interesting because with Python, unfortunately, you don't have a macro language and therefore cannot directly map your own syntax extensions and languages with domain-specific syntax and semantics to Python - but you can build a translator for such DSLs via this parser and then convert them back into Python. Add a bit of import magic and you would have something like poor-mans-macros for Python ...