Overview

attribute grammar


Show Summary Details

Quick Reference

A context-free grammar that has been augmented with attribute evaluation rules or conditions enabling non-context-free aspects of a language to be specified. Associated with each symbol of the grammar is a finite set of attributes or conditions. Rules for evaluating the attributes are associated with the productions of the grammar. Using these rules the attributes of each node in a parse tree may be evaluated. The attributes may either be inherited, meaning that their values are a function of the attribute of their parent node in the parse tree, or synthesized, meaning that their values are a function of the attributes of their children in the parse tree.

The concept of an attribute grammar was introduced by D. E. Knuth who suggested that the semantics of a program could be specified by the attributes of the root node in its parse tree.

Subjects: Computing.


Reference entries

Users without a subscription are not able to see the full content. Please, subscribe or login to access all content.