Naming Conventions for GNAT Source Files (GNAT User’s Guide for Native Platforms)

#### 6.1.12 Naming Conventions for GNAT Source Files ¶

In order to better understand the workings of the GNAT system, the following brief description of its organization may be helpful:

- Files with prefix `sc` contain the lexical scanner.
- All files prefixed with `par` are components of the parser. The numbers correspond to chapters of the Ada Reference Manual. For example, parsing of select statements can be found in `par-ch9.adb`.
- All files prefixed with `sem` perform semantic analysis. The numbers correspond to chapters of the Ada standard. For example, all issues involving context clauses can be found in `sem_ch10.adb`. In addition, some features of the language require sufficient special processing to justify their own semantic files, such as `sem_aggr.adb` for aggregates and `sem_disp.adb` for dynamic dispatching.
- All files prefixed with `exp` perform normalization and expansion of the intermediate representation (abstract syntax tree, or AST). The expansion has the effect of lowering the semantic level of the AST to a level closer to what the back end can handle. For example, it converts tasking operations into calls to the appropriate runtime routines. These files use the same numbering scheme as the parser and semantics files. For example, the construction of record initialization procedures is done in `exp_ch3.adb`.
- The files prefixed with `bind` implement the binder, which verifies the consistency of the compilation, determines an order of elaboration, and generates the bind file.
- The files `atree.ads` and `atree.adb` detail the low-level data structures used by the front-end.
- The files `sinfo.ads` and `sinfo.adb` detail the structure of the abstract syntax tree as produced by the parser.
- The files `einfo.ads` and `einfo.adb` detail the attributes of all entities, computed during semantic analysis.
- The files prefixed with `gen_il` generate most of the functions defined in `sinfo.ads` and `einfo.ads`, which set and get various fields and flags of the AST.
- Library management issues are dealt with in files with prefix `lib`.
- Ada files with the prefix `a-` are children of `Ada`, as defined in Annex A.
- Files with prefix `i-` are children of `Interfaces`, as defined in Annex B.
- Files with prefix `s-` are children of `System`. This includes both language-defined children and GNAT run-time routines.
- Files with prefix `g-` are children of `GNAT`. These are useful general-purpose packages, fully documented in their specs. All the other `.c` files are modifications of common `gcc` files.