IDL grammar
Learn about the syntax of IDL files in a formal notation.
An IDL file contains definitions of the interface between client and server. The IDL file is used by EntireX wrappers to generate RPC clients, RPC servers and tester etc. on the basis of these definitions. The IDL file can be edited by the IDL Editor provided by plug-ins for Eclipse.
Meta definitions
- The metasymbols
[and]enclose optional lexical entities. - The metasymbols
{and}enclose optional lexical entities which may be repeated a number of times. - The metasymbol
::=separates the lexical entity to be defined (on the left) from the definition (on the right). - The metasymbol
|separates lexical entities on the definition side (on the right) meaning all terms are valid to define the lexical entity to be defined (on the left).
- The informal term number is a sequence of numeric digits. Example, 123.
- The informal term string is a sequence of characters. It can contain any character except
enclosing apostrophes.
Examples are: 'DARMSTADT' '#FRANKFURT' '&MUNICH'.
- Any terms in uppercase, special characters such as apostrophe, colon (other than the metasymbols above) are terminal lexical entities and must be entered as is.
- The term identifier is built by a sequence of characters from a defined list:
- characters: a to z
- characters: A to Z
- digits: 0 to 9 (a digit must not be the first character)
- special characters: - _ $ # & @ + / £ æ Æ ø Ø å Å
Syntax of the IDL file
Syntax
EntireX IDL::= library-definition { library-definition
}
Description
- The IDL may contain any number of library-definitions.
- One library-definition must be contained in an IDL file.
library-definition
A library-definition is the grouping of servers (remote procedures).
| Parameter | Description |
|---|---|
library-definition |
::= LIBRARY 'library-name' [:'library-alias'] IS { interface } |
library-name |
::= string |
library-alias |
::= string |
interface |
::= program-definition | structure-definition |
| Parameter | Description |
|---|---|
library-definition |
A library-definition is valid until the next library-definition or end of file. |
library-name |
|
library-alias |
|
interface |
|
Library 'ServerLibrary' Is ..Library 'ServerLibrary': 'AliasServerLibrary' Is ..program-definition
A program-definition describes the parameters of servers (remote
procedures).
| Parameter | Description |
|---|---|
program-definition |
::= PROGRAM 'program-name' [:'program-alias'] IS
parameter-data-definition |
program-name |
::= string |
program-alias |
::= string |
| Parameter | Description |
|---|---|
| program-definition |
|
| program-name |
|
| program-alias |
|
Library 'ServerLibrary' Is
Program 'ServerName' Is ..Library 'ServerLibrary': 'AliasServerLibrary' Is
Program 'ServerName' : 'AliasServerName' Is ..structure-definition
A structure-definition describes a user-defined type for reusability, referenced in a structure-parameter-definition(IDL).
| Parameter | Description |
|---|---|
| structure-definition | ::= STRUCT 'structure-name' IS parameter-data-definition |
| structure-name | ::= string |
| Parameter | Description |
|---|---|
| structure-definition |
|
| structure-name |
|
Library 'ServerLibrary': 'AliasServerLibrary' Is
Struct 'Person' Is ..parameter-data-definition
The parameter-data-definition describes the parameters of a server when it is embedded in a program-definition. It describes a user-defined type when it is embedded in a structure-definition.
| Parameter | Description |
|---|---|
| parameter-data-definition | ::= DEFINE DATA PARAMETER simple-parameter-definition | group-parameter-definition | structure-parameter-definition { simple-parameter-definition | group-parameter-definition | structure-parameter-definition } END-DEFINE |
| Parameter | Description |
|---|---|
| parameter-data-definition |
|
Library 'ServerLibrary' Is
Program 'ServerName' Is ..
Define Data Parameter
...
End-DefineLibrary 'ServerLibrary': 'AliasServerLibrary' Is
Struct 'Person' Is ..
Define Data Parameter
...
End-Definesimple-parameter-definition
The construct simple-parameter-definition describes the syntax of a simple parameter, that is, not a group (groups are described in a group-parameter-definition), not a reference to a structure (referencing a structure is described in structure-parameter-definition(IDL)).
| Parameter | Description |
|---|---|
| simple-parameter-definition | ::= level parameter-name (type-length[/array-definition]) [attribute-list] |
| level | ::= number |
| parameter-name | ::= identifier |
| type-length | See IDL Data Types. |
| Parameter | Description |
|---|---|
| level |
|
| parameter-name |
|
| type-length | The type and length of the parameter. See IDL Data Types. |
...
1 PERSON-ID (N10)
1 PERSON-NAME (A100)
...group-parameter-definition
The construct group-parameter-definition describes the syntax of a group.
| Parameter | Description |
|---|---|
| group-parameter-definition | ::= level group-name [(/array-definition)] [attribute-list] |
| level | ::= number |
| group-name | ::= identifier |
| Parameter | Description |
|---|---|
| level | See simple-parameter-definition. |
| group-name |
|
...
1 PERSON /* this is the group */
2 PERSON-ID (N10) /* this is a group member */
2 PERSON-NAME (A100) /* this is also a group member */
...structure-parameter-definition (IDL)
The construct structure-parameter-definition describes the syntax of a reference to a structure.
| Parameter | Description |
|---|---|
| structure-parameter-definition | ::= level parameter-name (structure-reference[/array-definition]) [attribute-list] |
| level | ::= number |
| parameter-name | ::= identifier |
| structure-reference | ::= 'structure-name' |
| Parameter | Description |
|---|---|
| level | See simple-parameter-definition. |
| parameter-name | See simple-parameter-definition. |
| structure-reference |
|
STRUCT 'Person' Is /* this defines the structure person */
Define Data Parameter
1 PERSON
2 PERSON-ID (N10)
2 PERSON-NAME (A100)
End-Define
...
1 FATHER ('Person') /* this references the structure */
1 MOTHER ('Person') /* this references the structure */
1 CHILDS ('Person'/10) /* this references the structure */
...array-definition
Arrays can have either fixed upper bounds or variable upper bounds, so-called unbounded arrays.
| Parameter | Description |
|---|---|
| array-definition | ::= fixed-bound-array | unbounded-array |
| fixed-bound-array | ::= [fixed-bound-array-index [,fixed-bound-array-index [,fixed-bound-array-index]]] |
| unbounded-array | ::= [unbounded-array-index [,unbounded-array-index [,unbounded-array-index]]] |
| fixed-bound-array-index | ::= [lower-bound:] upper-bound |
| unbounded-array-index | ::= [1:] V[maximum-upper-bound] |
| lower-bound | ::= number |
| upper-bound | ::= number |
| maximum-upper-bound | ::= number |
| Parameter | Description |
|---|---|
| array-definition |
|
| fixed-bound-array | |
| unbounded-array | |
| fixed-bound-array-index |
|
| unbounded-array-index |
|
| lower-bound |
|
| upper-bound |
|
| maximum-upper-bound |
|
...
1 NAMES (A100/10) /* 1 dimensional array */
1 TUPLES (A100/10,10) /* 2 dimensional array */
1 TRIPLES (I1/1:20,1:20,1:20) /* 3 dimensional array */
......
1 NAMES (A100/V) /* 1 dimensional array */
1 TUPLES (A100/V,V) /* 2 dimensional array */
1 TRIPLES (I1/1:V,1:V,1:V) /* 3 dimensional array */
......
1 NAMES (A100/V10) /* 1 dimensional array */
1 TUPLES (A100/V10,V10) /* 2 dimensional array */
1 TRIPLES (I1/1:V20,1:V20,1:V20) /* 3 dimensional array */
...

