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


 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


 o Eli library routines
 o Specification Module Library

Translation Tasks

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


 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


 o System Administration Guide

Mail Home

Tutorial on Name Analysis

Next Chapter Table of Contents

Kernel Grammar

The kernel grammar of the example language specifies the structure for Program, Block consisting of Declarations and Statements, and trivial Expressions. Different forms of Declarations, Statements, and Expressions are added to the grammar as the name analysis task is further refined.


Program:        Source.

Source:         Block.
Block:          Compound.
Compound:       'begin' Declaration* Statement* 'end'.

Statement:      Expression ';'.
Expression:     Operand.
Operand:        IntNumber.
This macro is attached to a product file.

Expressions and Operands are represented by Expression contexts in the tree grammar.


Expression ::= Operand.
This macro is attached to a product file.

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


IntNumber:      PASCAL_INTEGER
This macro is attached to a product file.

In the course of refining the name analysis task we will introduce several different contexts for identifier occurrences. Each occurrence has to have the attribute Sym representing the identifier encoding. Hence we specify a computational role IdentOcc that provides that attribute, and will be inherited by any identifier occurrence.


TERM Ident: int;
ATTR Sym: int;
This macro is attached to a product file.

Next Chapter Table of Contents