适用于 C# 以外其他语言的类似 Irony 解析器的软件?
是否有任何程序可以执行 Irony .NET 语言实现工具包 的功能,但适用于其他编程语言?
Are there any programs that do what Irony .NET language implementation kit does, but for other programming languages?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Irony 的语法使用类似 BNF 的表示法在 C# 中进行编码,但当然您可以使用它来解析您自己的语言或其他语言。
如果您正在寻找一个没有用 C# 编码的语法的解析器/生成器,请尝试类似 ANTLR 。使用 ANTLR,您可以在语言描述文件中单独定义语法。
Irony's grammar is encoded in C# with a BNF like notation, but of course you can use it to parse your own or other languages.
If you are looking for a parser/generator that doesn't have its grammar encoded in C#, try something like ANTLR. With ANTLR, you define your grammar separately in a language description file.
还有其他几种语言的解析器组合器库,仅举几例:
There are parser combinator libraries for several other languages, just to name a few:
Python 有 PLY,它是 Lex/Yacc 的包装器。
一旦您了解了他们希望您如何使用它并弄清楚如何浏览简陋的文档,它就非常容易使用。 PLY 拥有比 Irony 更好的文档,但门槛设置得很低。
我从 PLY 开始,但发现 Irony 是一个更令人愉快的框架,因为:
MakeStarRule
等),而在 PLY 中完成同样的事情是可行的,但是麻烦。祝所有开始使用 Lex/Yacc 的人好运旅行!
Python has PLY, which is a wrapper around Lex/Yacc.
It's quite easy to use once you wrap your head around how they want you to use it and you figure out how to navigate the skimpy documentation. PLY has better documentation than Irony, but the bar is set pretty low.
I started out with PLY, but am finding Irony to be a more enjoyable framework because:
MakeStarRule
etc.), whereas accomplishing the same thing in PLY is doable, but cumbersome.Good luck to anyone starting out on their Lex/Yacc journey!