开发者

Does anyone know of a good reference for DSL design? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

开发者_如何学编程

Closed 4 years ago.

Improve this question

I've been looking into designing some Domain Specific Languages which I will probably implement in Clojure, but I really don't have any idea of what's involved.

The languages I have in mind are intended to be abstract languages that are readable by domain experts with little or no programming background.

Does anyone know of any tutorials, books, or other references that would be helpful?


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):

  • Jive Talkin': DSL Design and Construction, Jeremy McAnally
  • Advanced DSLs in Ruby, Neal Ford
  • Domain Specific Languages (DSL's), Jim Weirich


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