Lightweight language processing in Kiama

  • Authors:
  • Anthony M. Sloane

  • Affiliations:
  • Department of Computing, Macquarie University, Sydney, Australia

  • Venue:
  • GTTSE'09 Proceedings of the 3rd international summer school conference on Generative and transformational techniques in software engineering III
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

Kiama is a lightweight language processing library for the Scala programming language. It provides Scala programmers with embedded domain-specific languages for attribute grammars and strategybased term rewriting. This paper provides an introduction to the use of Kiama to solve typical language processing problems by developing analysers and evaluators for a simply-typed lambda calculus. The embeddings of the attribute grammar and rewriting processing paradigms both rely on pattern matching from the base language and each add a simple functional interface that hides details such as attribute caching, circularity checking and strategy representation. The similarities between embeddings for the two processing paradigms show that they have more in common than is usually realised