We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 9 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
我个人无法忍受 antlr,我使用 lex/yacc 作为我的解析器生成器。这是一个可以使用的 Python 实现 http://www.dabeaz.com/ply/ 。
不过,这只是处理解析,实际上甚至没有开始构建您的解释器。为此,您可能会从头开始构建它 - 我从未听说过专门针对此目的的库(我很高兴看到其中的一些,如果您知道任何库,请在评论中链接我)。
查看这篇文章如何开始编写一个非常简单的程序编程语言它有很好的想法。il。
I personally can't stand antlr, I use lex/yacc as my parser generator. Here is a Python implementation http://www.dabeaz.com/ply/ that you could use.
That just deals with parsing though, that really doesn't even begin to construct your interpreter. For that, you'll probably be building it from the ground up - I've never heard of a library specifically geared towards this (I would be excited to see some of them, please link me there in the comments if you know of any).
Check out this SO post how to start writing a very simple programming language it has good ideas.il.
也许你想看看这个
maybe you want to have a look at this
我可以建议 antlr 及其 python 绑定吗?
May I suggest antlr with its python binding?