language-icon Old Web
English
Sign In

Attribute grammar

An attribute grammar is a formal way to define attributes for the productions of a formal grammar, associating these attributes with values. The evaluation occurs in the nodes of the abstract syntax tree, when the language is processed by some parser or compiler. An attribute grammar is a formal way to define attributes for the productions of a formal grammar, associating these attributes with values. The evaluation occurs in the nodes of the abstract syntax tree, when the language is processed by some parser or compiler. The attributes are divided into two groups: synthesized attributes and inherited attributes. The synthesized attributes are the result of the attribute evaluation rules, and may also use the values of the inherited attributes. The inherited attributes are passed down from parent nodes.

[ "Grammar", "Generative grammar", "Rule-based machine translation", "Syntax", "Parsing", "compiler writing systems", "Compiler-compiler", "Link grammar", "Two-level grammar", "Operator-precedence grammar" ]
Parent Topic
Child Topic
    No Parent Topic