1. Oberon-0 in Kiama.
- Author
-
Sloane, Anthony M. and Roberts, Matthew
- Subjects
- *
PROGRAMMING languages , *DOMAIN-specific programming languages , *COMPUTER software , *SCALA (Computer program language) , *COMPILERS (Computer programs) , *COMPUTER science research - Abstract
The Kiama language processing library is a collection of domain-specific languages for software language processing embedded in the Scala programming language. The standard Scala parsing library is augmented by Kiama's facilities for defining attribute grammars, strategy-based rewriting rules and combinator-based pretty-printing. We describe how we used Kiama to implement an Oberon-0 compiler as part of the 2011 LDTA Tool Challenge. In addition, we explain how Scala enabled a modular approach to the challenge. Traits were used to define components that addressed the processing tasks for each Oberon-0 sub-language. Combining the traits as mixins yielded the challenge artefacts. We conclude by reflecting on the strengths and weaknesses of Kiama that were revealed by the challenge and point to some future directions. [ABSTRACT FROM AUTHOR]
- Published
- 2015
- Full Text
- View/download PDF