Attribute grammar - Your Art History Reference Guide!

ArtHistoryClub Information Site on Attribute grammar Art History Art History Search        Art History Browse             News        Gallery        Forums        Articles        Weblinks        welcome to our free resource site for all art history lovers!

Attribute grammar

When constructing a language translation tool, such as a compiler, an attribute grammar is the formal expression of the syntax-derived semantic checks associated with a grammar. It represents the rules of a language not explicitly imparted by the syntax. In a practical way, it defines the information that will need to be in the abstract syntax tree in order to successfully perform semantic analysis. This information is stored as attributes of the nodes of the abstract syntax tree. The attributes are divided into two groups, called synthesised attributes and inherited attributes. The synthesised attributes are the result of the attribute evaluation rules also using the values of the inherited attributes. The values of the inherited attributes are inherited from parent nodes.

The strength of attribute grammars is that they can transport information from anywere in the abstract syntax tree to anywhere else, in a controlled way.

Types of Attribute grammars

Last updated: 10-20-2005 19:12:00
Last updated: 01-04-2007 01:18:57
The contents of this article are licensed from Wikipedia.org under the
GNU Free Documentation License. See original document.
Art History Search | Art History Browse | Contact | Legal info