sysml-v2-parser
SysML v2 textual notation parser for Rust. Parses SysML v2 and KerML textual syntax into an AST, with a resilient editor mode that returns partial trees plus diagnostics.
Release notes: CHANGELOG.md.
Features
- Strict
parse()and resilientparse_for_editor()entry points - Broad SysML v2 subset including port-def directed features (
in/out/inoutattribute and item usages) - BNF coverage gate: 640 textual productions classified as
implemented(docs/BNF_COVERAGE.md) - Green default test suite; full validation and std-library gates with SysML v2 release fixtures
API
use parse;
parse(input)— strict parse; returnsResult<RootNamespace, ParseError>parse_for_editor(input)— partial AST + diagnostics for editors and language servers
Development
Full validation suite (CI validation job — includes ignored slow/corpus tests):
Set SYSML_V2_RELEASE_DIR if fixtures are not in ./sysml-v2-release.
Optional MBSE vacuum corpus (ignored integration tests; skips when unset):
When changing AST fields or body-element shapes, refresh checked-in snapshots in the same PR — see tests/validation/README.md.
Documentation
| Topic | Doc |
|---|---|
| Backlog & roadmap | docs/PARSER_BACKLOG_ROADMAP.md |
| Spec42 diagnostics | docs/SPEC42-DIAGNOSTICS-PARSER-IMPROVEMENTS.md |
| Error recovery | docs/ERROR_RECOVERY.md |
| BNF coverage | docs/BNF_COVERAGE.md |
| Compliance gap | docs/SYSML_V2_COMPLIANCE_GAP.md |
| Technical debt | docs/PARSER_TECHNICAL_DEBT.md |