- For the COBOL Wrapper, see Mapping fixed and unbounded arrays.
- For the IDL Extractor for COBOL, see COBOL tables with variable size - DEPENDING ON clause.
attribute-list
Attributes describe further parameter properties to correctly map the parameter to the target platform or to optimize the parameter transfer.
| Parameter | Description |
|---|---|
| attribute-list | ::= [ aligned-attribute ] [ direction-attribute ] [ ims-attribute ] [ choice-attribute ] |
| aligned-attribute | ::= ALIGNED |
| direction-attribute | ::= IN | OUT | IN OUT | INOUT |
| ims-attribute | ::= IMS |
| choice-attribute | ::= CHOICE |
| Parameter | Description |
|---|---|
| aligned-attribute |
|
| direction-attribute | The direction attribute optimizes parameter transfer.
|
| ims-attribute | The ims-attribute marks PCB (Program Communication Block) parameters for the target platform
IMS (IBM's Information Management System).
|
| choice-attribute | The choice-attribute marks a group-parameter-definition as the surrounding container for multiple possible output (MPO) structures. This kind of IDL syntax is retrieved when extracting, for example, from a REDEFINES Clause. See also Mapping Editor IDL Interface mapping function Set Multiple Possible Output (MPO) Structures for interface type DFHCOMMAREA (In same as Out, In different to Out) | Large Buffer (In same as Out, In different to Out) | Channel Container | IMS Connect. |
1 PERSON_ID (NU12) ALIGNED...
1 PERSON_ID (NU12) IN
1 PERSON_NAME (A100) OUT
......
1 PERSON_ID (NU12) IN OUT
1 PERSON_NAME (A100) IN OUT
1 DBPCB IMS
2 DBNAME (A8)
2 SEG-LEVEL-NO (A2)
2 DBSTATUS (A2)
2 FILLER (A20)
......
1 OUTPUT Out
2 PAYMENT-TYPE (A2)
2 PAYMENT-DATA-MPO Choice
3 PAYMENT-DATA (/V1)
4 PAYMENT-DATA (AV256)
3 PAYMENT-DATA-VOUCHER (/V1)
4 VOUCHER-ORIGIN (AV128)
4 VOUCHER-SERIES (AV128)
3 PAYMENT-DATA-CREDITCARD (/V1)
4 CREDITCARD-NUMBER (NU18)
4 CREDITCARD-CODE (NU12)
4 CREDITCARD-VALIDITY (AV8)
...