Architecture & Parsing Specification
PreFlight Compiler Specification · Version 2.0
Technical overview of the lexical tokenization engine, mathematical environment quarantine, BibTeX reconciliation grammar, and ephemeral client-side processing boundaries.
1. Lexical Analysis & Math Environment Isolation
Standard pattern matching algorithms frequently misidentify LaTeX mathematical operators, inline equations, and comments as textual prose. PreFlight employs a stateful lexer that isolates mathematical and structural environments into read-only token blocks before performing citation or claim boundary extraction.
Quarantined Structural Environments
During analysis, token ranges designated as quarantined are skipped by prose verification passes. Manuscript text inside protected environments cannot be mutated without explicit author override.
2. Bibliography Reconciliation & Citation Ingestion
When citations are verified or updated, modifications are executed strictly through atomic AST edits:
- —Macro Ingestion: Standard citation commands (such as
\cite,\citep, and\citet) are indexed with character-exact line and column coordinates. - —BibTeX Key Validation: Cited keys are checked against mounted
.bibfiles. Missing entries are matched to canonical DOIs and normalized using standard BibTeX schema. - —Diff Generation: Author updates generate standard unified diffs for manual review, preventing unapproved modifications to source files.
3. Data Enclave & Execution Environment
PreFlight is architected around client-side execution boundaries to ensure research privacy prior to publication:
Local Client Session
AST parsing and coordinate indexing execute entirely in browser volatile memory using Web Workers and WebAssembly.
Zero Persistence
Manuscript drafts, equations, and prose are never stored on backend databases or used for model training.
Isolated External Queries
Scholarly registry queries cross-reference DOI and bibliographic metadata over encrypted TLS 1.3 channels.
Validate your manuscript syntax and citations
Compatible with standard LaTeX distributions, Overleaf exports, and BibTeX databases.