There are two kinds of attributes: synthesized and
inherited. The value of a synthesized attribute
represents the meaning of the symbol (e.g., val
represents the value of expressions and terms in Figure
1a). The value of an inherited attribute provides
additional contextual information (e.g., in Figure 1b,
ienv represents an environment assigning values to
variables). The synthesized attributes of terminal
symbols are called lexical attributes, and they should
be set during lexical analysis (e.g., in Figure 1a, lex is
a lexical attribute representing the actual number or
identifier).