Skip to main content

Crate etdl_parser

Crate etdl_parser 

Source
Expand description

Parsing for the Event Tree Definition Language (ETDL).

etdl-parser reads .etdl documents — the declarative, design-time DSL for reliability-aware event-driven microservices defined by IEC 62502:2010 (event tree analysis) and IEC 61025:2006 (fault tree analysis) — and resolves their references into AsyncAPI 3.0 contracts.

§Features

  • ast — full document AST with manual Deserialize (supports legacy eventTree and x-* extension fields)
  • ecel — the Event-tree Condition Expression Language (ECEL), a typed, side-effect-free expression language for barrier branch conditions
  • asyncapi — AsyncAPI 3.0 document loading and a schema-introspecting registry
  • jsonptr — RFC 6901 JSON Pointer resolution for onFailureProbabilitySource and other in-document references

§Example

use etdl_parser::parse_document_from_file;
use std::path::Path;

let doc = parse_document_from_file(Path::new("order-fulfillment.etdl"))?;

Modules§

ast
asyncapi
ecel
jsonptr
semantic
LSP-style semantic endpoints over an ETDL document (completions, hover, go-to-definition, find-references, document symbols, formatting).
spanned
Source-position tracking for ETDL documents.

Functions§

load_asyncapi_imports
parse_document
parse_document_from_file
parse_document_raw
Like parse_document but preserves the underlying serde_yaml error so callers can recover a source position via serde_yaml::Error::location.