All pages
Powered by GitBook
1 of 4

Loading...

Loading...

Loading...

Loading...

Syntax Specification

The following sections describe the rules used by the Template Syntax. This syntax is a serialised representation of the logical model presented in the previous chapter, and is considered to be the normative syntax for interoperability purposes.

DRAFT Normative Specification (with planned new features)
Normative Specification
Informative Comments
Provide Feedback

Informative Comments

This section provides a brief description of each rule listed above in the normative specification.

templateSlot = templateReplacementSlot / templateInformationSlot | A template slot is part of a template that is either replaced with a value (i.e. a templateRelacementSlot), or removed after the information it contains is interpreted (i.e. a templateInformationSlot). templateReplacementSlot = conceptReplacementSlot / expressionReplacementSlot / tokenReplacementSlot / concreteValueReplacementSlot | A template replacement slot is a placeholder whose value can be completed at a subsequent time. A template replacement slot may be either a concept replacement slot, an expression replacement slot, a token replacement slot or a concrete value replacement slot. c****onceptReplacementSlot = "[[" ws "+" ws conceptReplacement [slotName ws] "]]"

| A concept replacement slot starts and ends with double square brackets (i.e. "[[ ... ]]"). The first non-whitespace character inside the brackets must always be a plus sign (i.e. "+"), followed by the concept replacement rule and an optional slot name. expressionReplacementSlot = "[[" ws "+" ws expressionReplacement [slotName ws] "]]"

| An expression replacement slot starts and ends with double square brackets (i.e. "[[ ... ]]"). The first non-whitespace character inside the brackets must always be a plus sign (i.e. "+"), followed by the expression replacement rule and an optional slot name. tokenReplacementSlot = "[[" ws "+" ws tokenReplacement [slotName ws] "]]"

| A token replacement slot starts and ends with double square brackets (i.e. "[[ ... ]]"). The first non-whitespace character inside the brackets must always be a plus sign (i.e. "+"), followed by the token replacement rule and an optional slot name. concreteValueReplacementSlot = "[[" ws "+" ws concreteValueReplacement [slotName ws] "]]"

| A concrete value replacement slot starts and ends with double square brackets (i.e. "[[ ... ]]"). The first non-whitespace character inside the brackets must always be a plus sign (i.e. "+"), followed by the concrete value replacement rule and an optional slot name. conceptReplacement = "id" ws [ "(" ws slotExpressionConstraint ws ")" ws] | A concept replacement starts with the text "id", and then optionally includes an expression constraint (in round brackets) that restricts the valid values that may replace the slot. expressionReplacement = ["scg" ws] ["(" ws slotExpressionConstraint ws ")" ws] | An expression replacement starts (optionally) with the text "scg", and then optionally includes an expression constraint (in round brackets) to restrict the valid values that may replace the slot. Note that "scg" is the default type of replacement slot. tokenReplacement = "tok" ws [ "(" ws slotTokenSet ws ")" ws]

| A token replacement starts with the text "tok", and then optionally includes a token set (in round brackets) to restrict the valid values that may replace the slot. concreteValueReplacement = stringReplacement / integerReplacement / decimalReplacement / booleanReplacement

| A concrete value replacement may either be a string replacement, an integer replacement, a decimal replacement, or a boolean replacement. stringReplacement = "str" ws [ "(" ws slotStringSet ws ")" ws] | A string replacement starts with the text "str", and then optionally includes a string set (in round brackets) to restrict the valid values that may replace the slot. integerReplacement = "int" ws [ "(" ws slotIntegerSet ws ")" ws]

| An integer replacement starts with the text "int", and then optionally includes a integer set (in round brackets) to restrict the valid values that may replace the slot. decimalReplacement = "dec" ws [ "(" ws slotDecimalSet ws ")" ws]

