General Information
Tutorials
Reference Manuals
Libraries
Translation Tasks
Tools
Administration
|
LIDO - Reference ManualInheritance of Computations
A set of related computations can be associated with a
SyntaxSpecification ::= SymbKind SymbName [ Inheritance ] Computations 'END' ';' Inheritance ::= 'INHERITS' SymbNames Example: CLASS SYMBOL RootSetLine COMPUTE SYNT.GotLine = CONSTITUENTS KeySetLine.GotLine; END; CLASS SYMBOL KeySetLine COMPUTE SYNT.GotLine = ResetLine (THIS.Key,LINE); END; CLASS SYMBOL KeyPrintLine COMPUTE printf ("identifier in Line %d defined in line %d\n", LINE, GetLine (THIS.Key,o)) <- INCLUDING RootSetLine.GotLine; END; SYMBOL VarDefId INHERITS KeySetLine END; SYMBOL ProcDefID INHERITS KeySetLine END; SYMBOL UseIdent INHERITS KeyPrintLine END; SYMBOL Program INHERITS RootSetLine END;
The sets of lower and upper class computations may be accumulated from
several
A A computation is inherited only once even if there are several paths to it in the inheritance relation.
A computation for an attribute Note: Plain computations can not be overridden.
The computations inherited by a
Restrictions
The inheritance relation must not be cyclic.
If
|