Skip to main content

Module api

Module api 

Source
Expand description

The translate API (PORT.6, slice 6g): VLA_Browser.bas’s two functions, the surface a door calls - the C-ABI export (6h), the web page, any embedding. Text in, text out, and a refusal back as the teaching text the add-in shows, as a value instead of a dialog.

EnglishTranslateTextToVla is EnglishResetGrammar, then EnglishLoadVocabularyText for each phrasebook text under the name vocab-N (N from 1, in the order given), then EnglishToVla; EnglishTranslateTextToVba is the same and then VlaTranspile with the prelude set by VlaSetPreludeOverride. One difference the port cannot avoid: the reference’s VLA stage reads its prelude from the workbook (for ValidateRawVla’s probe and a generator’s expansion), and a host-free core has no workbook, so both functions take the prelude’s text.

The text path is ungated, as the reference’s is (TestRawConsentTextPathUngated): SEC.2’s consent for a (raw ...) form and F.10’s capability check are a door’s questions, asked before this is called, with english::vocab::vocab_text_has_raw_form and english::vocab::vocab_requires_check_capability, as the CLI asks them.

Functions§

audit_findings
The audit list (PORT.8, slice 8d): a workbook’s bytes read through the reader into the audit’s index and the six walks run, one finding a line in the fixed order (reflect::audit::audit_text); label is what a refusal calls the file. Empty when there is nothing to report.
calc_rows
Recalculation over a workbook’s file (KERNEL.7): the file read through the reader into the grid, every formula computed by the language’s evaluator under Excel’s library, and one calc row per formula cell with the host’s cached value and the verdict beside it (reflect::calc::calc_text); label is what a refusal calls the file. Empty for a workbook with no formula.
diff_relations
The difference between two workbooks (PORT.8, slice 8c): both files’ bytes read through the reader and compared, the changed relation and the sheets in one file alone, one row a line in the fixed order (reflect::diff::diff_text); each label is what a refusal calls its file. Empty when the two hold the same sheets, names, Tables and cells.
english_build_xlsx
The writer’s surface (PORT.7): the program translated as english_translate_text_to_vla translates it, then built into a workbook’s bytes (build::build_xlsx); the English stage’s refusal with its line, or the build’s with line 0.
english_build_xlsx_into
The writer’s surface for adding to a workbook (--into): the program translated and built into model_bytes, the model’s own parts as they were. label is what a refusal calls the model.
english_rebuild_xlsx
frazaro rebuild (PORT.7, slice 7c): a built workbook’s sentences read back out of its Frazaro sheet, its stamp checked against them and against the prelude and phrasebooks given, the workbook built again from them and compared whole. The refusal is rebuild-not-a-build for a file that is not a build this core can verify; a build that does not match is not a refusal but an answer, Rebuilt::matches false with its reason.
english_translate_text_to_vba
VBA EnglishTranslateTextToVba: the program’s VBA text, or the English stage’s refusal as above; a refusal of the compile stage carries line 0 and names its VLA line in its own text.
english_translate_text_to_vla
VBA EnglishTranslateTextToVla: the program’s VLA text, or the refusal with its id and the program line it stands on (0 when a phrasebook was refused at load, whose text carries its own vocab-N line L location).
english_view
The view record (KERNEL.4): the program translated and built into the sheet model as english_build_xlsx builds it, nothing written, and one window of one sheet projected as the lines a viewport draws from (view::Grid, the first projection through the kernel’s projections seam). sheet is the sheet’s name, compared as Excel compares names; window an A1 rectangle, or None for the sheet’s whole extent. The English stage’s refusal with its line, or the build’s or the view’s (view-sheet-unknown, view-window-not-a-range) with line 0. Since KERNEL.7 the model is recalculated under Excel’s library (crate::excel::library) and each formula row is followed by its value row, the formula’s computed value or (not-computed "<name>").
function_histogram
The functions a workbook’s formulas call, counted by the formula cells calling each (reflect::histogram), one function row a line, most called first: KERNEL.6’s instrument, counts alone.
reflect_relations
The reader’s surface (PORT.8, slice 8a): a workbook’s bytes, an OOXML package or an OpenDocument spreadsheet (8e), as the relations of REFLECT, one row a line in the fixed order (reflect::reflect_text); label is what a refusal calls the file. Seven of the eight relations, as the module says; refers joins in slice 8b.
vocab_gate
The door’s two gates before a phrasebook text it did not ship loads, as the reference’s file loader asks them and its text loader does not (EnglishLoadVocabulary): F.10’s capability check, then SEC.2’s consent for a (raw ...) form, which a person gives (--allow-raw, a checkbox). source_name is the name the refusal shows.