| A decimal replacement starts with the text "dec", and then optionally includes a decimal set (in round brackets) to restrict the valid values that may replace the slot. booleanReplacement = "bool" ws [ "(" ws slotBooleanSet ws ")" ws]

| A boolean replacement starts with the text "bool", and then optionally includes a boolean set (in round brackets) to list the valid values that may replace the slot. slotTokenSet = slotToken *(mws slotToken)

| A slotTokenSet consists of one or more slotTokens separated by mandatory white space (i.e. mws). slotStringSet = slotStringValue *(mws slotStringValue) | A slotStringSet consists of one or more slotStringValues separated by mandatory white space (i.e. mws). slotStringValue = QM stringValue QM

| A slotStringValue is a stringValue surrounded with double quotation marks. slotIntegerSet = ( slotIntegerValue / slotIntegerRange) *(mws (slotIntegerValue / slotIntegerRange)) | A slotIntegerSet consists of one or more slotIntegerValues separated by mandatory white space (i.e. mws). slotDecimalSet = ( slotDecimalValue / slotDecimalRange) *(mws (slotDecimalValue / slotDecimalRange))

| A slotDecimalSet consists of one or more slotDecimals separated by mandatory white space (i.e. mws). slotBooleanSet** = slotBooleanValue (mws slotBooleanValue)*

| A slotBooleanSet consists of one or more slotBooleanValues separated by mandatory white space (i.e. mws). slotBooleanValue = booleanValue

| A slotBooleanValue is simply a boolean value (i.e. true or false). slotIntegerRange = ( slotIntegerMinimum to [ slotIntegerMaximum ] ) / ( to slotIntegerMaximum )

| A slotIntegerRange includes either a slotIntegerMinimum, a slotIntegerMaximum, or both. The slotIntegerMinimum and slotIntegerMaximum are separated by a 'to' token. slotIntegerMinimum = [ exclusiveMinimum ] slotIntegerValue

| A slotIntegerMinimum consists of a minimum slotIntegerValue. By default the minimum is inclusive (i.e. the minimum value is a valid value in the range). However, the minimum value may be declared to be exclusive (i.e. not a valid value in the range) by preceding it with the exclusiveMinimum symbol (i.e. ">"). slotIntegerMaximum = [ exclusiveMaximum ] slotIntegerValue

| A slotIntegerMaximum consists of a maximum slotIntegerValue. By default the maximum is inclusive (i.e. the maximum value is a valid value in the range). However, the maximum value may be declared to be exclusive (i.e. not a valid value in the range) by preceding it with the exclusiveMaximum symbol (i.e. "<"). slotIntegerValue = "#" ["-"/"+"] integerValue

| A slotIntegerValue consists of a hash symbol followed by an integer value, with an optional "+" or "-" just before the value. slotDecimalRange = ( slotDecimalMinimum to [ slotDecimalMaximum ] ) / ( to slotDecimalMaximum )

| A slotDecimalRange includes either a slotDecimalMinimum, a slotDecimalMaximum, or both. The slotDecimalMinimum and slotDecimalMaximum are separated by a 'to' token. slotDecimalMinimum = [ exclusiveMinimum ] slotDecimalValue

| A slotDecimalMinimum consists of a minimum slotDecimalValue. By default the minimum is inclusive (i.e. the minimum value is a valid value in the range). However, the minimum value may be declared to be exclusive (i.e. not a valid value in the range) by preceding it with the exclusiveMinimum symbol (i.e. ">"). slotDecimalMaximum = [ exclusiveMaximum ] slotDecimalValue

| A slotDecimalMaximum consists of a maximum slotDecimalValue. By default the maximum is inclusive (i.e. the maximum value is a valid value in the range). However, the maximum value may be declared to be exclusive (i.e. not a valid value in the range) by preceding it with the exclusiveMaximum symbol (i.e. "<"). slotDecimalValue = "#" ["-"/"+"] decimalValue

| A slotDecimalValue consists of a hash symbol followed by a decimal value, with an optional "+" or "-" just before the value. exclusiveMinimum = ">"

