9.3 Data Extraction from track_data.c
The generator script parses several parallel arrays defined in track_data.c:
- entity_name[] âĂŤ element type identifiers
- entity_text[] âĂŤ short textual descriptions
- entity_description[] âĂŤ parameter array linkage
- <type>_param[] âĂŤ parameter definitions
For each element type, the script performs:
-
1.
- Extraction of the canonical element name
-
2.
- Retrieval of the descriptive text
-
3.
- Identification of the associated parameter array
-
4.
- Parsing of each parameter entry to obtain:
- Parameter name
- Units
- Parameter type (if present)
- Description string
The script then emits four Emacs Lisp variables:
- elegant-lattice-element-types
- elegant-lattice-element-docs
- elegant-lattice-element-params
- elegant-lattice-param-docs
These structures form the semantic backend for both completion and documentation display.