是否有用 PLY 编写的 Python(或子集)语法或词法分析器和解析器?

发布于 2024-10-29 19:02:30 字数 44 浏览 14 评论 0原文

是否有用 PLY 编写的 Python(或子集)语法或词法分析器和解析器?

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

慵挽 2024-11-05 19:02:30

我自己找到了:
python4ply

I've found it myself:
python4ply

独享拥抱 2024-11-05 19:02:30

也许不完全是您正在寻找的内容,但科罗拉多大学博尔德分校的 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"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文