是否有用 PLY 编写的 Python(或子集)语法或词法分析器和解析器?
是否有用 PLY 编写的 Python(或子集)语法或词法分析器和解析器?
Is there grammar or lexer and parser for Python (or subset), written in PLY?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我自己找到了:
python4ply
I've found it myself:
python4ply
也许不完全是您正在寻找的内容,但科罗拉多大学博尔德分校的 Jeremy Seik 运行ECEN 4543 - 编译器简介 使用 python AST 模块和 ply 的组合来构建越来越大的 python 子集,并使用结果生成本机代码。课程笔记可从此处获取。
PyCon 2010 上提供了基于该类的令人印象深刻的教程,标题为 “如何以 Python 方式编译 Python x86 程序集” ”
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"