Question

Is there a parser that:

  • is able to parse Python2.6+ code, and
  • can be run in Python2.5 (python-only, no C extensions allowed)?

NOTE: This is somewhat related to my previous quostion about class decorators.

Was it helpful?

Solution

Yes, lib2to3 can, all you need to do is to provide it with the right Grammar file (get the source code for the Python you want and copy Grammar/Grammar).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top