Eclipse C: Terminology For Mapping Lisp and C Concepts


The naming convention defines how Lisp symbols naming various Lisp constructs are translated into C identifiers naming C constructs. Lisp constructs are always named with symbols, while C constructs are always named with identifiers.

In this case, a construct is an element of the language such as a variable, function, type-identifier or "go" label.

Which construct a Lisp symbol refers to can always be determined by context. Each C identifier can usually refer to exactly one C construct at a time -- regardless of context.

Symbols in Lisp might be used simply as an identifier to be used by the compiler, but in general, they are actual data objects with accessible and modifiable run-time properties. C identifiers are used only by the compiler and are not accessible at run-time. When a Lisp symbol must be represented in C as data, it is is represented in C by a global clObject "variable" who's value never changes. However, this clObject is a pointer to a symbol data object who's fields may have changing values.

A Lisp symbol has a name which is a string. Symbols with different names always refer to different constructs.

Each Lisp symbol is rooted in zero or one home package. A package has a name which is unique among all other package names in the system. Symbols rooted in packages with different names always refer to different constructs.

A symbol rooted in no home package is said to be uninterned. Uninterned symbols with the same name may or may not refer to the same constructs. (They refer to the same construct only if they are, in fact, the same data object.)

A lexical Lisp function is one who's text appears wholly within the definition of another parent function, and who's scope is also limited. This is not supported in C, so the corresponding C function is defined separately and, like all C functions, has a scope that includes the entire file in which it is defined. Special naming conventions are used by Eclipse to achieve the correct effective scoping.


[Previous] [Next] [Up] [Documentation Contents] [Eclipse Home Page]