Compiler-AST-Walk-Visitor: Any Examples or Documentation?

Bill Mill bill.mill at gmail.com
Fri Mar 23 20:06:20 EDT 2007


On Mar 23, 1:10 pm, Efrat Regev <efrat_re... at yahoo.com> wrote:
>      Hello,
>
>      I'm trying to write something that will translate Python code to
> pseudo-code (for teaching purposes). Googling around indicated that the
> compiler module is pertinent, especially creating a visitor to walk the
> generated AST:http://docs.python.org/lib/module-compiler.html
>
>      I can build the AST, but I can't figure out how to write the
> visitor. The package documentation didn't help me out that much, and I
> couldn't find any examples. In fact, google only came up with this
> unanswered related question:http://mail.python.org/pipermail/python-list/2006-July/392716.html
>
>      Any help is appreciated.
>
>       Thanks and Bye,
>
>        Efrat

Maybe some of the files in google codesearch that import compiler and
walk would be helpful?

http://www.google.com/codesearch?q=compiler+walk+lang%3Apython&hl=en&btnG=Search+Code

It seems from a superficial look that some of those files would be
helpful as examples.

-Bill Mill
bill.mill at gmail.com
http://billmill.org




More information about the Python-list mailing list