ACE_TAO icon indicating copy to clipboard operation
ACE_TAO copied to clipboard

IDL4 keyword escaping needs to be extended with the new keywords

Open jwillemsen opened this issue 4 years ago • 3 comments

IDL4 extends the idl keywords with (u)int8/16/32/64, bitfield, bitmask, bitset, map which must be added to the tao_idl keyword escaping

jwillemsen avatar Oct 09 '20 12:10 jwillemsen

We used to have a typedef in a module:

module Core
{
   typedef short int16;
};

Now we have to escape it like this:

module Core
{
   typedef short _int16;
};

And also its usage Core::_int16.

It this related to this issue?

knutpett avatar Sep 02 '22 09:09 knutpett

Sorta. You have to escape that because we added support for IDL4 int16 and similar types in #840, which are now reserved keywords like short is.

Also I'm not sure this issue is worded right. I don't think we have to do anything specific with escaping keywords because you can escape any identifier you want to regardless if it's a keyword or not. What we should probably do is reserve all the IDL4 keywords in the flex grammar file, even if we're not using them yet. If I would have done that when adding --idl-version 4 users would have been forced to escape them immediately.

iguessthislldo avatar Sep 02 '22 18:09 iguessthislldo

You could also just use int16 and remove the Core:: from the usage part

jwillemsen avatar Sep 05 '22 06:09 jwillemsen