This combines well with parser combinators, another nice feature of Scala which enables domain-specific languages to be syntactically designed in Scala as well as handled on the backend. Parser combinators are theoretically underpinned by functional programming concepts, and are only possible in Scala due to its support of both functional and object-oriented language paradigms. Also notable is that the parser combinator libraries are libraries; no special compiler support was added just for a parsing library (despite the terse syntax).
Below are some blogs I've read with nice examples of languages cooked up with this functionality:
- Baysick is a Scala DSL which approximates a small subset of BASIC. It is not fully compliant due to a few limitations of Scala's syntax, but nevertheless it is visually impressive.
- Debashish Ghosh implemented a simple buy/sell order language to demonstrate the simplication possible for not-so-savvy traders, or parsing a human-readable format. What's more, his post also has good background on parser combinators themselves, and shows how to command the Scala-based parser to create POJO's (plain old Java objects) as a result of the parse, which can then be used by client Java applications.
Unfortunately the API documentation for Scala's parser combinators is difficult to traverse due to the complicated class/trait hierarchy. I recommend the parser combinator technical report/mini-book written by Adriaan Moors. His page for the report is here, but the document linked there does not seem to be available. I was able to find the same document here on a related Google Code page.
Soon, I will relate my experiences of using the parser combinator library in my own project. I doubt it will be as complicated as some examples in the guide mentioned above (won't need a Context or scannerless parser) but hopefully some lessons are learned anyway.

