Expand description
Knowledge base: the backing store behind ParseContext.
A KnowledgeBase holds indexed command, environment, character, and
delimiter-control metadata loaded from texform-knowledge package definitions.
It is the single source of truth the parser consults when recognizing
control sequences and environments.
§Architecture
The KB separates raw storage from the parser-facing active view:
- Explicit commands are definitions with concrete argument specs
(
\frac,\text, etc.). - Character entries are zero-arg symbols (
\alpha,\div, etc.) that the KB projects into synthetic command views so the parser can recognize them uniformly. - Active index maps each name to whichever source (explicit or character) is currently authoritative. Explicit commands always win.
§Package import order
Managed packages (base, ams, physics, …) are always imported in a
fixed canonical order regardless of the caller-supplied order. This
keeps merge results and from_packages arrays stable.
For rapid prototyping, configuration errors fail fast (panic).
Structs§
- Active
Character Record - Active
Command Record - Active
Delimiter Record - Active
Environment Record - ArgSpec
- ArgSpec
Parse Error - Builtin
Character Record - Builtin
Command Record - Builtin
Delimiter Record - Builtin
Environment Record - Knowledge
Base - The knowledge base separates raw storage from the parser-facing view:
- Parsed
ArgSpec - A parsed argspec: the structured argument list together with the source
string it was parsed from. Produced by the
argspec!compile-time macro.
Enums§
- Allowed
Mode - ArgForm
- Command
Kind - Delimiter
Token - Package
Load Error - Error returned when a requested package name is not found in the registry.
- Value
Kind