Component description file
This chapter describes the syntax of the genom component description file. This file has by convention a name ending with the .gen suffix. It is thus often called the .gen file (or dot gen).
The dot gen file contains the complete formal description of a component in terms of services and data types it provides. Such a description completely defines the interface and the internals of a component. The syntax of this files is a mix between a subset of the OMG IDL for data types definitions and genom specific constructs.
The dot gen file is pre-processed by a pre-processor that follows the standard of the C preprocessor. See the Preprocessing section for details. The complete grammar definition is available for reference, but the most important constructs are detailed in the following sections.
The description of the dot gen grammar uses a syntax notation that is similar to EBNF (Extended Backus-Naur Format). The following table lists the symbols used in this format and their meaning.
Symbol | Meaning |
---|---|
::= |
Definition |
| |
Alternation |
text |
Non terminals |
"text" |
Terminals |
( ... ) |
Grouping |
{ ... } |
Repetitions: may occur zero or any number of times |
[ ... ] |
Option: may occur zero or one time |
Topics
-
Preprocessing: Inclusion of definitions from other specifications
-
Elements of a description file: Basic elements of a genom3 specification
-
Data type and constant definitions: Definition of new types and constant values
-
Module declaration: Namespace for type definitions
-
IDS declaration: Private, shared global data.
-
Port declaration: Published and imported data.
-
Task declaration: Execution context for running actual code.
-
Service declaration: Attributes, functions, activities and their parameters.
-
Identifiers and reserved keywords: Words with a special meaning
-
Pragmas: Providing additional information to the parser
-
Grammar reference: Extensive genom3 EBNF grammar reference