Expand description
Single-file BibTeX semantic analysis: the per-file entry / cite-key / @string
model.
The bib analog of crate::semantic. BibTeX has no lexical scoping — cite keys
and @string macros live in one file-global namespace — so the model is a
flat set of vectors (entries, @string defs, @string uses), built in one
CST walk by builder::build, then a resolve pass flags duplicate cite keys and
marks each @string use resolved/undefined. No caching lives here; the salsa
layer that memoizes it (bib_semantic_model) is a later increment (Phase 4).
Cross-file resolution is out of scope for this slice. A @string defined in
one .bib and used in another, or cite keys spanning a multi-file bibliography,
resolve only once a project-level query unions the per-file models — deferred,
exactly as on the LaTeX side. This is per-file only.
Re-exports§
pub use entry::Entry;pub use entry::StringDef;pub use entry::StringUse;pub use signature::BibFieldDb;pub use signature::EntrySig;pub use signature::FieldCategory;pub use signature::FieldSig;pub use signature::RequiredField;pub use signature::builtin;pub use builder::MONTH_MACROS;
Modules§
- builder
- Builds the bib
Modelin a single CST walk, then a resolve pass. - entry
- Data types collected by the bib
semanticmodel: regular entries,@stringdefinitions, and@stringuses. The bib analog ofcrate::semantic::label— plain records keyed by position in the model’s vectors, with the resolve-pass flags (duplicate,resolved) filled in bysuper::builder. - signature
- The built-in BibTeX field/entry signature database: which fields each entry
type requires/allows, and a coarse category per field (name list, date,
verbatim-ish, or plain literal). The bib analog of
crate::semantic::signature— the place where meaning is assigned to entry types and field names, kept strictly out of the parser (AGENTS.md decision #2).
Structs§
- Model
- A file’s regular entries,
@stringdefinitions, and@stringuses.