Chapter 7. DSL infrastructure with Rhino DSL
In this chapter
- Understanding DSL infrastructure
- Rhino DSL structure
- Common DSL idioms
- Batch compilation and caching
By now, you’ve heard about Rhino DSL several times. I keep saying that it’s a library that makes building DSLs easier, but I’ve never gone into the details. This chapter will address that omission.
We’ll go over Rhino DSL in detail and see what it has to offer and under what circumstances you might want to roll your own DSL infrastructure instead. This chapter isn’t intended to replace API documentation; it’s intended to review what a DSL infrastructure should offer and how Rhino DSL measures up.
To be clear, you don’t need to use Rhino DSL to build DSLs in Boo. Rhino DSL is merely an aggregation of idioms that I have found useful across many DSL examples.
Before we get into Rhino DSL, let’s consider what we want from a DSL infrastructure, and why we need one in the first place. There is a set of problems that we need to deal with and resolve in order to build production-quality DSLs, including the following: