Previous Table of Contents Next


3.2 Lexical Conventions

   This section1 presents the lexical conventions of OMG IDL. It defines tokens in an OMG IDL specification and describes comments, identifiers, keywords, and literals—integer, character, and floating point constants and string literals.

   An OMG IDL specification logically consists of one or more files. A file is conceptually translated in several phases.

   The first phase is preprocessing, which performs file inclusion and macro substitution. Preprocessing is controlled by directives introduced by lines having # as the first character other than white space. The result of preprocessing is a sequence of tokens. Such a sequence of tokens, that is, a file after preprocessing, is called a translation unit.

   OMG IDL uses the ASCII character set, except for string literals and character literals, which use the ISO Latin-1 (8859.1) character set. The ISO Latin-1 character set is divided into alphabetic characters (letters) digits, graphic characters, the space (blank) character, and formatting characters. Table 3-2 shows the ISO Latin-1 alphabetic characters; upper and lower case equivalences are paired. The ASCII alphabetic characters are shown in the left-hand column of Table 3-2.

   Table 3-2 The 114 Alphabetic Characters (Letters)

Char.

Description

Char.

Description

Aa Upper/Lower-case A Àà Upper/Lower-case A with grave accent
Bb Upper/Lower-case B Upper/Lower-case A with acute accent
Cc Upper/Lower-case C Ââ Upper/Lower-case A with circumflex accent
Dd Upper/Lower-case D Ãã Upper/Lower-case A with tilde

   1. This section is an adaptation of The Annotated C++ Reference Manual, Chapter 2; it differs in the list of legal keywords and punctuation.

   July 2002 CORBA, v3.0: Lexical Conventions

   Table 3-2 The 114 Alphabetic Characters (Letters) (Continued)

Char.

Description

Char.

Description

Ee Upper/Lower-case E Ää Upper/Lower-case A with diaeresis
Ff Upper/Lower-case F Åå Upper/Lower-case A with ring above
Gg Upper/Lower-case G Ææ Upper/Lower-case dipthong A with E
Hh Upper/Lower-case H Çç Upper/Lower-case C with cedilla
Ii Upper/Lower-case I Èè Upper/Lower-case E with grave accent
Jj Upper/Lower-case J Éé Upper/Lower-case E with acute accent
Kk Upper/Lower-case K Êê Upper/Lower-case E with circumflex accent
Ll Upper/Lower-case L Ëë Upper/Lower-case E with diaeresis
Mm Upper/Lower-case M Ìì Upper/Lower-case I with grave accent
Nn Upper/Lower-case N Upper/Lower-case I with acute accent
Oo Upper/Lower-case O Îî Upper/Lower-case I with circumflex accent
Pp Upper/Lower-case P Upper/Lower-case I with diaeresis
Qq Upper/Lower-case Q Ññ Upper/Lower-case N with tilde
Rr Upper/Lower-case R Òò Upper/Lower-case O with grave accent
Ss Upper/Lower-case S Óó Upper/Lower-case O with acute accent
Tt Upper/Lower-case T Ôô Upper/Lower-case O with circumflex accent
Uu Upper/Lower-case U Õõ Upper/Lower-case O with tilde
Vv Upper/Lower-case V Öö Upper/Lower-case O with diaeresis
Ww Upper/Lower-case W Øø Upper/Lower-case O with oblique stroke
Xx Upper/Lower-case X Ùù Upper/Lower-case U with grave accent
Yy Upper/Lower-case Y Úú Upper/Lower-case U with acute accent
Zz Upper/Lower-case Z Ûû Upper/Lower-case U with circumflex accent
Üü Upper/Lower-case U with diaeresis
ß Lower-case German sharp S
ÿ Lower-case Y with diaeresis

    Table 3-3 lists the decimal digit characters. Table 3-3 Decimal Digits

   0 1 2 3 4 5 6 7 8 9

    Table 3-4 shows the graphic characters. Table 3-4 The 65 Graphic Characters

Char.

Description

Char.

Description

! exclamation point ¡ inverted exclamation mark
" double quote ¢ cent sign
# number sign £ pound sign
$ dollar sign ¤ currency sign
% percent sign ¥ yen sign

   Table 3-4 The 65 Graphic Characters (Continued)

Char.

Description

Char.

Description

& ampersand broken bar
apostrophe § section/paragraph sign
( left parenthesis ¨ diaeresis
) right parenthesis © copyright sign
* asterisk ª feminine ordinal indicator
+ plus sign « left angle quotation mark
, comma ¬ not sign
- hyphen, minus sign soft hyphen
. period, full stop ® registered trade mark sign
/ solidus ¯ macron
: colon ° ring above, degree sign
; semicolon ± plus-minus sign
< less-than sign 2 superscript two
= equals sign 3 superscript three
> greater-than sign ´ acute
? question mark m micro
@ commercial at pilcrow
[ left square bracket middle dot
\ reverse solidus ¸ cedilla
] right square bracket 1 superscript one
^ circumflex º masculine ordinal indicator
_ low line, underscore » right angle quotation mark
grave vulgar fraction 1/4
{ left curly bracket vulgar fraction 1/2
| vertical line vulgar fraction 3/4
} right curly bracket ¿ inverted question mark
~ tilde ¥ multiplication sign
³ division sign

    The formatting characters are shown in Table 3-5. Table 3-5 The Formatting Characters

Description

Abbreviation

ISO 646 Octal Value

alert BEL 007
backspace BS 010
horizontal tab HT 011
newline NL, LF 012
vertical tab VT 013

   Table 3-5 The Formatting Characters

Description

Abbreviation

ISO 646 Octal Value

form feed FF 014
carriage return CR 015