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

Association of properties to definitions

Previous Chapter Next Chapter Table of Contents


Check for Unique Object Occurrences

This module associates a boolean property NAMEUnique to object keys. It has the value 1 if the object occurs only once in the SYMBOL context NAMEUnique. It has the value 0 if it occurs more than once in the NAMEUnique context; otherwise the property is not set. The final value of the property is obtained by the attribute NAMEUnique.NAMEUnique, e.g. used to issue a message indicating multiple occurrences. (The same task can be solved using the more general module, See Count Occurrences of Objects.)

The module is instantiated by

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

The role NAMERangeUnique is automatically associated to the grammar root (see Common Aspects of Property Modules).

The multiply defined check for our running example, as explained for the OccCnt module (see Count Occurrences of Objects), can be also achieved by:

   SYMBOL MultDefChk    INHERITS Unique COMPUTE
      IF (NOT (THIS.Unique),
      message (ERROR,
               CatStrInd ("identifier is multiply defined: ",
               THIS.Sym),
               0, COORDREF));
   END;


Previous Chapter Next Chapter Table of Contents