6.2 Attribute Grammars

An attribute grammar is a context-free grammar with the addition of attributes and attribute evaluation rules called semantic functions. Thus, an attribute grammar can specify both semantics and syntax while BNF specifies only the syntax.

Attributes

Semantic Functions

A word (or 2) about Example 1

A More Practical Example

Other Static Checks

Send questions and comments to: Karen Lemone