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

Solutions of common problems

Previous Chapter Next Chapter Table of Contents


Counting Symbol Occurrences

This module provides .lido computations that count all ocurrences of certain symbols within a certain subtree.

The module is instantiated by

   $/Tech/Counter.gnrc +instance=NAME :inst
The optional generic instance parameter NAME identifies the particular instance.

The module provides the following computational roles:

NAMECount is associated to the grammar symbols that shall be counted. NAMECount.NAMECount yields the occurrence number in the tree.

NAMERootCount specifies the subtree containing the NAMECount occurrences. The number of occurrences found in the subtree can be obtained by the attribute NAMERootCount.NAMECountResult.

The default is that counting starts from 1 and is incremented by 1. The start value can be adjusted by overriding the computation NAMERootCount.NAMEInitCount = 0; with a computation of a suitable value. The increment can be adjusted by overriding the computation of NAMECount.NAMEIncrement.

|NAME|RootCount is inherited by the grammar root by default.

NAMERootCount can be associated to recursive grammar symbols. Any symbol that has NAMECount associated must belong to a subtree such that NAMERootCount is associated to its root.


Previous Chapter Next Chapter Table of Contents