Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

ADL 1.5 tools require lexical scanners and parsers for ADL, as well as serialisers. A set of these is available for the reference compiler, with other versions appearing. We don't consider the grammars normative, since different grammars or production rules may be more or less efficient depending on the kind of parser. The normative specification is ADL itself.

 Reference Compiler 

The grammar files shown below are from the Eiffel reference compiler. They are shown in pure rule form (i.e. just the production rules, no code), and in the typical .y file form containing code, which gives an idea of what each rule does in the current parsers. NOTE: there is no guarantee that these grammars are the best possible for the syntax, and they are currently made for LALR parsers and will probably need adjustment to work for LL(k) parser tools like Antlr. We are actively looking into this.

ADL is a composite syntax, and uses 4 syntaxes.

Syntax

Description

Production rules

Lexer - 
.l file (Eiffel)

Parser - 
.y file (Eiffel)

ADL

The 'outer' syntax: corresponding to the keywords and top-level structure of a file. This will revert to dADL one day, but since it's friendly and easy to read, and everyone seems to like it, it seems we will stick with it a while longer.

adl_152_parser.html

adl_152_scanner.l

adl_152_parser.y

cADL

The primary constraint syntax of archetypes, characterised by curly brackets. Used to express the core formal constraint semantics of an archetype or template.

cadl_152_parser.html

cadl_152_scanner.l

cadl_152_parser.y

assertion

The assertion syntax of archetypes. Used to express archetype-wide (i.e. cross-attribute) constraints and also archetype slot constraint conditions. This syntax is essentially a simplified variant of XPath.

(embedded in cadl)

(embedded in cadl)

(embedded in cadl)

dADL/ODIN

openEHR's native object serialisation syntax. This syntax is used for all 'data' sections of an ADL archetype, including the description, languages, ontology and annotations sections.

odin_parser.html

odin_scanner.l

odin_parser.y

 

...