| The exclusiveMinimum symbol is ">". When used before the minimum value, it declares that this value is not a valid part of the range. exclusiveMaximum = "<"

| The exclusiveMaximum symbol is "<". When used before the maximum value, it declares that this value is not a valid part of the range. slotName = "@" (slotStringValue / nonQuoteStringValue)

| A slotName starts with an at symbol (i.e. "@"), followed by either a quoted or unquoted string. slotToken = definitionStatus / memberOf / constraintOperator / conjunction / disjunction / exclusion / reverseFlag / expressionComparisonOperator / numericComparisonOperator / stringComparisonOperator / booleanComparisonOperator

| A slotToken is any token from SNOMED CT Compositional Grammar or the SNOMED CT Expression Constraint Language. This includes the definitionStatus, memberOf, constraintOperator, conjunction, disjunction, exclusion, reverseFlag, expressionComparisonOperator, numericComparisonOperator, stringComparisonOperator and booleanComparisonOperator tokens. nonQuoteStringValue = *(%x21 / %x23-26 / %x28-3F / %x41-5A / %x5C / %x5E-7E) ; string with no ws, quotes, at or square brackets

| A nonQuoteStringValue includes any character that is not whitespace, quotes, or the @ symbol. templateInformationSlot = "[[" ws slotInformation ws "]]"

| A templateInformationSlot starts and ends with double square brackets (i.e. "[[ ... ]]"), and contains slotInformation. slotInformation = [cardinality ws] [slotName ws]

| A slotInformation consists of either a cardinality, a slotName or both.

Provide Feedback

Normative Specification

The following ABNF definition specifies the SNOMED CT template syntax (v1.1.1). This syntax incorporates the Expression Constraint Language version 1.4 (ECL v1.4), with some adaptations to support slot references. It also incorporates 3 rules from Compositional Grammar (SCG v2.4) to ensure that the definitionStatus rule is defined.

