compiler package vs parser
Kay Schluehr
kay.schluehr at gmx.net
Thu Apr 16 16:42:16 EDT 2009
On 16 Apr., 11:41, Robin Becker <ro... at reportlab.com> wrote:
> Is the compiler package actually supposed to be equivalent to the parser module?
No. The parser module creates a concrete parse tree ( CST ) whereas
the compiler package transforms this CST into an AST for subsequent
computations. In more recent versions those CST -> AST transformations
are performed by the runtime and the Python compiler uses those
internally produced ASTs. The Python 2.6 API to ASTs is the ast module.
More information about the Python-list
mailing list