Next: , Previous: Overview1, Up: Compiler


4.2 Dimensions

4.2.1 Defining dimensions

Each grammar file defines a set of dimensions. A dimension definition consists of:

  1. type definitions (see Types)
  2. a specification of used principles on that dimension (see Principles)
  3. a specification of used outputs on that dimension (see Outputs1)

In the UL, a dimension definition is written:

     defdim <constant> {<dimension definition>}

where <constant> is the dimension identifier for the defined dimension.

Notice that the XDK supports a special dimension: lex. The lex dimension serves to assign a word to each lexical entry, and must be defined in each grammar file. It cannot be turned off - the lexicon is always used.

4.2.2 Using dimensions

From the set of defined dimensions, each grammar file uses a subset. To use a dimension, you write:

     usedim <constant>

where <constant> is the dimension identifier of the used dimension.