logo       

Re: EasyExtend meets Pyrex: msg#00012

python.pyrex

Subject: Re: EasyExtend meets Pyrex

kay schluehr wrote:
> Unfortunately I don't know if there is
> an elegant way of compiling/transforming the list shaped nodes such that
> they Pyrex compiler can handle them. A back-transformation from a
> constructed Pyrex parse tree to source code is feasible but it seems to
> be excessive to me.

Constructing a Pyrex parse tree directly is possible, but
you'll have to study the source quite a bit to find out
how to do it. The parse tree node classes are defined in
Pyrex.Nodes and Pyrex.ExprNodes. You might also want to
look at Pyrex.Parsing for hints on how to put them together
to represent Pyrex source code constructs. Then you'll
also have to look at Pyrex.Main and find a way to bypass
the parser and inject your parse tree into the compilation
process.

I'll leave it up to you to decide whether that's less
work than just generating source. :-)

--
Greg


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise