"Name" = 'Archetype Query Language (AQL) - {Equal}' "Version" = '0.5' "Date" = '02 July 2008' "Author" = 'Chunlan Ma & Heath Frankel' "About" = 'Ocean Informatics' ! Gramma Configuration "Case Sensitive" = 'False' "Start Symbol" = ! ============================================================================= ! Comments ! ============================================================================= Comment Start = '/*' Comment End = '*/' Comment Line = '!' ! Character Set Definitions {quote} = [''] {String Char} = {Printable} - ["] - {quote} {Hex Char} = {Digit} + [ABCDEF] {NonZeroDigit} = {Digit} - [0] {LetterMinusA} = {Letter} - [aA] {LetterMinusT} = {Letter} - [tT] !{AlphanumericMinusT} = {Alphanumeric} - [t] !{NonZeroAlphanumeric} = {Alphanumeric} - [0] {IdChar} = {Alphanumeric} + [_] - [.] ! not allowing a dot {IdCharMinusT} = {IdChar} - [tT] ! Terminal Definitions !Identifier = {Letter}({Alphanumeric}|'_')* ! Conflicts with UID !Identifier = {Letter}{IdChar}* ! Conflicts with extended NodeId ! restricted to allow only letters after the 4th character due to conflict with extended NodeId !Identifier = {Letter}{IdChar}?{IdChar}?{IdChar}?({Letter}|'_')* !Conficts with NodeId which may have any length of digit, such as at0.9 Identifier = {LetterMinusA}{IdCharMinusT}?{IdChar}* | 'a''t'?(({letter}|'_')*|{LetterMinusT}{Alphanumeric}*) String = '"'{String Char}*'"' | ''{String Char}*'' Integer = {Digit}+ Float = {Digit}+'.'{Digit}+ Date = ''{Digit}{Digit}{Digit}{Digit}'-'{Digit}{Digit}'-'{Digit}{Digit}'' Boolean = 'true' | 'false' !NodeId = 'a''t'{Digit}{Digit}{Digit}{Digit} ! conflict with Identifier !NodeId = 'at'({Digit}{Digit}{Digit}{Digit}('.0'*('.'{NonZeroDigit}{Digit}*)+|('.'{NonZeroDigit}{Digit}*)*)|'0''.0'*('.'{NonZeroDigit}{Digit}*)+|('.'{NonZeroDigit}{Digit}*)+) NodeId = 'at'({Digit}+('.'{Digit}+)*) !Parameter = '$'{letter}({Alphanumeric}|'_')* Parameter = '$'{letter}{IdChar}* ! could constrain UID further UniqueId = {digit}+('.'{digit}+)+'.'{digit}+ ! OID | {Hex Char}+('-'{Hex Char}+)+ ! UUID ! could constrain ArchetypeId further !ArchetypeId = {Letter}+'-'{Letter}+'-'({Letter}|'_')+'.'({Letter}|'_'|'-')+'.v'{Digit}+('.'{Digit}+)? ! not allow a number in archetype id concept, such as openEHR-EHR-OBSERVATION.laboratory-hba1c.v1 ArchetypeId = {Letter}+'-'{Letter}+'-'({Letter}|'_')+'.'({IdChar}|'-')+'.v'{Digit}+('.'{Digit}+)? ComparableOperator = '=' | '!=' | '>' | '>=' | '<' | '<=' ! Rule Definitions ::= |