开发者

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

开发者 https://www.devze.com 2023-02-21 10:30 出处:网络
Is there grammar or lexer and parser for Python (or subse开发者_运维知识库t), written in PLY?I\'ve found it myself:

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

精彩评论

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