Skip to main content

Crate zerodds_idl_parse

Crate zerodds_idl_parse 

Source
Expand description

Crate zerodds-idl-parse. Safety classification: STANDARD.

Not SAFE, and that is the specification’s own line: docs/architecture/04_safety_by_architecture.md §2 lists the safe subset and says the zerodds-idl* tools do not belong to the no_std safety profile. The parser runs at code-generation time; the SAFE marker it used to carry was applied across the board and made dds_no_panic_in_safe demand a contract this crate never signed.

A hand-written recursive-descent parser for OMG IDL 4.2 that builds the lossless CST in zerodds-idl-cst.

It never stops at the first error. A syntax error is diagnosed, the offending range becomes an error node, and parsing resynchronises at the next declaration boundary — so a file with three mistakes reports three rather than costing three runs.

§Spec

  • docs/specs/zerodds-idl-frontend-1.0.md §3 (parsing), §7 (diagnostics).
  • OMG IDL 4.2 §7.4 (grammar).

§Layer position

Layer 1 of the frontend — over zerodds-idl-cst.

Re-exports§

pub use diagnostic::Diagnostic;
pub use diagnostic::DiagnosticCode;
pub use diagnostic::Severity;
pub use diagnostic::refused_by_a_clause;
pub use dialect::Dialect;
pub use dialect::VendorFlag;
pub use parser::Parse;
pub use parser::Parser;
pub use parser::parse;
pub use parser::parse_preprocessed;
pub use parser::parse_preprocessed_with;
pub use parser::parse_with;
pub use preprocess::FileLoader;
pub use preprocess::MemoryLoader;
pub use preprocess::Origin;
pub use preprocess::Preprocessed;
pub use preprocess::Provenance;
pub use preprocess::ProvenanceMacro;
pub use preprocess::SourceMap;
pub use preprocess::preprocess;
pub use preprocess::preprocess_with;

Modules§

diagnostic
Diagnostics. Spec §7.
dialect
Which dialect the parser accepts. Spec §3.5.
parser
The recursive-descent driver. Spec §3.
preprocess
The preprocessor. Spec §3.4.