code is data

Paul Boddie paul at boddie.org.uk
Thu Jun 22 17:52:31 EDT 2006


Anton Vredegoor wrote:
> Bruno Desthuilliers wrote:
>
> > You mean like 'converting' javascript to python or python to ruby (or
> > converting any home-grown DSL to Python, etc) ?
>
> Yes, but also what some other posters mentioned, making Pythons internal
> parsing tree available to other programs (and to Python itself) by using
> a widely used standard like XML as its datatype.

http://pysch.sourceforge.net/ast.html

I was going to write a long reply to one of your previous messages, but
the above link references a project which may intersect with some of
your expectations. Meanwhile, it should be noted that the availability
of Python AST processing tools is not a recent thing: the compiler
module has been around for a long time, and it is possible to modify
the AST and to generate bytecode from it; my own experiments have
centred on producing other representations from the AST, and other more
successful projects (eg. ShedSkin) produce other languages (eg. C++)
from the AST.

Paul




More information about the Python-list mailing list