[omniORB] omniidl bug?
Duncan Grisby
dgrisby@uk.research.att.com
Thu, 20 Jul 2000 16:30:28 +0100
On Thursday 20 July, Bruce Visscher wrote:
> $ cat CosLifeCycle.idl
> //...
> module CosLifeCycle {
> //...
> typedef Object Factory;
> //...
> };
> $ omniidl -d CosLifeCycle.idl
> coslifecycle.idl:4: Identifier `Factory' clashes with keyword `factory'
> omniidl: 1 error.
That's the second time this has cropped up today :-)
> I can work-around this by adding a leading underscore to the name, but
> now I'm curious who is right, omniidl or the CosLifeCycle maintainers?
>
> I'm thinking that omniidl should allow identifiers to differ only by
> case from keywords, but I could be wrong. I realize that identifiers
> must not differ only by case from each other.
omniidl is right. Section 3.2.4 of the CORBA 2.3 spec says:
`Keywords must be written exactly as shown in the above list.
Identifiers which collide with keywords (see Section 3.2.3,
"Identifiers") are illegal. For example, "boolean" is a valid
keyword; "Boolean" and "BOOLEAN" are illegal identifiers.'
Strangely, the CosLifeCycle IDL (formal/98-10-15) has been updated to
use the identifier "_supports" to avoid the "supports" keyword, but
does not have "Factory" escaped.
I'm sure I remember seeing an issue raised about it, but I can't find
it. I did find formal/00-06-18, which claims to be the Life Cycle
service updated for CORBA 2.3, but it's full of obvious mistakes, like
using "_supports" in both the #ifdef cases in the IDL, and using
"_supports" in section 2.1.3.1 when it means "create_object"! It too
fails to escape "Factory". Oh well.
Cheers,
Duncan.
--
-- Duncan Grisby \ Research Engineer --
-- AT&T Laboratories Cambridge --
-- http://www.uk.research.att.com/~dpg1 --