kiama

A Scala library for language processing.

View the Project on GitHub

Documentation Home

User Manual Examples
Research Reading
Installation
Releases

Example: An Oberon0 compiler

Up: Examples, Prev: Lambda2

IMPORTANT NOTE: This page describes Kiama 1.x. Much of it also applies to Kiama 2.x, but not all. Please consult the 2.x release notes for the main differences. We are currently writing comprehensive documentation for 2.x that will eventually replace these pages.

A compiler for the Oberon-0 programming language defined in Niklaus Wirth’s book Compiler Construction. This implementation was constructed as part of the Tool Challenge associated with the 2011 Workshop on Language Descriptions, Tools and Applications.

The example makes extensive use of attribution, pretty printing and rewriting. It also uses Scala’s traits and mixin facility to define components of the compiler and assemble them to create the challenge artefacts.

Up: Examples, Prev: Lambda2