Skip to main content

Crate interscript_rs

Crate interscript_rs 

Source
Expand description

interscript-rs — Rust runtime for Interscript ISC maps.

Parses .isc maps through the canonical parsanol grammar (grammar/isc.parg) and executes the standard map subset end-to-end: parallel stages, sub rules with before/after boundary constraints, any() classes, boundary anchors, aliased map/stage dependencies (.isc/.iml libraries), and the embedded per-map tests. Semantics mirror interscript-ruby’s Interscript::Interpreter (the conformance-proven runtime).

Re-exports§

pub use document::Document;
pub use document::Stage;
pub use document::StageItem;
pub use document::Sub;
pub use document::SubTo;
pub use document::Tests;
pub use error::Error;
pub use error::Result;
pub use interpreter::Runtime;
pub use item::Item;

Modules§

builder
Tree → Document builder. Mirrors the interscript-ruby pipeline: Isc::Normalizer (scalar folding) + Isc::Transform (item materialization) + Isc::DocumentBuilder + Isc::NodeAdapter (document assembly). Dependencies load BEFORE conversion so class-context charset resolution sees imported aliases (NodeAdapter#build ordering).
document
The document model — mirrors Interscript::Node::Document as produced by Interscript::Isc::NodeAdapter, plus the pieces the interpreter needs (resolved dependency documents, embedded tests).
error
Error type for parsing and transliteration.
fetch
Fetch + unpack the raw maps corpus from the interscript/maps GitHub Releases data channel.
grammar
The embedded ISC grammar: grammar/isc.parg (vendored verbatim from interscript-ruby, see README provenance) compiled once through parsanol’s portable backend, plus the parse entry point that resolves the engine’s arena-backed tree into the owned parslet-shaped value tree (tree::TNode).
imf
IMF v1 artifact support (interscript-models SPEC.md, normative): byte tokenizer, checksum-verified zip loading, the models.yaml registry, ONNX greedy single-row inference, and the frozen conformance-fixture harness.
interpreter
The interpreter: Interscript::Interpreter::Stage parity. A backtracking item matcher (the Ruby runtime’s regex semantics without compiling to regex — Rust’s regex crate has no lookaround, which the constraint semantics require) plus the stage executor over parallel groups, sequential sub rules, run rules and funcalls.
item
The item model — mirrors Interscript::Node::Item as produced by Interscript::Isc::NodeAdapter from a parsed map.
locate
Map resolution over the load path — Interscript.locate parity: for every directory, try .isc (ISC maps), then .iml (character-set libraries), then .imp (legacy Ruby DSL; not supported here).
reverse
Interscript::Node::*#reverse parity for the slice-1 subset: reversed documents, stages, sub rules (with boundary-alias transfer + capture/ref exchange), funcall inversion, and the reverse_name convention.
stdlib
Interscript::Stdlib parity: alias fragments, boundary semantics and the stage-level functions (upcase, separate, compose, …).
tree
Resolved parse tree: the parslet-shaped value tree the parsanol portable engine produces for the ISC grammar, mirrored into plain Rust types (TNode). Mirrors parsanol::portable::parslet_transform output consumed by Interscript::Isc::DocumentBuilder on the Ruby side.