Provide Feedback
; Template Syntax v1.1
templateSlot = templateReplacementSlot / templateInformationSlot
templateReplacementSlot = conceptReplacementSlot / expressionReplacementSlot / tokenReplacementSlot / concreteValueReplacementSlot
conceptReplacementSlot = "[[" ws "+" ws conceptReplacement [slotName ws] "]]"
expressionReplacementSlot = "[[" ws "+" ws expressionReplacement [slotName ws] "]]"
tokenReplacementSlot = "[[" ws "+" ws tokenReplacement [slotName ws] "]]"
concreteValueReplacementSlot = "[[" ws "+" ws concreteValueReplacement [slotName ws] "]]"
conceptReplacement = "id" ws [ "(" ws slotExpressionConstraint ws ")" ws]
expressionReplacement = ["scg" ws] ["(" ws slotExpressionConstraint ws ")" ws]
tokenReplacement = "tok" ws [ "(" ws slotTokenSet ws ")" ws]
concreteValueReplacement = stringReplacement / integerReplacement / decimalReplacement / booleanReplacement
stringReplacement = "str" ws [ "(" ws slotStringSet ws ")" ws]
integerReplacement = "int" ws [ "(" ws slotIntegerSet ws ")" ws]
decimalReplacement = "dec" ws [ "(" ws slotDecimalSet ws ")" ws]
booleanReplacement = "bool" ws [ "(" ws slotBooleanSet ws ")" ws]
slotTokenSet = slotToken *(mws slotToken)
slotStringSet = slotStringValue *(mws slotStringValue)
slotStringValue = QM stringValue QM
slotIntegerSet = ( slotIntegerValue / slotIntegerRange) *(mws (slotIntegerValue / slotIntegerRange))
slotDecimalSet = ( slotDecimalValue / slotDecimalRange) *(mws (slotDecimalValue / slotDecimalRange))
slotBooleanSet = slotBooleanValue *(mws slotBooleanValue)
slotBooleanValue = booleanValue
slotIntegerRange = ( slotIntegerMinimum to [ slotIntegerMaximum ] ) / ( to slotIntegerMaximum )
slotIntegerMinimum = [ exclusiveMinimum ] slotIntegerValue
slotIntegerMaximum = [ exclusiveMaximum ] slotIntegerValue
slotIntegerValue = "#" ["-"/"+"] integerValue
slotDecimalRange = ( slotDecimalMinimum to [ slotDecimalMaximum ] ) / ( to slotDecimalMaximum )
slotDecimalMinimum = [ exclusiveMinimum ] slotDecimalValue
slotDecimalMaximum = [ exclusiveMaximum ] slotDecimalValue
slotDecimalValue = "#" ["-"/"+"] decimalValue
exclusiveMinimum = ">"
exclusiveMaximum = "<"
slotName = "@" (slotStringValue / nonQuoteStringValue)
slotToken = definitionStatus / memberOf / constraintOperator / conjunction / disjunction / exclusion / reverseFlag / expressionComparisonOperator / numericComparisonOperator / stringComparisonOperator /booleanComparisonOperator
nonQuoteStringValue = *(%x21 / %x23-26 / %x2A-3F / %x41-5A / %x5C / %x5E-7E) ; string with no ws, quotes, at, square brackets or round brackets
templateInformationSlot = "[[" ws slotInformation ws "]]"
slotInformation = [cardinality ws] [slotName ws]
; Expression Constraint Language v1.4
slotExpressionConstraint = ws ( slotRefinedExpressionConstraint / slotCompoundExpressionConstraint / slotDottedExpressionConstraint / slotSubExpressionConstraint ) ws
slotRefinedExpressionConstraint = slotSubExpressionConstraint ws ":" ws slotEclRefinement
slotCompoundExpressionConstraint = slotConjunctionExpressionConstraint / slotDisjunctionExpressionConstraint / slotExclusionExpressionConstraint
slotConjunctionExpressionConstraint = slotSubExpressionConstraint 1*(ws conjunction ws slotSubExpressionConstraint)
slotDisjunctionExpressionConstraint = slotSubExpressionConstraint 1*(ws disjunction ws slotSubExpressionConstraint)
slotExclusionExpressionConstraint = slotSubExpressionConstraint ws exclusion ws slotSubExpressionConstraint
slotDottedExpressionConstraint = slotSubExpressionConstraint 1*(ws slotDottedExpressionAttribute)
slotDottedExpressionAttribute = dot ws slotEclAttributeName
slotSubExpressionConstraint = [constraintOperator ws] [memberOf ws] (slotEclFocusConcept / "(" ws slotExpressionConstraint ws ")")
slotEclFocusConcept = slotEclConceptReference / wildCard
dot = "."
memberOf = "^"
slotEclConceptReference = conceptId [ws "|" ws term ws "|"]
conceptId = sctId
term = 1nonwsNonPipe ( 1SP 1nonwsNonPipe )
wildcard = "*"
constraintOperator = childOf / descendantOrSelfOf / descendantOf / parentOf / ancestorOrSelfOf / ancestorOf
descendantOf = "<"
descendantOrSelfOf = "<<"
childOf = "<!"
ancestorOf = ">"
ancestorOrSelfOf = ">>"
parentOf = ">!"
conjunction = (("a"/"A") ("n"/"N") ("d"/"D") mws) / ","
disjunction = ("o"/"O") ("r"/"R") mws
exclusion = ("m"/"M") ("i"/"I") ("n"/"N") ("u"/"U") ("s"/"S") mws
slotEclRefinement = slotSubRefinement ws [slotConjunctionRefinementSet / slotDisjunctionRefinementSet]
slotConjunctionRefinementSet = 1*(ws conjunction ws slotSubRefinement)
slotDisjunctionRefinementSet = 1*(ws disjunction ws slotSubRefinement)
slotSubRefinement = slotEclAttributeSet / slotEclAttributeGroup / "(" ws slotEclRefinement ws ")"
slotEclAttributeSet = slotSubAttributeSet ws [slotConjunctionAttributeSet / slotDisjunctionAttributeSet]
slotConjunctionAttributeSet = 1*(ws conjunction ws slotSubAttributeSet)
slotDisjunctionAttributeSet = 1*(ws disjunction ws slotSubAttributeSet)
slotSubAttributeSet = slotEclAttribute / "(" ws slotEclAttributeSet ws ")"
slotEclAttributeGroup = ["[" cardinality "]" ws] "{" ws slotEclAttributeSet ws "}"
slotEclAttribute = ["[" cardinality "]" ws] [reverseFlag ws] slotEclAttributeName ws (expressionComparisonOperator ws slotSubExpressionConstraint / numericComparisonOperator ws (slotIntegerValue /slotDecimalValue) / stringComparisonOperator ws slotStringValue / booleanComparisonOperator ws slotBooleanValue)
cardinality = minValue to maxValue
minValue = nonNegativeIntegerValue
to = ".."
maxValue = nonNegativeIntegerValue / many
many = "*"
reverseFlag = "R"
slotEclAttributeName = slotSubExpressionConstraint
expressionComparisonOperator = "=" / "!="
numericComparisonOperator = "=" / "!=" / "<=" / "<" / ">=" / ">"
stringComparisonOperator = "=" / "!="
booleanComparisonOperator = "=" / "!="
stringValue = 1*(anyNonEscapedChar / escapedChar)
integerValue = digitNonZero *digit / zero
decimalValue = integerValue "." 1*digit
booleanValue = true / false
true = ("t"/"T") ("r"/"R") ("u"/"U") ("e"/"E")
false = ("f"/"F") ("a"/"A") ("l"/"L") ("s"/"S") ("e"/"E")
nonNegativeIntegerValue = (digitNonZero *digit ) / zero
sctId = digitNonZero 5*17( digit )
ws = *( SP / HTAB / CR / LF / comment ) ; optional white space
mws = 1*( SP / HTAB / CR / LF / comment ) ; mandatory white space
comment = "/*" (nonStarChar / starWithNonFSlash) "/"
nonStarChar = SP / HTAB / CR / LF / %x21-29 / %x2B-7E /UTF8-2 / UTF8-3 / UTF8-4
starWithNonFSlash = %x2A nonFSlash
nonFSlash = SP / HTAB / CR / LF / %x21-2E / %x30-7E /UTF8-2 / UTF8-3 / UTF8-4
SP = %x20 ; space
HTAB = %x09 ; tab
CR = %x0D ; carriage return
LF = %x0A ; line feed
QM = %x22 ; quotation mark
BS = %x5C ; back slash
digit = %x30-39
zero = %x30
digitNonZero = %x31-39
nonwsNonPipe = %x21-7B / %x7D-7E / UTF8-2 / UTF8-3 / UTF8-4
anyNonEscapedChar = SP / HTAB / CR / LF / %x20-21 / %x23-5B / %x5D-7E / UTF8-2 / UTF8-3 / UTF8-4
escapedChar = BS QM / BS BS
UTF8-2 = %xC2-DF UTF8-tail
UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) / %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail )
UTF8-4 = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) / %xF4 %x80-8F 2( UTF8-tail )
UTF8-tail = %x80-BF
; Additional rules from Compositional Grammar v2.4
definitionStatus = equivalentTo / subtypeOf
equivalentTo = "==="
subtypeOf = "<<<"

