[Python-Dev] Please help complete the AST branch

Brett C. bac at OCF.Berkeley.EDU
Tue Jan 4 22:50:28 CET 2005


Jeff Epler wrote:
> On Mon, Jan 03, 2005 at 06:02:52PM -0800, Brett C. wrote:
> 
>>Although if someone can start sooner than by all means, go for it!
>>And obviously help would be great since it isn't a puny codebase
>>(4,000 lines so far for the CST->AST and AST->bytecode code).
> 
> 
> And obviously knowing a little more about the AST branch would be
> helpful for those considering helping.
> 
> Is there any relatively up-to-date document about ast-branch?  googling
> about it turned up some pypy stuff from 2003, and I didn't look much
> further.
> 

Beyond the text file Python/compile.txt in CVS, nope.  I have tried to flesh 
that doc out as well as I could to explain how it all works.

If it doesn't answer all your questions then just ask here on python-dev (as 
the rest of this thread has seemed to agreed upon).  I will do my best to make 
sure any info that needs to work its way back into the doc gets checked in.

> I just built the ast-branch for fun, and "make test" mostly worked.
>     8 tests failed:
>         test_builtin test_dis test_generators test_inspect test_pep263
>         test_scope test_symtable test_trace
>     6 skips unexpected on linux2:
>         test_csv test_hotshot test_bsddb test_parser test_logging
>         test_email
> I haven't looked at any of the failures in detail, but at least
> test_bsddb is due to missing development libs on this system
> 
> One more thing:  The software I work on by day has python scripting.
> One part of that functionality is a tree display of a script.  I'm not
> actively involved with this part of the software (yet).  Any comments on
> whether ast-branch could be construed as helping make this kind of
> functionality work better, faster, or easier?  The code we use currently
> is based on a modified version of the parser which includes comment
> information, so we need to be aware of changes in this area anyhow.
> 

If by tree you mean execution paths, then yes, eventually.  When the back-end 
is finished the hope is to be able to export the AST to Python objects and thus 
have it usable in Python.  You could use the AST representation to display your 
tree.

-Brett


More information about the Python-Dev mailing list