Expand description
openEHR ADL 2.4.0 — the hand-written ADL2 engine: ADL2/cADL/ODIN source
parser, the AOM2 validation catalogue, specialisation flattening, OPT2
generation, and ADL 1.4→2 conversion, built over the generated
openehr_am::v2_4 object model.
Spec oracle: docs/specs/openehr/AM/docs/{ADL2,AOM2,OPT2}/ (+ the ODIN
spec at docs/specs/openehr/LANG/docs/odin/). The normative ANTLR4
grammars are vendored under vendor/grammar/ (version-scoped by AM
generation: v1_4/, v2_4/) as reference input for the
hand-written logos/chumsky implementation — no ANTLR runtime.
Components: the outer artefact parser (source), the shared typed
error catalogue, and the cADL definition-section parser (parse) that
builds the openehr_am::v2_4::aom2 constraint model. The substrate under
them is aom (field accessors, constructors, interval arithmetic),
artefact (artefact views + the parent/supplier repository), hrid (the
archetype-id grammar) and odin (the ODIN reading bridge). Above them:
codes/paths, validate, flatten + opt, the ADL2 serializer
print, and adl14 (1.4→2 conversion — our own design/extension, no
openEHR spec).
The crate has NO lexer of its own: the cADL token stream is the shared
workspace lexical layer under its ADL reading
(openehr_lang::v1_1::lexer::lex_adl), and ODIN sections go through the
openehr_lang::v1_1::odin reader. The rules body and the slot
include/exclude assertions are BEL expression trees (rules) whose string
form is rendered back from the tree (print::assertion_text), never parsed
out of it.
Modules§
- adl14
- ADL 1.4 → ADL 2 conversion (the
adl141.4→2 upgrade pipeline). - aom
- The shared AOM2 substrate: one home for reading, building, and doing
interval arithmetic over the generated
openehr_am::v2_4::aom2constraint model. - artefact
- Artefact-level views and the parent/supplier repository — the crate-wide
access layer over an assembled
openehr_am::v2_4::aom2Archetype. - assemble
- Assembles a parsed ADL artefact into the generated AOM2 object model.
- codes
- Specialisation-code utilities over the AOM2
ADL_CODE_DEFINITIONSclass. - error
- Typed ADL2 syntax errors.
- flatten
- Specialisation flattening — overlay a differential child archetype onto its flat parent to produce the flat form.
- hrid
- The archetype human-readable-identifier (HRID) grammar — the single home for
reading, writing, and keying an
ARCHETYPE_HRID. - meta
- Parsed-artefact identity summary.
- odin
- The ODIN bridge — one home for reading an
openehr_lang::v1_1::odinvalue tree into AOM/BASE types, plus themaster03lexical decoding both ODIN and cADL share. - opt
- OPT2 — operational-template generation (raw + profiled).
- parse
- The cADL definition-section parser.
- paths
- Archetype path utilities over the parsed AOM2 constraint model.
- The ADL2 serializer: render an assembled
openehr_am::v2_4::aom2Archetypeback to ADL2 source text. - rules
- The ADL2
rulessection + structured slot-assertion parser. - source
- The outer ADL artefact parser: sections, kind, meta, spans.
- validate
- The AOM2 validation engine: orchestration over a catalogue of topic modules.
Constants§
- SPEC_
VERSION - The openEHR specification version this crate implements.