General Information
Tutorials
Reference Manuals
Libraries
Translation Tasks
Tools
Administration
|
LIDO - Reference ManualSyntaxThis section contains an overview over the LIDO Syntax. Outdated LIDO constructs described in the previous chapter are left out in this grammar. For further explanations refer to previous chapters.
LIDOSpec ::= Specification Specification ::= Specification Specification | | RuleSpec ';' | SymComp ';' | SymSpec ';' | TermSpec ';' | AttrSpec ';' | ChainSpec ';' RuleSpec ::= 'RULE' [RuleName] ':' Production Computations 'END' SymComp ::= SymbKind SymbName [ Inheritance ] Computations 'END' TermSpec ::= 'TERM' SymbNames ':' TypeName SymSpec ::= SymbKind SymbNames ':' [ AttrSpecs ] AttrSpec ::= 'ATTR' AttrNames ':' TypeName [ AttrClass ] ChainSpec ::= 'CHAIN' ChainNames ':' TypeName AttrSpecs ::= AttrSpecs ',' AttrSpecs | AttrNames ':' TypeName [ AttrClass ] SymbKind ::= 'SYMBOL' | 'CLASS' 'SYMBOL' | 'TREE' 'SYMBOL' AttrClass ::= 'SYNT' | 'INH' Production ::= SymbName '::=' Symbols | SymbName 'LISTOF' Elements Symbols ::= Symbols Symbols | | SymbName | Literal | '$' SymbName Elements ::= Elements '|' Elements | | SymbName Computations ::= [ 'COMPUTE' Computation ] Computation ::= Computation Computation | | Expression Terminator | Attribute '=' Expression Terminator | 'CHAINSTART' Attribute '=' Expression Terminator | Iteration Terminator | Attribute '=' Iteration Terminator Terminator ::= ';' | 'BOTTOMUP' ';' Iteration ::= 'UNTIL' Expression 'ITERATE' Attribute '=' Expression Attribute ::= SymbolRef '.' AttrName | SymbolRef '.' ChainName | RuleAttr RuleAttr ::= '.' AttrName SymbolRef ::= SymbName | SymbName '[' Number ']' Expression ::= SimpExpr [ DependsClause ] DependsClause ::= '<-' DepAttrList DepAttrList ::= DepAttr | '(' DepAttrs ')' DepAttrs ::= DepAttrs ',' DepAttrs | DepAttr DepAttr ::= Attribute | RemoteAccess | RhsAttrs SimpExpr ::= C_Name | C_Integer | C_Float | C_Char | C_String | Attribute | RemoteAccess | RhsAttrs | FunctionName '(' [ Arguments ] ')' | SymbolRef | 'TERM' [ '[' Number ']' ] RhsAttrs ::= 'RHS' '.' AttrName Arguments ::= Arguments ',' Arguments | Expression Inheritance ::= 'INHERITS' SymbNames RemoteAccess ::= 'INCLUDING' RemAttrList | [ SymbolRef ] 'CONSTITUENT' RemAttrList [ ShieldClause ] | [ SymbolRef ] 'CONSTITUENTS' RemAttrList [ ShieldClause ] [ WithClause ] RemAttrList ::= RemAttr | '(' RemAttrs ')' RemAttrs ::= RemAttr ',' RemAttrs RemAttrs ::= RemAttr RemAttr ::= SymbName '.' AttrName ShieldClause ::= 'SHIELD' SymbNameList SymbNameList ::= SymbName | '(' SymbNames ')' | '(' ')' WithClause ::= 'WITH' '(' TypeName ',' CombFctName ',' SingleFctName ',' NullFctName ')'
Literals in expressions (
Literals in productions (
This syntax distinguishes names for objects of different
kinds, e. g.
XYZName ::= Identifier XYZNames ::= XYZName | XYZNames ',' XYZNames Identifiers are written as in C. LIDO text may contain bracketed non nested comments in the style of C or Pascal /* This is a comment */ (* This is a comment *)or line comments like % The rest of this line is a comment
|