sysml-v2-parser
SysML v2 textual notation parser for Rust.
This crate parses SysML v2 and related KerML textual syntax into an AST and also exposes a resilient editor-oriented parsing mode that returns partial AST + diagnostics.
Changelog
Release notes and migration hints: CHANGELOG.md.
Current status
- library parser for a broad SysML v2 subset
- strict and resilient parsing entry points
- BNF coverage gate: all 640 SysML/KerML textual productions classified as
implemented(seedocs/BNF_COVERAGE.md) - green unit/integration test suite (including
cargo test --test bnf_compliance) - green full validation and std-library gates when run with the SysML v2 release fixtures
API
The main public entry points are:
parse(input)for strict parsingparse_for_editor(input)for partial AST + diagnostics
Example:
use parse;
Development
Run the default test suite:
Run formatting/lint checks used in CI:
Run the full validation suite against the SysML v2 release tree:
Fetch the pinned SysML v2 release fixtures into ./sysml-v2-release:
powershell -ExecutionPolicy Bypass -File .\scripts\fetch-sysml-v2-release.ps1
If the release fixtures live somewhere else, set:
SYSML_V2_RELEASE_DIR=/path/to/SysML-v2-Release
Documentation
- Parser backlog & roadmap — open work (Spec42, LSP, grammar depth)
- Spec42 diagnostics parser spec
- Error recovery
- BNF coverage gate
- SysML v2 compliance gap
- Parser technical debt
- Language server backlog (detail; summarized in backlog doc)