openEHR / adl-antlr

Antrl4 grammars for ADL
Apache License 2.0
1 stars 4 forks source link

= 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 https://www.jetbrains.com/idea/download/[IntelliJ IDEA], with the https://github.com/antlr/intellij-plugin-v4[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 https://github.com/bkiers/pcre-parser[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 https://github.com/openEHR/adl2-core/tree/master/adl-parser/src/main/antlr4[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:

Other suggestions are welcome.

== Support and Queries

Please post on the https://github.com/openEHR/adl-antlr/issues[Git issue tracker].