Repository navigation
WIP: BibTeX engine (KC-108, paused) - #91
Merged
Merged
Conversation
…8, paused) New crate crates/bibtex-bst (not yet buildable: src/lib.rs and engine modules not written). Contains the bibtex.web character classes and cmr10 width table, six tricky .bib fixture databases, and unmodified copies of the 11 TeX Live styles used as oracle inputs. No expected outputs yet. Implementation-Agent: Claude Opus 5 (subagent kabir-claude KC-108, mac-m5pro-kabir) Commit-Executor: Claude Code direct Git Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
This was referenced Sep 13, 2026
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overlap check
crates/bibliography(mac-bibliography / jay3332, "ready for integration") hard-codes plain/unsrt/alpha and lists ".bstinterpretation in general" as unsupported. No.bstinterpreter exists on main or on anybib|cite|natbibbranch (daniel-parent/cite= manualthebibliographyonly). This PR adds a separate crate,crates/bibtex-bst, and changes nothing outside it.Done (commit 08baeac)
crates/bibtex-bst/Cargo.toml(edition 2024, zero dependencies).src/chars.rs:lex_class/id_class(bibtex.web §§31–33 plus bibtex.ch [32]/[33]: bytes 128–255 are alpha, CR is whitespace), the cmr10char_widthtable (§35), and the 13 control sequences.tests/data/bib/*.bib: six fixture databases (people/von/Jr/corporate names, @string/#/@preamble/line breaking, crossref with min_crossrefs and nested/bad refs, accents/change.case/alpha labels, error cases, a sort-heavy large database).tests/data/bst/: unmodified TeX Live 2026 copies of plain, unsrt, alpha, abbrv, acm, ieeetr, siam, apalike, plainnat, abbrvnat, unsrtnat (licenses allow unmodified redistribution / LPPL).Not done
src/lib.rsand the engine modules are not written.bibtexhas not been run. Oracle status is 0 of 0.CONTRACT.mdis not written.Verified facts for resuming
texk/web2c/bibtex.web+bibtex.ch.max_print_line=79,ent_str_size=500,glob_str_size=200000,min_crossrefs=2 (kpsewhich-progname=bibtex)..blgalso contains a banner, aCapacity:line and a built-in call-count block. The oracle should compare the.blgwith those removed.Next steps to resume
Result<_, Stop{Return,BstDone,AuxDone,Fatal}>for bibtex.web's non-local exits:engine.rs: log/history, lineBuf/input_ln(eoln at\nor\r), aux reading with the §§108–156 messages.bst.rs: §§170–216 commands andscan_fn_def, with the error-return scope per procedure.bib.rs: §§217–294.bibscanning, cite_list/crossref/min_crossrefs, missing/duplicate warnings.exec.rs: §§295–342 stack, sort, 79-columnadd_out_pool, and all 37 built-ins (§§343–463). Persistent globals arebrace_level,prev_colonandname_sep_char. Apply bibtex.ch [388], which removes the leading-junk loop informat.name$.lib.rs:run(aux, &dyn FileSource, &Options) -> Output{bbl, blg, history, messages},DirSource, and aSessionthat memoises by file contents.tests/oracle/generate.py: write about 71 cases (11 styles × 5 databases, the errors database × 4 styles, plus nocite{*}, case mismatch, multiple bibs,\@input, missing style/bib, no citations, repeated\bibdata). Run bibtex withBSTINPUTS/BIBINPUTSpointing attests/dataand committests/data/expected/*.{bbl,blg}.tests/oracle.rs: compare.bblbytes and the normalised.blgwithout running bibtex, and print the pass counts.CONTRACT.md: the adoption proposal for crates/compiler and crates/bibliography.🤖 Generated with Claude Code
https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu