Skip to content

openEHR/adl-antlr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

adl-antlr - Antlr Grammar Forge for ADL

This repository contains Antlr4 grammars and related resources for ADL. Currently this is limited to ADL2, but can be extended to ADL 1.4 as needed.

The repository is set up based on the use of the community edition of IntelliJ IDEA, with the Antlr4 plugin. The plugin should be downloaded, and imported via the IntelliJ plugin manager from the IDE.

Current Status

The grammars here are derived from the older ADL2 reference grammars in yacc/lex, on which the ADL Workbench is based.

The grammars provided so far cover ODIN, and ADL, with the latter including CADL, RULES, and a 3rd Party PCRE grammar for regex matching, as used in ADL’s slots and also C_STRING constraints.

The grammars have been lightly tested with various ODIN, CADL and ADL texts, but are by no means comprehensively tested.

Note
there is currently another Antlr4 grammar for ADL2, developed as a migration from an earlier Antlr3 grammar, used in the adl2-core project and components based on it. We are working to bring this grammar and the ones published here together in a single harmonised form.

Relationship to Grammars Published in openEHR Specifications

Any corrections to the grammars here should be copied to the locations of the published versions in the various git repositories:

Development Plan

There are various goals for this project:

  • achieve definitive testing of the grammars published here, with at least the set of test archetypes in adl-archetypes;

  • harmonise with the other adl2-core Antl4 grammar mentioned above;

  • build out the grammars to a full 'listener' based component that cen be plugged into any Java tool development.

Other suggestions are welcome.

Support and Queries

Please post on the Git issue tracker.