Static ReadonlyInstanceAn easily accessible and re-usable instance of the parser.
Note the parser itself is free of mutable state in the class, so there's no problems with just using a single one.
StaticinstanceGet the singleton static instance of this.
The singleton instance of this.
Parse arguments from a single line from a step file, indexing it.,
The input parsing buffer, in the data section.
The parsing result, including the arguments array and result enum.
This uses a much lighter non correctness verifying parse to extract the locations of the fields for an entry, using the v-table builder to append the top level entries.
In this case, the cursor should represent the start of the
The vtable slice or undefined if it's not defined due to an error.
Parse the data block of a step file, indexing it.
Synchronous driver over parseDataBlockIncremental — see parseDataBlockAsync for the cooperative (repaint-friendly) variant.
The input parsing buffer, in the data section.
OptionalonProgress: ParseProgressCallbackOptional byte-cursor progress callback, invoked roughly every PARSE_PROGRESS_ELEMENT_MASK + 1 elements.
The parsing result, including the index and result enum.
Cooperative variant of parseDataBlock: identical parse (same generator body), but periodically awaits a macrotask so the event loop can run — browsers repaint progress UI, watchdog timers fire, and the tab is not flagged as stalled during a large parse. Issue #301 §2.
The input parsing buffer, in the data section.
OptionalonProgress: ParseProgressCallbackOptional byte-cursor progress callback.
Minimum ms between event-loop yields.
The parsing result, including the index and result enum.
Streaming driver over parseDataBlockIncremental: identical parse (same
generator body) but invokes onRecordBoundary at every top-level record
boundary so a caller feeding the parser from a moving window can slide
that window forward while the rewind stack is empty. See
streaming_index_builder.ts for the coordinator that owns the window.
The input parsing buffer, positioned at the data section.
Called at each top-level record boundary with the buffer; the callback may rebase the buffer's window in place.
OptionalonRecordIndexed: ((localID: number, expressID: number, typeID: undefined | EntityTypesIfc) => void)Called as each top-level record is indexed, with its localID, expressID and typeID (0 for external-mapping records) — the seam for incremental semantic consumers (type index, roots registry, names skeleton). Must be synchronous and cheap; expensive work belongs on a demand queue, not the parse path.
OptionalonProgress: ParseProgressCallbackOptional byte-cursor progress callback.
Optionalsink: StepIndexSink<EntityTypesIfc>The parsing result, including the index and result enum.
Cooperative variant of parseDataBlockStreamed: identical parse and window-slide behaviour (same generator body, same boundary callback), but periodically awaits a macrotask so the event loop can run — browsers repaint progress UI during a large streamed parse instead of flagging the tab as stalled. Issue #301 §2 for the streamed path.
The input parsing buffer, positioned at the data section.
Called at each top-level record boundary with the buffer; the callback may rebase the buffer's window in place.
OptionalonRecordIndexed: ((localID: number, expressID: number, typeID: undefined | EntityTypesIfc) => void)Called as each top-level record is indexed — see parseDataBlockStreamed.
OptionalonProgress: ParseProgressCallbackOptional byte-cursor progress callback.
Optionalsink: StepIndexSink<EntityTypesIfc>Optional index sink (columnar builds).
Minimum ms between event-loop yields.
The parsing result, including the index and result enum.
Parse data to the model
The parsing buffer, set to user data, to read.
OptionalonProgress: ParseProgressCallbackOptional byte-cursor progress callback for the data parse.
The parse result as well as the model, if it can be extracted.
Cooperative variant of parseDataToModel — periodically yields to the event loop mid-parse (see StepParser.parseDataBlockAsync, issue #301 §2).
The parsing buffer, set to user data, to read.
OptionalonProgress: ParseProgressCallbackOptional byte-cursor progress callback for the data parse.
The parse result as well as the model, if it can be extracted.
Will parse the input up to data block (including the DATA token).
The input buffer to parse the header from.
The parse result for the header, plus the header values.
Build a model by streaming the source through a bounded moving window
(see buildIndexStreaming / M0) rather than parsing one resident buffer,
then backing the model with a windowed provider over store — so the
source is never held fully resident in the JS heap.
source serves the parse (synchronous windowed reads — on a worker this
is an OPFS sync-access handle; in node/tests a file descriptor or buffer)
and store serves the model's post-parse property access (asynchronous
windowed reads paged in on demand — OPFS File.slice() in the browser).
Both view the same file bytes, so the file-absolute addresses the index
records resolve identically through either.
NOTE (M1 scope): this delivers the bounded-memory parse. Synchronous
geometry extraction still needs its record ranges resident — as after
spillSourceToExternalStore — so a caller that extracts geometry must
ensureResident first (demand-driven geometry is M3). Property / index
access works directly via the async surfaces.
Synchronous byte source feeding the streaming parse.
Async external store backing the windowed model.
Optionalopts: { Optional window sizing: pool (parse window),
chunkBytes / maxResidentChunks (model window).
OptionalchunkOptionalmaxOptionalpool?: numberThe parse result and the windowed model.
Parser for taking IFC file serialized in step and turning them into a lazily parsed model.