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

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

Association of properties to definitions

Previous Chapter Next Chapter Table of Contents


Associate Kinds to Objects

Objects in an input text are often classified to belong to one of several kinds, e.g. variables, procedures or labels in programming languages. They may occur in different contexts which determine their kind, require that they belong to a certain kind, or select different computations depending on their kind. Such a classification is often the part of the type analysis task.

This module can be used for any unique classification of objects which is encoded by integral values.

If Objects may belong to more than one kind, or occurrences allow for objects of several kinds the module KindSet (see Associate Sets of Kinds to Objects) should be used instead of this one.

The module is instantiated by

   $/Prop/Kind.gnrc+instance=NAME +referto=KEY :inst

This module associates a property named NAMEKind of type int to objects. Two computational roles NAMESetKind and NAMEGetKind are provided.

In a context NAMESetKind the NAMEKind property of the object is set to the value of the attribute NAMESetKind.NAMEKind, which has to be provided by a user's computation. In case that different Kind values are stated for one object in some NAMESetKind contexts the property value 0 named IntMultiple is associated.

In a context NAMEGetKind the property is accessed and supplied by the attribute NAMEGetKind.HasNAMEKind. It can be used to check if it is the required kind, or if the kind is ambigously set (IntMultiple), or if the kind is not set at all (value -1 named (IntNone).

The roles NAMESetKind and NAMEGetKind may be associated to the same grammar symbol. That is necessary if kinds are determined by applications of objects rather than by definitions, or if a language does not distinguish between defining and applied occurrences.

NAMERangeKind is automatically associated to the grammar root (see Common Aspects of Property Modules). If the NAMEKind property is accessed in other user's computations, those have to state NAMERangeKind.GotNAMEKind as precondition.

IntMultiple and IntNone are defined in a file KindBad.h. If their encoding is inconvenient for a particular implementation, that file may be overridden by a user supplied file having the name KindBad.h.


Previous Chapter Next Chapter Table of Contents