A Parser Generator System for Level-based Programming Languages

by Michael Hanus, Jan Rasmus Tikovsky

Proc. of the 9th Working Conference on Programming Languages (ATPS 2016), Software Engineering 2016, CEUR Workshop Proceedings 1559, pp. 3-24, 2016

A programming language is usually taught by starting with a small kernel that is continuously extended to the full set of language features. Unfortunately, the existence of advanced language features might confuse students if they accidentally use them and get incomprehensible error messages. To avoid these problems, one should group the language features into different levels so that beginners start with a simple level and advance to higher levels with more features if they become more experienced. In order to support such a concept for arbitrary programming languages, we present a parser generator system, called Levels, for level-based programming languages. With a level-based language, one can stepwise increase the language level in order to match the experience of the students. Furthermore, one can implement level-specific semantic analyses in order to provide comprehensible error messages. Our Levels system generates level-specific parsers from a unified syntax description and provides an infrastructure to implement level-specific semantic analyses as well as program editors to develop level-specific programs.

PDF (277 KB) BibTeX-Entry Online