General Information

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

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

Reference Manuals

 o User Interface
 o Eli products and parameters
 o LIDO Reference Manual

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

 Questions, Comments, ....

Tutorial on Type Analysis

Next Chapter Table of Contents


Kernel Language

We start with a very simple kernel language where a Program is a Block consisting of Declarations for variables, assignment Statements, and trivial Expressions. Other forms of Declarations and Expressions are added to the grammar when the type analysis task is further refined.

Here is a simple example program: SimpleExamp[1]==

begin
  var   int i, int j,
        bool b, bool c,
        real r, real s;
  i = 1;
  b = true;
  r = 3.4;
  j = i;
  c = b;
  s = r;
end

This macro is attached to a product file.

The concrete kernel grammar is specified as follows: Core.con[2]==


Program:        Block.
Block:          'begin' Declaration* Statement* 'end'.

Declaration:    'var' ObjDecls ';'.
ObjDecls:       ObjDecl // ',' / .
ObjDecl:        TypeDenoter DefIdent.
TypeDenoter:    TypeUseIdent.

Statement:      Variable '=' Expression ';'.
Statement:      Expression ';'.

Expression:     Factor.
Factor:         Operand.
Operand:        IntNumber.
Operand:        RealNumber.
Operand:        Variable.
Variable:       UseIdent.

This macro is attached to a product file.

The expression syntax is prepared to introduce operators of different precedences (2 for binary and 1 for unary operators). Factor and Operand are represented by Expression contexts in the tree grammar.

Opr.sym[3]==


Expression ::= Factor Operand.

This macro is attached to a product file.

The notation of identifiers and numbers is chosen as in Pascal.

Core.gla[4]==


Ident:          PASCAL_IDENTIFIER
IntNumber:      PASCAL_INTEGER
RealNumber:     PASCAL_REAL
                PASCAL_COMMENT

This macro is attached to a product file.


Next Chapter Table of Contents