"uuid","repository link","title","author","contributor","publication year","abstract","subject topic","language","publication type","publisher","isbn","issn","patent","patent status","bibliographic note","access restriction","embargo date","faculty","department","research group","programme","project","coordinates" "uuid:759b6dda-0d5e-43b7-87f6-23bda131a7f2","http://resolver.tudelft.nl/uuid:759b6dda-0d5e-43b7-87f6-23bda131a7f2","A Pure Object-Oriented Embedding of Attribute Grammars","Sloane, A.M.; Kats, L.C.L.; Visser, E.","","2009","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.","language processing; compilers; domain-specific languages","en","report","Delft University of Technology, Software Engineering Research Group","","","","","","","","Electrical Engineering, Mathematics and Computer Science","Software Computer Technology","","","",""