Syntax Diagram for the Archetype Query Language

Hello Everyone

Since i needed an overview of AQL to understand its overall structure, i
took a little bit of time to create its syntax diagram today.

A similar diagram is available from:
http://www.openehr.org/wiki/display/spec/Archetype+Query+Language+Grammar

The diagram i produced is based on the BNF rules found in the ANTLR AQL
definition (http://www.openehr.org/wiki/display/spec/ANTLR+AQL+grammar)
and differs from the existing one in three points:

1) It was rendered using http://railroad.my28msec.com/rr/ui

2) I have taken a little bit of time to simplify the graphs (i.e. merge
edges without altering the meaning). Therefore, i think that this
diagram is more compact than the one linked above.

3) It uses SVG and its appearance can be customised through css.

I have deliberately omitted the elementary little leafs of the grammar
such as datatypes (Boolean, Float, Date, String, RegExPattern, etc) and
other identifiers (UniqueID, ArchetypeID, etc) primarily to keep the
extent of the diagram short.

One more "merging iteration" could result in more immediate but crowded
diagrams. For example, the individual terms making up Query could be
substituted so that the diagram at the level of Query tells the reader
EXACTLY how the query is structured...But that would take up the whole
width of the document so i held on to that idea.

One small question that emerged from this analysis though is this:

What is the meaning of (m|M)atchesOperand, (i|I)dentifiedOperand and
R(eg|EG)E(x|X)Pattern? in the definition of IdentifiedEquality?

Are these really different classes?
(Definition of IdentifiedEquality available at the end of this message).
At the moment i have treated them as case-insensitive and they are not
represented in the diagram but if they have to, i will correct it.

Please find the current output of the syntax diagram generator attached.

If anyone spots any obvious mistakes please don't keep them to your self :slight_smile:

All the best
Athanasios Anastasiou

DEFINITION OF IDENTIFIEDEQUALITY

(attachments)

ui.xhtml (148 KB)

Hello Everyone

Since i needed an overview of AQL to understand its overall structure, i
took a little bit of time to create its syntax diagram today.

A similar diagram is available from:
http://www.openehr.org/wiki/display/spec/Archetype+Query+Language+Grammar

The diagram i produced is based on the BNF rules found in the ANTLR AQL
definition (http://www.openehr.org/wiki/display/spec/ANTLR+AQL+grammar)
and differs from the existing one in three points:

1) It was rendered using http://railroad.my28msec.com/rr/ui

2) I have taken a little bit of time to simplify the graphs (i.e. merge
edges without altering the meaning). Therefore, i think that this
diagram is more compact than the one linked above.

3) It uses SVG and its appearance can be customised through css.

I have deliberately omitted the elementary little leafs of the grammar
such as datatypes (Boolean, Float, Date, String, RegExPattern, etc) and
other identifiers (UniqueID, ArchetypeID, etc) primarily to keep the
extent of the diagram short.

One more "merging iteration" could result in more immediate but crowded
diagrams. For example, the individual terms making up Query could be
substituted so that the diagram at the level of Query tells the reader
EXACTLY how the query is structured...But that would take up the whole
width of the document so i held on to that idea.

One small question that emerged from this analysis though is this:

What is the meaning of (m|M)atchesOperand, (i|I)dentifiedOperand and
R(eg|EG)E(x|X)Pattern? in the definition of IdentifiedEquality?

Are these really different classes?
(Definition of IdentifiedEquality available at the end of this message).
At the moment i have treated them as case-insensitive and they are not
represented in the diagram but if they have to, i will correct it.

Please find the current output of the syntax diagram generator attached.

If anyone spots any obvious mistakes please don't keep them to your self :slight_smile:

All the best
Athanasios Anastasiou

DEFINITION OF IDENTIFIEDEQUALITY

(attachments)

ui.zip (11.5 KB)