Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

The ADL 1.5 parser uses a number of grammars.

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 1.5 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_15_parser.html

adl_15_scanner.l

adl_15_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_15_parser.html

cadl_15_scanner.l

cadl_15_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

Other Tool Grammars

  • No labels