Attribute grammars in Erlang
Paper i proceeding, 2015
Attribute grammars provide a modular way of defining functions over tree-shaped data, allowing each aspect of the computation to be defined as a separate attribute. We present the design and implementation of an attribute grammar system for Erlang that lets you define attributes elegantly using a special purpose syntax. In addition to the tree traversals supported by traditional attribute grammar systems, our system also provides unfold operations that makes it possible to use attributes when constructing data. Our attributes can be used to write QuickCheck generators.