Eli   Documents Get Eli: Translator Construction Made Easy at SourceForge.net.
    Fast, secure and Free Open Source software downloads

General Information

 o Eli: Translator Construction Made Easy
 o Global Index
 o Frequently Asked Questions
 o Typical Eli Usage Errors

Tutorials

 o Quick Reference Card
 o Guide For new Eli Users
 o Release Notes of Eli
 o Tutorial on Name Analysis
 o Tutorial on Type Analysis
 o Typical Eli Usage Errors

Reference Manuals

 o User Interface
 o Eli products and parameters
 o LIDO Reference Manual
 o Typical Eli Usage Errors

Libraries

 o Eli library routines
 o Specification Module Library

Translation Tasks

 o Lexical analysis specification
 o Syntactic Analysis Manual
 o Computation in Trees

Tools

 o LIGA Control Language
 o Debugging Information for LIDO
 o Graphical ORder TOol

 o FunnelWeb User's Manual

 o Pattern-based Text Generator
 o Property Definition Language
 o Operator Identification Language
 o Tree Grammar Specification Language
 o Command Line Processing
 o COLA Options Reference Manual

 o Generating Unparsing Code

 o Monitoring a Processor's Execution

Administration

 o System Administration Guide

Mail Home

LIDO - Reference Manual

Previous Chapter Next Chapter Table of Contents


Syntax

This 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 (C_Name, C_Integer, C_Float, C_Char, C_String) are written as in C.

Literals in productions (Literal) are written as strings in Pascal.

This syntax distinguishes names for objects of different kinds, e. g. RuleName, SymbName, TypeName. The syntax rules for names are omitted. The following rules are assumed for XYZNames:

    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


Previous Chapter Next Chapter Table of Contents