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 Reference Manual

This library contains a module and a set of roles that can be used to implement the name analysis task for both simple languages with nested scopes and complex languages that may involve inheritance, context-dependent access rules, and arbitrary developer-defined relations.

The ScopeGraphs specification module is instantiated in a specs file with or without an instance argument:

$/Name/ScopeGraphs.gnrc+instance=NLO_:inst
$/Name/ScopeGraphs.gnrc:inst

If the instantiation has an instance argument, the value of that argument is prefixed to every name exported by that instantiation. For example, one of the names exported by the first instantiation above would be NLO_RootScope. The second instantiation would export the name RootScope because that instantiation has no instance argument. In this document we prefix each exported names with an asterisk (e.g. *RootScope) to indicate that the value of the instance argument will be added as a prefix added to that name. For an explanation of why multiple instantiations might be necessary, see Scope graphs.

We begin by describing the model underlying the ScopeGraphs module (see Fundamentals of Name Analysis), and sketch properties of an abstract syntax tree that facilitate use of the module's computational roles (see Tree Grammar Preconditions). The module provides roles to support constructing a scope graph (see Establishing the Structure of a Scope Graph), creating bindings for defining occurrences (see Defining Occurrences), and searching for bindings given an applied occurrence (see Applied Occurrences). There is an efficient representation for a set of isomorphic scope graphs (see Isomorphic Scope Graphs), and a developer can provide analysis functions tailored to a specific language (see Implementing Language-Specific Behavior).

Name analysis computations are interdependent, and depend on other computations such as type analysis. In an attribute grammar specification, it is often necessary to make this dependence explicit to ensure that computations will be correctly ordered (see Dependent Computations of LIDO -- Computations in Trees).

Two modules related to the ScopeGraphs module can be used to create predefined identifiers (see Pre-defined Identifiers), and generate a test system (see Name Analysis Testing).

Finally, we describe the functions that are used to support the computational roles and can be invoked directly by the developer to tailor the process to unusual languages (see Application Program Interface).