In its essence, expander is very simple, it reads input from stdin, and writes the output to stdout. In other words, expander is a filter. The input is a line containing an abbreviation or keyword, which is replaced with a predefined expansion string, with the result printed to stdout. These expansion strings are defined in text files and can be changed dynamically, meaning that any change to them is effective immediately, without having to reinitialize anything. The only exception is that expander has four built in abbreviations: 'date', 'time', 'dtime', and 'year'.
Diagram 1. This schematic depicts how expander performs its duties using its definition dictionaries, templates, and auto-fill field features.
The following steps refer to the numbered areas in diagram 1.
In general, expander only knows where one definition dictionary file exists. It is accessed through examining the environment variable EXP_DEFINITIONS. This dictionary is the main source of, (computer) language independent definitions. From there all other dictionary files can be accessed, whether they be language independent, or language specific. This is basically done with an inclusion mechanism. Any dictionary can include other dictionaries. Thus, this initial dictionary is considered to be the root dictionary for a tree hierarchy of dictionaries. Since its definitions are always available, regardless of language scoping, it is also considered a 'global' dictionary.