The Enumerator (enm)

The Enumerator is invoked from the Generators Environment and takes as input a source enumeration file with file extension `.enm', for example fifi.enm, and outputs a configured Abstract Machine source file to the development CFG directory, for example fifi.mch, together with related analysed, type and C program files to the ANL, TYP and CDE/C directories respectively.

Abstract Machines produced by the tool are standard library specifications for use in other constructs, therefore they are guaranteed to be syntactically correct, well-typed and internally consistent.

The purpose of the Enumerator is to provide basic teletype i/o operations for enumerated sets present in a development.


The general form of an enumeration description is given in a BNF-like syntax as follows:
the syntax << exp >> indicates zero or more occurrences of exp (repetition):

  enumeration_description ::=  ENUMERATION
                                 enumeration_name
                               SEES
                                 sees_list
                               SETS
                                 set_list
                               END

  enumeration_name   ::=  Identifier

  sees_list          ::=  Identifier << , Identifier >>

  sets_list          ::=  Identifier << ; Identifier >>
The SEES clause identifies those specifications that are `in scope' for the enumeration and the SETS clause identifies those enumerated sets for which operations are to be generated; each set should be defined in one of the machines in scope.

An example enumeration is:

        ENUMERATION

          fifi

        SEES

          mimi, gigi
        
        SETS

          SET1; SET2

        END
This defines a construct comprising two enumerated sets (SET1 being an enumerated set of mimi, and SET2 being an enumerated set of gigi). When submitted to the generator it produces a machine (and code) which may be employed in i/o operations. Three operations for each enumerated set are provided: Note that the Enumerator is automatically employed by the non-Motif Interface generator where necessary.
A full on-line help listing is available in the Contents Page
Also available in the form of a complete Index.
Blogo © B-Core (UK) Limited, Last updated: 22 Feb 2002