Association of properties to definitions
This module associates a boolean property
to object keys. It has the value 1 if the object occurs
only once in the SYMBOL context
It has the value 0 if it occurs more than once in the
context; otherwise the property is not set.
The final value of the property is
obtained by the attribute
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
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
OccCnt module (see Count Occurrences of Objects), can be also achieved by:
SYMBOL MultDefChk INHERITS Unique COMPUTE
IF (NOT (THIS.Unique),
CatStrInd ("identifier is multiply defined: ",