Search code examples
javapythoncompiler-constructionprogramming-languagesinterpreter

Building a compiler or interpreter using Python


Right now I'm writing my PhD proposal to build a language processor for a new specification language for Java (cf. JML, or Spec# for C#) and need to nail down an implementation tool to start development. The research aspects of the language (syntax, semantics, theoretical results) are orthogonal to my choice of implementation, so I'd like to use Python (2.6+) for my own reasons. The end-product will be either a compiler or interpreter capable of verifying some specified properties for programs written in Java.

What's the best framework/library for building compilers/interpreters in Python? Are the "batteries included" for this problem?

Bonus points awarded to solutions that have reference compilers for Java 6+.


Solution

  • maybe you want to have a look at this