Experiences With Domain-Specific Language Embedding in Scala

Free registration required

Executive Summary

Embedding Domain-Specific Languages (DSLs) in general-purpose programming languages offers a simpler path to implementation than developing standalone DSL processors. However, sacrifices must be made, particularly in formal analysis of DSL programs. This paper explores these tradeoffs in the context of the Kiama project that is investigating embedding of language processing DSLs in the Scala language. Examples are presented from preliminary experiments with embedding packrat parsing and strategy-based term rewriting. Particular attention is paid to the novel features of Scala that assist with this effort, including case classes, implicit conversions, and advanced support for pattern matching.

  • Format: PDF
  • Size: 138.4 KB