Slice: illegal underscore in identifier

evgkevgk Member Evgeny KlunkoOrganization: ISTP SB RASProject: telescope control system
Hi,

My slice definition file (selector.ice) contains:
module tcd {
    module PositionSelector {
        const int POS_CHANGE  = -1;
        const int POS_UNKNOWN = -2;
        . . .
    };
};

And, with command:
slice2cpp.exe selector.ice
...I got these errors:
selector.ice:11: illegal underscore in identifier `POS_CHANGE'
selector.ice:12: illegal underscore in identifier `POS_UNKNOWN'

According to this page:
Lexical Rules - Ice 3.4 - ZeroC
- an identifier cannot begin or end with an underscore
- an identifier cannot contain multiple consecutive underscores

So these reqs do not prohibit my identifiers.

slice2cpp -v
prints "3.4.2"

My OS: Windows 7 64-bit

Full version of slice file can be downloaded from here:
https://docs.google.com/open?id=0B7X7p7oOMrLNbkVBb2ZlZnk0ZW8

Best regards,
Evgeny

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    It should work if you compile your slice files using the slice compiler --underscore option to permit underscores in the Slice.

    Cheers,
    Benoit.
  • evgkevgk Member Evgeny KlunkoOrganization: ISTP SB RASProject: telescope control system
    benoit wrote: »
    It should work if you compile your slice files using the slice compiler --underscore option to permit underscores in the Slice.

    Thank you!
    Possible it is worth mentioning on the page which I referred to.
Sign In or Register to comment.