Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There are a lot of books on domain specific languages (DSLs). Such books talk about compilers, interpreters, parsing, lexing, semantic analysis, and other various bits someone needs to implement a DSL.

I already know how to implement a DSL; I've implemented several. However, several such DSLs have been monsters to work with. One starts out with whatever features one wants to support in the DSL, only to find that more features get added later, resulting in a mess of wacky and inconsistent conventions.

I'm going to be designing a new DSL here and I want to start off on the correct foot, with an eye this time for future expansion of the language. The few books I've been able to find on language design seemed to be focused on general purpose (and C derived) language design, which is not a path that makes sense for my domain.

What kinds of references or books are available on this topic?

share|improve this question

closed as off-topic by durron597, Snowman, MichaelT, Dan Pichelman, GlenH7 Jul 21 '15 at 14:46

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – durron597, Snowman, Community, Dan Pichelman, GlenH7
If this question can be reworded to fit the rules in the help center, please edit the question.

I have not read it, but I'd recommend the book by Martin Fowler on the subject "Domain Specific Languages". Many of his other books have proven to be very insightful and helpful in my thinking about software development. And I expect the DSL book to be as much so (it is on my to read list).

share|improve this answer
Unfortunately this talks a lot about how to implement DSLs in terms of software design, but little about how to design one people will like to use. :( – Billy ONeal Oct 21 '11 at 16:47

Practical Common Lisp goes through details of designing several DSLs. Something on denotational semantics and languages in general might add a bit of necessary understanding.

There are no widely accepted "best practices" and methodologies yet - it is still pretty much an art, so the best way of learning is by example of existing successful implementations, and of course an underlying theory of programming languages is essential.

share|improve this answer
Hmm... not sure a theory of programming languages applies much because it's not a programming language... – Billy ONeal Aug 17 '11 at 15:14
@Billy ONeal, even DSLs have semantics. – SK-logic Aug 17 '11 at 15:39
@Billy DSL is not a general-purpose programming language, but it's definitely a programming language even if it's not Turing-complete – Boris Treukhov Aug 18 '11 at 7:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.