New Features of Eli4.0
In previous LIDO versions non-literal terminals were considered to be symbols that may have attributes - several inherited attributes and at most one that is supplied when the node is constructed. Hence, non-literal terminals may have upper symbol computations, and their attributes may be used in adjacent and in remote contexts.
In the new LIDO version a non-literal terminal, like Ident in a rule
RULE decl: Declaration ::= Ident ':' Type END;
may supply a value to computations associated to the
TERM Ident : int;
The above construct can be omitted if the type is
Declaration.Key = DefineIdn (INCLUDING Root.Env, Ident);
There the name of the non-literal terminal stands for its value.
If there are several occurrences of a non-literal terminal in a
production, their values are distinguished by indexing their names,
The values of non-literal terminals may also be used in symbol computations.
There the notation is
SYMBOL Use COMPUTE SYNT.Key = KeyInEnv (INCLUDING Root.Env, TERM); END;
In order not to immediatly invalidate existing specifications LIGA still accepts most uses of old style terminals and internally transforms them into new style terminals.
The new LIDO version requires semicolons (';') to terminate
If computations are to be executed while the input is read
they are now to be marked
printf ("immediate reply\n") BOTTOM_UP;instead of using a
Bottom-Up attribute evaluation, i.e. attribute computations during
abstract structure tree construction ("parse-time") is no-longer the
default strategy used in Eli. To switch to Bottom-Up evaluation it has
to be activated in an .ctl specification (
Symbols that describe computational roles (e.g.
CLASS SYMBOL RangeScope COMPUTE ... END;
Symbols that occur in the tree grammar (tree symbols) are specified
TREE SYMBOL expr COMPUTE ... END;
With this extension Liga can then check whether incidentally the name
of a tree grammar symbol coincides with a
Liga will issue warning messages if there is an
In previous LIDO versions terminals were allowed to be used as
RULE: Idents LISTOF Identifier
This facility is not supported anymore.
An alternative token
If the source coordinates of contexts are used in computations, the
If there is no such coordinate usage in a certain context, that information is not stored in the tree node. The storage needed for the tree is reduced by this means.
Chain Productions of the form
Production ::= SymbName 'IS' SymbNameare no longer valid.
Specification ::= 'TYPE' TypeName [Extern] ['LISTEDTO' TypeName] Extern ::= Literal
are no longer valid.
Computations of the form
Computation ::= 'CHAINSTART' ChainAttrare no longer valid.