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.
This is fabulous work. Nicely done.
I love this project. I'm not just saying that because I'm one of the developers --- I actually cannot write Fortran code any longer without using the patterns and STL which PyF95++ gives me. Hash tables for array storage, linked-lists for organizing and sorting data, the unit-testing framework, and the option parser add so much value for any size project.