开发者

Is there grammar or lexer and parser for Python (or subset), written in PLY?

Is there grammar or lexer and parser for Python (or subse开发者_运维知识库t), written in PLY?


I've found it myself: python4ply


Perhaps not exactly what you were looking for, but Jeremy Seik at the University of Colorado Boulder runs ECEN 4543 - Introduction to Compilers that uses a combination of the python AST module and ply to build up larger and larger subsets of python, and uses the results to produce native code. Course notes are available from here.

An impressive tutorial based on that class was given at PyCon 2010, entitled "How to Compile Python x86 Assembly, the Python Way"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