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
Open PDF File

Name analysis according to scope rules

Languages usually use names to identify objects. An object is created by an explicit or implicit definition and bound to a name. In a certain range of the text occurrences of that name refer to that object. The scope rules of the language determine where that binding holds. For language implementation a unique name (key) is created for each distinct object and associated to identifiers within the scope of that binding. Name analysis is completed by certain checks of relationships between identifier occurrences as required by the language, e.g. existence of a definition for each identifier use, multiple definitions (See Common Aspects of Property Modules of Association of properties to definitions, see Check for Unique Object Occurrences of Association of properties to definitions), or identifier use before its definition (see Set a Property at the First Object Occurrence of Association of properties to definitions).

This library contains a set of modules which can be used to implement the name analysis task according to a large variety of language rules. The results of these modules are used to check required relationships between identifier occurrences and to solve further subtasks of language implementation, such as type analysis or transformation. Solutions of these tasks are supported by modules of other libraries: Property Library of Association of properties to definitions, Type Analysis of Type analysis tasks, Generating Output of Tasks related to generating output.

The module support for name analysis is decomposed into subtasks of increasing complexity. They are described in subsections each. There you find three solution variants for Algol-like, C-like scope rules, and C-like scope rules computed bottom-up while the input is read:

The use of these modules is demonstrated and explained in Eli's tutorial on name analysis. (see Overview of Tutorial on Name Analysis).

It contains three complete executable specifications called

   AlgLike.fw,
   CLike.fw, and
   BuCLike.fw

You can obtain a copy of these specifications by calling Eli and requesting

   $elipkg/Name/Examples > .

This request creates a subdirectory Examples in your current working directory containing the example specifications, test input files, and an Odinfile for automatic regression testing.