Eli   Documents

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 Scope Graphs
 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

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.

Core.con[1]==

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.

Core.sym[2]==

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

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

Core.gla[3]==

Ident:          PASCAL_IDENTIFIER
IntNumber:      PASCAL_INTEGER
                PASCAL_COMMENT
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.

Core.lido[4]==

TERM Ident: int;
ATTR Sym: int;
CLASS SYMBOL IdentOcc COMPUTE SYNT.Sym = TERM; END;
This macro is attached to a product file.


Next Chapter Table of Contents