Print Email Facebook Twitter A Pure Object-Oriented Embedding of Attribute Grammars Title A Pure Object-Oriented Embedding of Attribute Grammars Author Sloane, A.M. Kats, L.C.L. Visser, E. Faculty Electrical Engineering, Mathematics and Computer Science Department Software Computer Technology Date 2009-12-31 Abstract This paper is a pre-print of: Anthony M. Sloane, Lennart C. L. Kats, Eelco Visser. A Pure Object-Oriented Embedding of Attribute Grammars. In T. Ekman and J. Vinju, editors, Proceedings of the Ninth Workshop on Language Descriptions, Tools, and Applications (LDTA’09), Electronic Notes in Theoretical Computer Science. York, United Kingdom, March 2009. Attribute grammars are a powerful specification paradigm for many language processing tasks, particularly semantic analysis of programming languages. Recent attribute grammar systems use dynamic scheduling algorithms to evaluate attributes by need. In this paper, we show how to remove the need for a generator, by embedding a dynamic approach in a modern, object-oriented programming language to implement a small, lightweight attribute grammar library. The Kiama attribution library has similar features to current generators, including cached, uncached, circular, higher-order and parameterised attributes, and implements new techniques for dynamic extension and variation of attribute equations. We use the Scala programming language because of its combination of object-oriented and functional features, support for domain-specific notations and emphasis on scalability. Unlike generators with specialised notation, Kiama attribute grammars use standard Scala notations such as pattern-matching functions for equations and mixins for composition. A performance analysis shows that our approach is practical for realistic language processing. Subject language processingcompilersdomain-specific languages To reference this document use: http://resolver.tudelft.nl/uuid:759b6dda-0d5e-43b7-87f6-23bda131a7f2 Publisher Delft University of Technology, Software Engineering Research Group ISSN 1872-5392 Source Technical Report Series TUD-SERG-2009-004 Other version https://doi.org/10.1016/j.entcs.2010.08.043 Part of collection Institutional Repository Document type report Rights (c) 2009 Software Engineering Research Group, Department of Software Technology, Faculty of Electrical Engineering, Mathematics and Computer Science, Delft University of Technology. All rights reserved. No part of this series may be reproduced in any form or by any means without prior written permission of the publisher. Files PDF TUD-SERG-2009-004.pdf 270.72 KB Close viewer /islandora/object/uuid:759b6dda-0d5e-43b7-87f6-23bda131a7f2/datastream/OBJ/view