Solutions of common problems
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
identifies the particular instance.
The module provides the following computational roles:
is associated to the grammar symbols that shall be counted.
NAMECount.NAMECount yields the occurrence number in
specifies the subtree containing the
occurrences. The number of occurrences found in the
subtree can be obtained by the attribute
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
|NAME|RootCount is inherited by the grammar root by default.
NAMERootCount can be associated to recursive grammar
symbols. Any symbol that has
must belong to a subtree such that
associated to its root.