[Compiler-sig] Re: Status of ast-branch

Neil Schemenauer nas@python.ca
Wed, 28 Aug 2002 11:01:57 -0700


Jeremy Hylton wrote:
> >>>>> "NS" == Neil Schemenauer <nas@python.ca> writes:
>   NS> Is it going to be possible to create or modify ASTs from Python
>   NS> and pass them to the later stages of the compiler?
> 
> Yes.

Excellent.

> I don't know exactly what the API should be.  There should be one
> function that compiles source to an AST and another that compiles the
> AST to bytecode.

I think there should also be constructors or factory functions for each
node in the AST.

> I don't know if we add builtins, overload existing ones (like
> compile), extend the parser module, or come up with a new module.

I vote to put it in a module or package (reuse compiler?).  I'm guessing
the average user would not be messing with ASTs.  

  Neil