zerodds-idl-lower
Lowers the IDL CST into the common AST: scopes, name binding, resolution, completion by specification rule, and IDL validation.
- Source: crates/idl-lower
- API docs: docs.rs/zerodds-idl-lower
From the shape of an IDL file to the model.
Scopes and name binding, resolution, and the IDL rules the common AST cannot express structurally: the recursion OMG IDL 4.2 §7.4.1.4.4.4.4 does not admit, a declaration that reuses the name of its own scope (§7.5.2), the member-id rules, the annotations of DDS-XTypes 1.3 §7.3.1.2.
Where the products disagree, the answer is a named axis rather than a choice: KeyOnUnionDiscriminator, HashedIdCounter, HashedNameSpelling, NameOfTheEnclosingScope. Each has the clause's reading as its default and each vendor's measured reading as the other value, so --dialect rti and a build of the same file reach the same model by the same route.
This crate computes no layout. What the model means on the wire is the answer of zerodds-ast-layout.
Position
- Reads the trees of
zerodds-idl-cstthatzerodds-idl-parsebuilds, and writes the model ofzerodds-ast. - Together with
zerodds-idl-cst,zerodds-idl-parseandzerodds-astit replaces the formerzerodds-idl.
zerodds-idl-lower
Senkt den IDL-CST in den gemeinsamen AST ab: Gültigkeitsbereiche, Namensbindung, Auflösung, Ergänzung nach den Regeln der Spezifikation und IDL-Prüfung.
- Quelle: crates/idl-lower
- API-Docs: docs.rs/zerodds-idl-lower
Von der Form einer IDL-Datei zum Modell.
Gültigkeitsbereiche und Namensbindung, Auflösung und die IDL-Regeln, die der gemeinsame AST nicht strukturell ausdrücken kann: die Rekursion, die OMG IDL 4.2 §7.4.1.4.4.4.4 nicht zulässt, eine Deklaration, die den Namen ihres eigenen Gültigkeitsbereichs wiederverwendet (§7.5.2), die Regeln für Member-IDs, die Annotationen aus DDS-XTypes 1.3 §7.3.1.2.
Wo die Produkte sich unterscheiden, ist die Antwort eine benannte Achse und keine Entscheidung: KeyOnUnionDiscriminator, HashedIdCounter, HashedNameSpelling, NameOfTheEnclosingScope. Jede hat die Lesart der Klausel als Standard und die gemessene Lesart jedes Herstellers als anderen Wert. So erreichen --dialect rti und ein Build derselben Datei dasselbe Modell auf demselben Weg.
Diese Crate berechnet kein Layout. Was das Modell auf der Leitung bedeutet, beantwortet zerodds-ast-layout.
Stellung
- Liest die Bäume von
zerodds-idl-cst, diezerodds-idl-parsebaut, und schreibt das Modell vonzerodds-ast. - Ersetzt zusammen mit
zerodds-idl-cst,zerodds-idl-parseundzerodds-astdie frühere Cratezerodds-idl.