Hi. On Thu, May 29, 2008 at 11:11 PM, Stefan Behnel <[EMAIL PROTECTED]> wrote:
> Hi, > > rahul garg wrote: > > Note on implementation : unPython is writting in Java. Hopefully that > will > > not turn people away. > > Regarding this bit: any reason you're using Java and not Jython? I remember > the Jython project working on AST support a while ago, so that might be a > good > link for you. Might be easier than making sense out of the Python AST from > Java. Yes I will be looking at Jython's AST construction. For now, reading back Python's ASTs has not been too difficult actually. I simply wrote an ANTLR grammar for the reading dumped AST files. Fortunately ANTLR returns ASTs so my job became much simpler. Currently this grammar only deals with a subset of the actual Python grammar but adding the missing stuff in the grammar is not hard. So AST construction is not a worry at the moment. I do intend to replace the frontend with something hopefully derived from Jythons frontend but this is not the top priority. Side note on Java : Actually I started writing out the compiler in Scala but that didnt work out very well and I just wrote it in Java. Going forward, plan is to replace backend code generator with Jython. Currently for code generation I use FreeMarker template library + some ad-hoc Java code but I think the task is better suited for Jython. I have also been playing with Clojure and its pretty cool too. Ability to play with different languages easily was one motivation for writing it in Java. thanks, rahul
_______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