DRAFT Normative Specification (with planned new features)

To be added to Introduction: Later in 2020, the syntax was updated (v1.2) to support the following features:

  • Default slot values

  • Inter-slot cross references

  • SameValue and allOrNone constraints

The following ABNF definition specifies the SNOMED CT template syntax. This syntax incorporates the Expression Constraint Language version 1.3 (ECL v1.3), with some adaptations to support slot references.

Please note that some of the rules referenced below are defined elsewhere. In particular, definitionStatus and expression are defined in . These rule definitions must therefore be combined with the syntax below before it can be used.

SNOMED CT compositional grammar
Provide Feedback
; Template Syntax v1.1
templateSlot = templateReplacementSlot / templateInformationSlot
templateReplacementSlot = conceptReplacementSlot / expressionReplacementSlot / tokenReplacementSlot / concreteValueReplacementSlot
conceptReplacementSlot = "[[" ws "+" ws conceptReplacement [slotName ws] "]]"
expressionReplacementSlot = "[[" ws "+" ws expressionReplacement [slotName ws] "]]"
tokenReplacementSlot = "[[" ws "+" ws tokenReplacement [slotName ws] "]]"
concreteValueReplacementSlot = "[[" ws "+" ws concreteValueReplacement [slotName ws] "]]"
conceptReplacement = "id" ws [ "(" ws slotExpressionConstraint ws ")" ws] [conceptDefault ws]
expressionReplacement = ["scg" ws] ["(" ws slotExpressionConstraint ws ")" ws] [expressionDefault ws]
tokenReplacement = "tok" ws [ "(" ws slotTokenSet ws ")" ws] [tokenDefault ws]
**concreteValueReplacement **= stringReplacement / integerReplacement / decimalReplacement / booleanReplacement
**stringReplacement **= "str" ws [ "(" ws slotStringSet ws ")" ws] [stringDefault ws]
******integerReplacement ** ****= "int" ws [ "(" ws slotIntegerSet ws ")" ws] [integerDefault ws]
**decimalReplacement **= "dec" ws [ "(" ws slotDecimalSet ws ")" ws] [decimalDefault ws]
**booleanReplacement **= "bool" ws [ "(" ws slotBooleanSet ws ")" ws] [booleanDefault ws]
slotTokenSet = slotToken *(mws slotToken)
slotStringSet = slotString *(mws slotString)
slotIntegerSet = ( slotIntegerValue / slotIntegerRange) *(mws (slotIntegerValue / slotIntegerRange))
slotDecimalSet = ( slotDecimalValue / slotDecimalRange) *(mws (slotDecimalValue / slotDecimalRange))
slotBooleanSet = slotBooleanValue *(mws slotBooleanValue)
slotIntegerRange = ( slotIntegerMinimum to [ slotIntegerMaximum ] ) / ( to slotIntegerMaximum )
slotIntegerMinimum = [ exclusiveMinimum ] slotIntegerValue
slotIntegerMaximum = [ exclusiveMaximum ] slotIntegerValue
slotIntegerValue = "#" digitNonZero *digit / "#" zero / slotReference
**slotDecimalRange **= ( slotDecimalMinimum to [ slotDecimalMaximum ] ) / ( to slotDecimalMaximum )
slotDecimalMinimum = [ exclusiveMinimum ] slotDecimalValue
slotDecimalMaximum = [ exclusiveMaximum ] slotDecimalValue
slotDecimalValue = "#" integerValue "." 1*digit
exclusiveMinimum = ">"
exclusiveMaximum = "<"
slotBooleanValue = true / false
true = ("t"/"T") ("r"/"R") ("u"/"U") ("e"/"E")
false = ("f"/"F") ("a"/"A") ("l"/"L") ("s"/"S") ("e"/"E")
slotName = "@" (nonQuoteStringValue / slotString)
slotReference = "$" (nonQuoteStringValue / QM stringValue QM) [ws slotArrayReference]
slotReferenceList = slotReference *(ws "," ws slotReference)
slotArrayReference = "[" ws [numericComparisonOperator ws] (integerValue / self) ws "]"
self = ("s"/"S") ("e"/"E") ("l"/"L") ("f"/"F")
**slotToken **= definitionStatus / memberOf / constraintOperator / conjunction / disjunction / exclusion / reverseFlag / expressionComparisonOperator / numericComparisonOperator / stringComparisonOperator / booleanComparisonOperator / slotReference
**slotString **= QM stringValue QM
nonQuoteStringValue = *(%x21 / %x23-26 / %x2A-3F / %x41-5A / %x5C / %x5E-7E) ; string with no ws, quotes, at, square brackets or round brackets
conceptDefault = default ws "(" ws conceptId ws ")"
expressionDefault = default ws "(" ws expression ws ")"
tokenDefault = default ws "(" ws slotToken ws ")"
stringDefault = default ws "(" ws slotString ws ")"
integerDefault = default ws "(" ws "#" integerValue ws ")"
decimalDefault = default ws "(" ws "#" decimalValue ws ")"
booleanDefault = default ws "(" ws booleanValue ws ")"
default = ("d"/"D") ("e"/"E") ("f"/"F") ("a"/"A") ("u"/"U") ("l"/"L") ("t"/"T")
**templateInformationSlot = **"[[" ws slotInformation ws "]]"
slotInformation = [cardinality ws] [slotName ws] *(sameValue / allOrNone)
sameValue = ("s"/"S") ("a"/"A") ("m"/"M") ("e"/"E") ("v"/"V") ("a"/"A") ("l"/"L") ("u"/"U") ("e"/"E") ws "(" ws slotReferenceList ws ")"
allOrNone = ("a"/"A") ("l"/"L") ("l"/"L") ("o"/"O") ("r"/"R") ("n"/"N") ("o"/"O") ("n"/"N") ("e"/"E") ws "(" ws slotReferenceList ws ")"
; Expression Constraint Language v1.4 with slot References
slotExpressionConstraint = ws ( slotRefinedExpressionConstraint / slotCompoundExpressionConstraint / slotDottedExpressionConstraint / slotSubExpressionConstraint ) ws
slotRefinedExpressionConstraint = slotSubExpressionConstraint ws ":" ws slotEclRefinement
slotCompoundExpressionConstraint = slotConjunctionExpressionConstraint / slotDisjunctionExpressionConstraint / slotExclusionExpressionConstraint
slotConjunctionExpressionConstraint = slotSubExpressionConstraint 1*(ws conjunction ws slotSubExpressionConstraint)
slotDisjunctionExpressionConstraint = slotSubExpressionConstraint 1*(ws disjunction ws slotSubExpressionConstraint)
slotExclusionExpressionConstraint = slotSubExpressionConstraint ws exclusion ws slotSubExpressionConstraint
slotDottedExpressionConstraint = slotSubExpressionConstraint 1*(ws slotDottedExpressionAttribute)
slotDottedExpressionAttribute = dot ws slotEclAttributeName
slotSubExpressionConstraint = [constraintOperator ws] [memberOf ws] (slotEclFocusConcept / "(" ws slotExpressionConstraint ws ")")
slotEclFocusConcept = slotEclConceptReference / wildCard
dot = "."
memberOf = "^"
slotEclConceptReference = conceptId [ws "|" ws term ws "|"] / slotReference
conceptId = sctId
term = 1nonwsNonPipe ( 1SP 1nonwsNonPipe )
wildcard = "*"
constraintOperator = childOf / descendantOrSelfOf / descendantOf / parentOf / ancestorOrSelfOf / ancestorOf
descendantOf = "<"
descendantOrSelfOf = "<<"
childOf = "<!"
ancestorOf = ">"
ancestorOrSelfOf = ">>"
parentOf = ">!"
conjunction = (("a"/"A") ("n"/"N") ("d"/"D") mws) / ","
disjunction = ("o"/"O") ("r"/"R") mws
exclusion = ("m"/"M") ("i"/"I") ("n"/"N") ("u"/"U") ("s"/"S") mws
slotEclRefinement = slotSubRefinement ws [slotConjunctionRefinementSet / slotDisjunctionRefinementSet]
slotConjunctionRefinementSet = 1*(ws conjunction ws slotSubRefinement)
slotDisjunctionRefinementSet = 1*(ws disjunction ws slotSubRefinement)
slotSubRefinement = slotEclAttributeSet / slotEclAttributeGroup / "(" ws slotEclRefinement ws ")"
slotEclAttributeSet = slotSubAttributeSet ws [slotConjunctionAttributeSet / slotDisjunctionAttributeSet]
slotConjunctionAttributeSet = 1*(ws conjunction ws slotSubAttributeSet)
slotDisjunctionAttributeSet = 1*(ws disjunction ws slotSubAttributeSet)
slotSubAttributeSet = slotEclAttribute / "(" ws slotEclAttributeSet ws ")"
slotEclAttributeGroup = ["[" cardinality "]" ws] "{" ws slotEclAttributeSet ws "}"
slotEclAttribute = ["[" cardinality "]" ws] [reverseFlag ws] slotEclAttributeName ws (expressionComparisonOperator ws slotSubExpressionConstraint / numericComparisonOperator ws slotNumericValue / stringComparisonOperator ws slotStringValue / booleanComparisonOperator ws booleanValue)
cardinality = minValue to maxValue
minValue = nonNegativeIntegerValue
to = ".."
maxValue = nonNegativeIntegerValue / many
many = "*"
reverseFlag = "R"
slotEclAttributeName = slotSubExpressionConstraint
expressionComparisonOperator = "=" / "!="
numericComparisonOperator = "=" / "!=" / "<=" / "<" / ">=" / ">"
stringComparisonOperator = "=" / "!="
**booleanComparisonOperator **= "=" / "!="
slotNumericValue = "#" ["-"/"+"] (slotDecimalValue / slotIntegerValue) / slotReference
slotStringValue = QM 1*(anyNonEscapedChar / escapedChar) QM / slotReference
integerValue = digitNonZero *digit / zero
decimalValue = integerValue "." 1*digit
slotBooleanValue = true / false / slotReference
true = ("t"/"T") ("r"/"R") ("u"/"U") ("e"/"E")
false = ("f"/"F") ("a"/"A") ("l"/"L") ("s"/"S") ("e"/"E")
nonNegativeIntegerValue = (digitNonZero *digit ) / zero
sctId = digitNonZero 5*17( digit )
ws = *( SP / HTAB / CR / LF / comment ) ; optional white space
mws = 1*( SP / HTAB / CR / LF / comment ) ; mandatory white space
comment = "/*" (nonStarChar / starWithNonFSlash) "/"
nonStarChar = SP / HTAB / CR / LF / %x21-29 / %x2B-7E /UTF8-2 / UTF8-3 / UTF8-4
starWithNonFSlash = %x2A nonFSlash
nonFSlash = SP / HTAB / CR / LF / %x21-2E / %x30-7E /UTF8-2 / UTF8-3 / UTF8-4
SP = %x20 ; space
HTAB = %x09 ; tab
CR = %x0D ; carriage return
LF = %x0A ; line feed
QM = %x22 ; quotation mark
BS = %x5C ; back slash
digit = %x30-39
zero = %x30
digitNonZero = %x31-39
nonwsNonPipe = %x21-7B / %x7D-7E / UTF8-2 / UTF8-3 / UTF8-4
anyNonEscapedChar = SP / HTAB / CR / LF / %x20-21 / %x23-5B / %x5D-7E / UTF8-2 / UTF8-3 / UTF8-4
escapedChar = BS QM / BS BS
UTF8-2 = %xC2-DF UTF8-tail
UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) / %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail )
UTF8-4 = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) / %xF4 %x80-8F 2( UTF8-tail )
UTF8-tail = %x80-BF