Teaching compiler construction and language design: making the case for unusual compiler projects with postscript as the target language

  • Authors:
  • Martin Ruckert

  • Affiliations:
  • Munich University of Applied Sciences, München, Germany

  • Venue:
  • Proceedings of the 38th SIGCSE technical symposium on Computer science education
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper presents an unusual programming language, textttklx, illustrating the type of compiler construction projects the author uses successfully to accompany a mostly traditional lecture on compilers.The target processor of textttklx is the PostScript interpreter, and the paper argues that this is a very good choice. A PostScript interpreter simulates an elegant stack machine with built-in graphic capabilities. It is the perfect target for languages like textttklx, making them easy to implement and fun to use. The exact definition of the source language is an integral part of the student project.The use of non standard languages and a non standard target fosters student creativity in language design and implementation. It invites "out of the box" thinking, and prepares the knowledge transfer from the rich tradition of compiler construction to new and forthcoming areas of computer science.