BlockIt provides a Python framework to scan and parse a program file into constituent nested blocks, however defined, forming a block tree of your code and can be used as a mechanism to "extend" in some sense, the underlying programming language.
A Python-based macro processing tool to extend C-like languages with DSLs. MP reduces the amount of work necessary to extend C by extracting the relevant blocks to process and calling user-supplied Python functions to handle the macro.