Tuesday, April 18, 2006

CORBA IDL Overview

CORBA IDL Series (Part 1)

CORBA IDL is the declarative language using which Interface constructs for CORBA can be specified. This series of notes documents the basic IDL constructs and their C++ mappings.

EBNF

Note on EBNF:Full grammar is documented at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/Axapta/Appendix_about_EBNF/LANG_EBNF_grammar.asp.

In short the notations mean the following
* -> 0 or more
+ -> 1 or more
() -> Parentheses. Hold the symbols (terminals and non-terminals) in the parentheses brackets together. Can be placed anywhere at the right hand side in a production rule.
[] -> 0 or 1; Optional. The items between [ and ] are optional. All or none of the items in the brackets are included. This can be expressed as none or one instance.
{} -> group of one syntactic unit; Repeat. The items between { and } are optional, but can be repeated as many times as necessary. This can be expressed as none or more instances.
"test" -> literal
<>-> non terminal: can be expanded to one or more terminal symbols
-> alternatively; Or. Either all items on one side of the or all items on the other side
::= -> Is defined to be

IDL is constituted of following definitions -

  1. module
  2. interfaces
  3. valuetypes
  4. exceptions
  5. constants
  6. types

module

module construct basically provides namespace semantics and helps in providing scope to identifiers. It is represented in EBNF as follows -

<module> ::= “module” <identifier> “{“ <definition>+ “}”
<definition> ::= <type_dcl> “;”
<const_dcl> “;”
<except_dcl> “;”
<interface> “;”
<module> “;”
<value> “;”


module is mapped in C++ as either namespace or class on compilers not supporting namespaces.

0 Comments:

Post a Comment

<< Home