Next: Types and Expressions, Previous: Lexical Analysis, Up: Dezyne Language Reference [Contents][Index]
Dezyne types, interfaces, and components are organized in files. A file, with extension ’.dzn’ by convention, may contain zero or more of type definitions, interfaces, and/or components.
The toplevel Dezyne program text is defined as follows:
text ::= root
root ::= (import | data-expression
| namespace | type | function | interface | component)*
An interface can refer to global types and functions (since 2.20), a
component can refer to global types, functions (since 2.20), interfaces
and other components. An explicit import clause is needed when
the referred information is defined in another file.
An import clause makes available all types, interfaces and
components that are defined in another file. From an imported interface
or component the ’public’ parts are available, i.e., all information but
the interface or component behavior, or the component system details.
import ::= "import" (file-name "/")* file-name ";" file-name ::= [a-zA-Z0-9_+.-]+
Note: That by convention the basename of the Dezyne file-name is used as the target language basename, however the target platform may impose further restrictions on a file-name.
By convention, Dezyne files use the extension .dzn. Some
examples:
import file-name.dzn; import ../global-types.dzn; import some/directory/prefix/library.dzn;
An imported file may contain imports itself, these are also imported.
When a file occurs twice in the resulting set of imports, it is expanded
only once. This avoids introducing duplicate definitions. Mutually
recursive imports are allowed (See Invoking dzn parse).
Next: Types and Expressions, Previous: Lexical Analysis, Up: Dezyne Language Reference [Contents][Index]