The Template and Multiple Inheritance Approach into Attribute Grammars

  • Authors:
  • Marjan Mernik;Mitja Lenic;E. Avdicausevic;Viljem Zumer

  • Affiliations:
  • -;-;-;-

  • Venue:
  • ICCL '98 Proceedings of the 1998 International Conference on Computer Languages
  • Year:
  • 1998

Quantified Score

Hi-index 0.00

Visualization

Abstract

Formal methods for describing programming language semantics, such as attribute grammars, operational semantics and denotational semantics, are not widely used since they are not modular, extensible and reusable. In the paper a new modular, extensible and reusable approach for specifying programming languages with attribute grammars is presented. The concepts from object-oriented programming, i.e. templates and multiple inheritance, have been integrated with attribute grammars. A template in attribute grammar is an abstraction of a semantic rule parameterized with attribute occurrences. On the other hand, the whole attribute grammar is a subject of multiple inheritance and specialization. With the proposed approach a language designer has the chance to design incrementally a language or reuse some fragments from other programming language specifications. Templates and multiple inheritance have been implemented in our compiler generator tool LISA ver. 2.0