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 5 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
您可能喜欢 Martin Fowler 的新书领域特定语言。这是一项正在进行的工作,其中大部分内容可以在线获取。它的目的是与语言无关。
下面是我发现有用的 RubyConf 的一些演示(概念至少应该映射到 Clojure):
Jeremy McAnally
You might like Martin Fowler's nascent book Domain Specific Languages. It is a work in progress and much of it is available on line. It's intended to be language agnostic.
Below are some presentations from RubyConf that I've found useful (concepts at least should map to Clojure):
Jeremy McAnally
语言实现模式 作者:Terence Parr,Antlr 和 字符串模板 ,可以说是生成解析器和词法分析器的最佳工具。
这本书目前处于“测试版”阶段,但仍然值得一读。如果您购买它,您将获得更新和最终版本。
Language Implementation Patterns by Terence Parr, the creator of Antlr and String Template, arguably the best tools to generate parsers and lexers.
The book is currently in "beta" but it is still a good read. If you purchase it, you will get updates and also the final release.
我的评估还处于早期阶段,因为这本书仍在完成中,但是DSLs in Action,http://www.manning.com/ghosh,看起来不错。
您还可以查看在 Boo 中构建领域特定语言、http://www.manning .com/rahien。
It is early in my evaluation, as the book is still being completed, but DSLs in Action, http://www.manning.com/ghosh, seems good.
You can also look at Building Domain Specific Languages in Boo, http://www.manning.com/rahien.
看起来您正在描述外部 DSL。为此,您需要设置一个解析器。
您有两个选择:自己编写(这可能很困难)或使用现有系统(例如 ANTLR )来定义语法。它是 Java,所以它应该与 Clojure 兼容。
It looks like you're describing an external DSL. For that you need to set up a parser.
You have two options: write your own (which can be difficult) or use an existing system such as ANTLR to define the grammar. It's Java so it should be compatible with Clojure.