/* SHACL Compact (SHACLC) https://w3c.github.io/shacl/shacl-compact-syntax/ */ shaclDoc ::= directive* (nodeShape|shapeClass)* directive ::= baseDecl | importsDecl | prefixDecl baseDecl ::= KW_BASE IRIREF importsDecl ::= KW_IMPORTS IRIREF prefixDecl ::= KW_PREFIX PNAME_NS IRIREF nodeShape ::= KW_SHAPE iri targetClass? nodeShapeBody shapeClass ::= KW_SHAPE_CLASS iri nodeShapeBody nodeShapeBody ::= '{' constraint* '}' targetClass ::= '->' iri+ constraint ::= ( nodeOr+ | propertyShape ) '.' nodeOr ::= nodeNot ( '|' nodeNot) * nodeNot ::= negation? nodeValue nodeValue ::= nodeParam '=' iriOrLiteralOrArray propertyShape ::= path ( propertyCount | propertyOr )* propertyOr ::= propertyNot ( '|' propertyNot) * propertyNot ::= negation? propertyAtom propertyAtom ::= propertyType | nodeKind | shapeRef | propertyValue | nodeShapeBody propertyCount ::= '[' propertyMinCount '..' propertyMaxCount ']' propertyMinCount ::= INTEGER propertyMaxCount ::= (INTEGER | '*') propertyType ::= iri nodeKind ::= 'BlankNode' | 'IRI' | 'Literal' | 'BlankNodeOrIRI' | 'BlankNodeOrLiteral' | 'IRIOrLiteral' shapeRef ::= ATPNAME_LN | ATPNAME_NS | '@' IRIREF propertyValue ::= propertyParam '=' iriOrLiteralOrArray negation ::= '!' path ::= pathAlternative pathAlternative ::= pathSequence ( '|' pathSequence )* pathSequence ::= pathEltOrInverse ( '/' pathEltOrInverse )* pathElt ::= pathPrimary pathMod? pathEltOrInverse ::= pathElt | pathInverse pathElt pathInverse ::= '^' pathMod ::= '?' | '*' | '+' pathPrimary ::= iri | '(' path ')' iriOrLiteralOrArray::= iriOrLiteral | array iriOrLiteral ::= iri | literal iri ::= IRIREF | prefixedName prefixedName ::= PNAME_LN | PNAME_NS literal ::= rdfLiteral | numericLiteral | booleanLiteral booleanLiteral ::= KW_TRUE | KW_FALSE numericLiteral ::= INTEGER | DECIMAL | DOUBLE rdfLiteral ::= string (LANGTAG | '^^' datatype)? datatype ::= iri string ::= STRING_LITERAL_LONG1 | STRING_LITERAL_LONG2 | STRING_LITERAL1 | STRING_LITERAL2 array ::= '[' iriOrLiteral* ']' nodeParam ::= 'targetNode' | 'targetObjectsOf' | 'targetSubjectsOf' | 'deactivated' | 'severity' | 'message' | 'class' | 'datatype' | 'nodeKind' | 'minExclusive' | 'minInclusive' | 'maxExclusive' | 'maxInclusive' | 'minLength' | 'maxLength' | 'pattern' | 'flags' | 'languageIn' | 'equals' | 'disjoint' | 'closed' | 'ignoredProperties' | 'hasValue' | 'in' propertyParam ::= 'deactivated' | 'severity' | 'message' | 'class' | 'datatype' | 'nodeKind' | 'minExclusive' | 'minInclusive' | 'maxExclusive' | 'maxInclusive' | 'minLength' | 'maxLength' | 'pattern' | 'flags' | 'languageIn' | 'uniqueLang' | 'equals' | 'disjoint' | 'lessThan' | 'lessThanOrEquals' | 'qualifiedValueShape' | 'qualifiedMinCount' | 'qualifiedMaxCount' | 'qualifiedValueShapesDisjoint' | 'closed' | 'ignoredProperties' | 'hasValue' | 'in' // Keywords KW_BASE ::= 'BASE' KW_IMPORTS ::= 'IMPORTS' KW_PREFIX ::= 'PREFIX' KW_SHAPE_CLASS ::= 'shapeClass' KW_SHAPE ::= 'shape' KW_TRUE ::= 'true' KW_FALSE ::= 'false' // Terminals COMMENT ::= '#' [^\r\n]* IRIREF ::= '<' ([^#x0000-#x0020=<>\"{}|^`\\] | UCHAR)* '>' PNAME_NS ::= PN_PREFIX? ':' PNAME_LN ::= PNAME_NS PN_LOCAL ATPNAME_NS ::= '@' PN_PREFIX? ':' ATPNAME_LN ::= '@' PNAME_NS PN_LOCAL LANGTAG ::= '@' [a-zA-Z]+ ('-' [a-zA-Z0-9]+)* INTEGER ::= [+-]? [0-9]+ DECIMAL ::= [+-]? [0-9]* '.' [0-9]+ DOUBLE ::= [+-]? ([0-9]+ '.' [0-9]* EXPONENT | '.'? [0-9]+ EXPONENT) EXPONENT ::= [eE] [+-]? [0-9]+ STRING_LITERAL1 ::= "'" ([^#x0027#x005C#x000A#x000D] | ECHAR | UCHAR)* "'" STRING_LITERAL2 ::= '"' ([^#x0022#x005C#x000A#x000D] | ECHAR | UCHAR)* '"' STRING_LITERAL_LONG1 ::= "'''" (("'" | "''")? ([^\'\\] | ECHAR | UCHAR))* "'''" STRING_LITERAL_LONG2 ::= '"""' (('"' | '""')? ([^\"\\] | ECHAR | UCHAR))* '"""' UCHAR ::= '\\u' HEX HEX HEX HEX | '\\U' HEX HEX HEX HEX HEX HEX HEX HEX ECHAR ::= '\\' [tbnrf\\\"\'] WS ::= [#x0020#x0009#x000D#x000A] PN_CHARS_BASE ::= [A-Z] | [a-z] | [#x00C0-#x00D6] | [#x00D8-#x00F6] | [#x00F8-#x02FF] | [#x0370-#x037D] | [#x037F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] PN_CHARS_U ::= PN_CHARS_BASE | '_' PN_CHARS ::= PN_CHARS_U | '-' | [0-9] | [#x00B7] | [#x0300-#x036F] | [#x203F-#x2040] PN_PREFIX ::= PN_CHARS_BASE ((PN_CHARS | '.')* PN_CHARS)? PN_LOCAL ::= (PN_CHARS_U | ':' | [0-9] | PLX) ((PN_CHARS | '.' | ':' | PLX)* (PN_CHARS | ':' | PLX))? PLX ::= PERCENT | PN_LOCAL_ESC PERCENT ::= '%' HEX HEX HEX ::= [0-9] | [A-F] | [a-f] PN_LOCAL_ESC ::= '\\' ('_' | '~' | '.' | '-' | '!' | '$' | '&' | "'" | '(' | ')' | '*' | '+' | ',' | ';' | '=' | '/' | '?' | '#' | '@' | '%')