General Information
Tutorials
Reference Manuals
Libraries
Translation Tasks
Tools
Administration
|
LIDO - Reference ManualOverall StructureA LIDO text specifies an evaluator for executing computations driven by a tree walk. A tree grammar specifies the structure of trees. Computations are associated with rules and symbols of the tree grammar. Computations may depend on one another via typed attributes. In Eli a LIDO specification is usually composed of several components supplied by the user, derived from libraries, or generated by Eli tools. The components are combined into one file and then processed by LIGA.
SyntaxLIDOSpec ::= Specification Specification ::= Specification Specification | | RuleSpec ';' | SymComp ';' | SymSpec ';' | TermSpec ';' | AttrSpec ';' | ChainSpec ';'
ExamplesRULE p: Stmt ::= 'while' Expr 'do' Stmt COMPUTE Expr.postType = boolType END; SYMBOL Expr COMPUTE Compatible (THIS.preType, THIS.postType); END; ATTR preType, postType: DefTableKey; There is no restriction on the order of specifications. Any permutation of specifications has the same meaning. LIDO objects such as rules, symbols, or attributes are identified by their names. They are introduced by using them in LIDO constructs. There are no explicit declarations in LIDO. Specifications associate certain properties with an object, e. g. computations are associated with a rule, or a type with an attribute name. There may be several specifications for the same object as long as the specified properties are not contradictory.
In the syntax of this document we distinguish names for objects of different
kinds, e. g.
XYZName ::= Identifier XYZNames ::= XYZName | XYZNames ',' XYZNames All names are written as identifiers in C.
Restrictions
It is strongly recommended not to use names that begin with an underscore
or which have the form
|