Next: , Previous: , Up: Syntactic Symbols   [Contents][Index]

10.2.6 External Scope Symbols

External language definition blocks also have their own syntactic symbols. In this example:

 1: extern "C"
 2: {
 3:     int thing_one( int );
 4:     int thing_two( double );
 5: }

line 2 is given the extern-lang-open syntax, while line 5 is given the extern-lang-close syntax. The analysis for line 3 yields:

((inextern-lang) (topmost-intro 14))

where inextern-lang is a modifier similar in purpose to inclass.

There are various other top level blocks like extern, and they are all treated in the same way except that the symbols are named after the keyword that introduces the block. E.g., C++ namespace blocks get the three symbols namespace-open, namespace-close and innamespace. The currently recognized top level blocks are:

extern-lang-open, extern-lang-close, inextern-lang

extern blocks in C and C++.40

namespace-open, namespace-close, innamespace

namespace blocks in C++.

module-open, module-close, inmodule

module blocks in CORBA IDL.

composition-open, composition-close, incomposition

composition blocks in CORBA CIDL.


Footnotes

(40)

These should logically be named extern-open, extern-close and inextern, but that isn’t the case for historical reasons.