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 :)


All the best
Athanasios Anastasiou





DEFINITION OF IDENTIFIEDEQUALITY
--------------------------------
IdentifiedEquality ::= IdentifiedOperand ComparableOperator
IdentifiedOperand
                     | IdentifiedOperand 'matches' '{' MatchesOperand '}'
                      | IdentifiedOperand 'matches' RegExPattern
                      | 'EXISTS' IdentifiedPath
                     | identifiedOperand 'matches' '{' matchesOperand '}'
                     | identifiedOperand 'matches' REGEXPATTERN
                     | 'EXISTS' identifiedPath

This email and any files with it are confidential and intended solely for the 
use of the recipient to whom it is addressed. If you are not the intended 
recipient then copying, distribution or other use of the information contained 
is strictly prohibited and you should not rely on it. If you have received this 
email in error please let the sender know immediately and delete it from your 
system(s). Internet emails are not necessarily secure. While we take every 
care, Plymouth University accepts no responsibility for viruses and it is your 
responsibility to scan emails and their attachments. Plymouth University does 
not accept responsibility for any changes made after it was sent. Nothing in 
this email or its attachments constitutes an order for goods or services unless 
accompanied by an official order form.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ui.xhtml
Type: application/xhtml+xml
Size: 151240 bytes
Desc: not available
URL: 
<http://lists.openehr.org/pipermail/openehr-technical_lists.openehr.org/attachments/20130716/111ba0c5/attachment-0001.xhtml>

Reply via email to