LIDO - Reference Manual
Symbols may be introduced which do not occur in the tree grammar. They are called
SymComp ::= SymbKind SymbName [ Inheritance ] Computations 'END' SymbKind ::= 'SYMBOL' | 'CLASS' 'SYMBOL' | 'TREE' 'SYMBOL'
TREE SYMBOL Expr COMPUTE SYNT.coercion = coerce (THIS.preType, THIS.postType); INH.IsValContext = true; Compatible (THIS.preType, THIS.postType); END;
A symbol specified
Note: There may be
Two sets of computations are associated with a symbol: the lower computations, which are executed in every lower context of the symbol, i. e. in a context whose production has the symbol on its left-hand side, and the upper computations, which are executed in every upper context, i. e. in a context whose production has the symbol on its right-hand side. The upper computations are executed once for each right-hand side occurrence of the symbol.
Each symbol has two disjoint sets of attributes:
In a symbol computation only attributes of that symbol may be used or
defined (except the use of remote attributes).
Those attributes are denoted
A computation that defines a synthesized (an inherited) attribute of the symbol belongs to the set of lower (upper) computations. A plain computation defining no attribute belongs to the set of lower computations (see Computations).
There may be several symbol specifications for one symbol. In that case the associated computations are accumulated.
If both a symbol computation and a rule computation define the same attribute of that symbol, the rule computation will be executed in that context, overriding the symbol computation.
Plain computations can not be overridden.
The kind of a symbol,