[omniORB] Omniidl Documentation and keyword clash problem

Duncan Grisby dgrisby@uk.research.att.com
Mon, 19 Jun 2000 17:00:07 +0100


On Monday 19 June, "Hinds, Robin" wrote:

> I am currently looking into using omniORBpy but I am having some trouble
> with a keyword clashing with a well established and used word our system.
> The root of the problem is the case sensitivity, because the word used is
> upper case and the keyword is lower.  Is there an option in omniidl that
> allows you to avoid such keyword clashes?  Also for further reference, I
> don't seem to be able to find much omniidl documentation, have I missed it
> or is there not much to be found?

There isn't an enormous amount of omniidl documentation. The omniORB 3
manual describes the general command line options and the C++ specific
ones. I'm in the process of writing an omniORBpy manual which will
explain the Python specific omniidl options.

None of the documentation contains things like lists of keywords at
present, so you have to look at the IDL specification (chapter 3 of
the CORBA 2.3 spec), or an up-to-date book like Henning and Vinoski.

As to your particular problem, there is no option to tell omniidl not
to complain about keyword clashes. However, the IDL spec does provide
an escaping mechanism which allows you to specify clashing
identifiers.

If you have IDL which says something like

  interface Factory { ... };

it will fail with omniidl because "factory" is a keyword. If you write
it as

  interface _Factory { ... };

then everything will treat it as if you had written "Factory", except
that it won't clash with the keyword.

The IDL keywords are:

    abstract, any, attribute, boolean, case, char, const,
    context, custom, default, double, enum, exception,
    factory, FALSE, fixed, float, in, inout, interface,
    long, module, native, Object, octet, oneway, out,
    private, public, raises, readonly, sequence, short,
    string, struct, supports, switch, TRUE, truncatable,
    typedef, union, unsigned, ValueBase, valuetype, void,
    wchar, wstring

I think I'll add a section to the omniORB 3 and omniORBpy manuals
about this.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --