Go up. Go to department page.

An object-oriented notation for attribute grammars

LU-CS-TR:89-42

G. Hedin

Also published in: Proceedings of the 3rd European Conference on Object-Oriented Programming (ECOOP'89), BCS Workshop Series, pages 329-345, Nottingham, U.K., July 1989. Cambridge University Press.

Abstract

This paper presents an attribute grammar notation which is based on the object-oriented concepts of classification hierarchies, inheritance, and late binding. The notation allows compact and flexible language specification through the use of inheritance and equation overriding. Furthermore, demand attributes can be implemented efficiently by using a technique similar to the one used for virtual procedures in Simula. Such attributes are important especially in incremental langauge-based environments as they do not consume storage. The notation also makes it possible to define general attributes which can be accessed without knowledge of the particular langauge modelled by the grammar. This can be utilized for integration of grammar independent tools. The notation is based on a single-inheritance classification, and a discussion is given on the problems which would arise if the notation was augmented to multiple-inheritance.