Node: Internal Naming Conventions, Previous: Transforming Expressions, Up: Front End



Internal Naming Conventions

Names exported by FFE modules have the following (regular-expression) forms. Note that all names beginning ffemod or FFEmod, where mod is lowercase or uppercase alphanumerics, respectively, are exported by the module ffemod, with the source code doing the exporting in mod.h. (Usually, the source code for the implementation is in mod.c.)

Identifiers that don't fit the following forms are not considered exported, even if they are according to the C language. (For example, they might be made available to other modules solely for use within expansions of exported macros, not for use within any source code in those other modules.)

ffemod
The single typedef exported by the module.
FFEumod_[A-Z][A-Z0-9_]*
(Where umod is the uppercase for of mod.)

A #define or enum constant of the type ffemod.

ffemod[A-Z][A-Z][a-z0-9]*
A typedef exported by the module.

The portion of the identifier after ffemod is referred to as ctype, a capitalized (mixed-case) form of type.

FFEumod_type[A-Z][A-Z0-9_]*[A-Z0-9]?
(Where umod is the uppercase for of mod.)

A #define or enum constant of the type ffemodtype, where type is the lowercase form of ctype in an exported typedef.

ffemod_value
A function that does or returns something, as described by value (see below).
ffemod_value_input
A function that does or returns something based primarily on the thing described by input (see below).

Below are names used for value and input, along with their definitions.

col
A column number within a line (first column is number 1).
file
An encapsulation of a file's name.
find
Looks up an instance of some type that matches specified criteria, and returns that, even if it has to create a new instance or crash trying to find it (as appropriate).
initialize
Initializes, usually a module. No type.
int
A generic integer of type int.
is
A generic integer that contains a true (non-zero) or false (zero) value.
len
A generic integer that contains the length of something.
line
A line number within a source file, or a global line number.
lookup
Looks up an instance of some type that matches specified criteria, and returns that, or returns nil.
name
A text that points to a name of something.
new
Makes a new instance of the indicated type. Might return an existing one if appropriate--if so, similar to find without crashing.
pt
Pointer to a particular character (line, column pairs) in the input file (source code being compiled).
run
Performs some herculean task. No type.
terminate
Terminates, usually a module. No type.
text
A char * that points to generic text.