EBNF Grammar of the
WIQA-PL Information Quality Assessment Language

Author:
Chris Bizer (chris@bizer.de)
Richard Cyganiak (richard@cyganiak.de)
Version:
$Id: index.html,v 1.6 2006/10/12 14:07:03 bizer Exp $

Please refer to the WIQA-PL Language Specification for more details about the language.

 

[1]   Policy   ::=   PrefixDecl* PolicyName PolicyDescription? 'PATTERN' '{' ExplanationTemplate? ( NamedGraphPattern | Extension | CountConstraint | Constraint )* '}' ( 'CONSTRUCT' 'EXPLANATION' ConstructTemplate )?
[2]   PrefixDecl   ::=   'PREFIX' QNAME_NS Q_IRI_REF
[3]   PolicyName   ::=   'NAME' String
[4]   PolicyDescription   ::=   'DESCRIPTION' String
[5]   NamedGraphPattern   ::=   'GRAPH' ( VarOrBlankNodeOrIRIref | 'ANY' ) '{' ExplanationTemplate? TriplesAndFilters '}'
[6]   TriplesAndFilters   ::=   Triples? ( ( Extension | CountConstraint | Constraint ) '.'? TriplesAndFilters )?
[7]   CountConstraint   ::=   'FILTER' '(' CountIRIref '(' Var ')' ( '=' | '!=' | '<' | '>' | '<=' | '>=' ) INTEGER ')'
[8]   Extension   ::=   'FILTER' ( ExtensionIRIref ArgList | '(' ExtensionIRIref ArgList ( '=' | '!=' | '<' | '>' | '<=' | '>=' ) INTEGER ')' )
[9]   CountIRIref   ::=   QNAME_COUNT | Q_IRIref_COUNT
[10]   ExtensionIRIref   ::=   QNAME_EXTENSION | Q_IRIref_EXTENSION
[11]   IRIrefNotExtensionOrCount   ::=   QNAME | QNAME_NS | '<' ([^<>'{}|^`]-[#00-#20])* '>'
[12]   FunctionCall   ::=   IRIrefNotExtensionOrCount ArgList
[13]   IRIrefOrFunction   ::=   IRIrefNotExtensionOrCount ArgList?
[14]   ExplanationTemplate   ::=   'EXPL' VarOrTerm* '.'
[15]   Constraint   ::=   'FILTER' ( BrackettedExpression | BuiltInCall | FunctionCall )
[16]   ConstructTemplate   ::=   '{' ConstructTriples '}'
[17]   ConstructTriples   ::=   ( Triples1 ( '.' ConstructTriples )? )?
[18]   Triples   ::=   Triples1 ( '.' Triples? )?
[19]   Triples1   ::=   VarOrTerm PropertyListNotEmpty | TriplesNode PropertyList
[20]   PropertyList   ::=   PropertyListNotEmpty?
[21]   PropertyListNotEmpty   ::=   Verb ObjectList ( ';' PropertyList )?
[22]   ObjectList   ::=   GraphNode ( ',' ObjectList )?
[23]   Verb   ::=   VarOrBlankNodeOrIRIref | 'a'
[24]   TriplesNode   ::=   Collection | BlankNodePropertyList
[25]   BlankNodePropertyList   ::=   '[' PropertyListNotEmpty ']'
[26]   Collection   ::=   '(' GraphNode+ ')'
[27]   GraphNode   ::=   VarOrTerm | TriplesNode
[28]   VarOrTerm   ::=   Var | GraphTerm
[29]   VarOrIRIref   ::=   Var | IRIref
[30]   VarOrBlankNodeOrIRIref   ::=   Var | BlankNode | IRIref
[31]   Var   ::=   VAR1 | VAR2
[32]   GraphTerm   ::=   IRIref | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | NIL
[33]   Expression   ::=   ConditionalOrExpression
[34]   ConditionalOrExpression   ::=   ConditionalAndExpression ( '||' ConditionalAndExpression )*
[35]   ConditionalAndExpression   ::=   ValueLogical ( '&&' ValueLogical )*
[36]   ValueLogical   ::=   RelationalExpression
[37]   RelationalExpression   ::=   NumericExpression ( '=' NumericExpression | '!=' NumericExpression | '<' NumericExpression | '>' NumericExpression | '<=' NumericExpression | '>=' NumericExpression )?
[38]   NumericExpression   ::=   AdditiveExpression
[39]   AdditiveExpression   ::=   MultiplicativeExpression ( '+' MultiplicativeExpression | '-' MultiplicativeExpression )*
[40]   MultiplicativeExpression   ::=   UnaryExpression ( '*' UnaryExpression | '/' UnaryExpression )*
[41]   UnaryExpression   ::=     '!' PrimaryExpression
| '+' PrimaryExpression
| '-' PrimaryExpression
| PrimaryExpression
[42]   BuiltInCall   ::=     'STR' '(' Expression ')'
| 'LANG' '(' Expression ')'
| 'DATATYPE' '(' Expression ')'
| 'BOUND' '(' Var ')'
| IS_URI '(' Expression ')'
| 'isBLANK' '(' Expression ')'
| 'isLITERAL' '(' Expression ')'
| RegexExpression
[43]   RegexExpression   ::=   'REGEX' '(' Expression ',' Expression ( ',' Expression )? ')'
[44]   ArgList   ::=   ( NIL | '(' Expression ( ',' Expression )* ')' )
[45]   BrackettedExpression   ::=   '(' Expression ')'
[46]   PrimaryExpression   ::=   BrackettedExpression | BuiltInCall | IRIrefOrFunction | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | Var
[47]   NumericLiteral   ::=   INTEGER | FLOATING_POINT
[48]   RDFLiteral   ::=   String ( LANGTAG | ( '^^' IRIref ) )?
[49]   BooleanLiteral   ::=   'true' | 'false'
[50]   String   ::=   STRING_LITERAL1 | STRING_LITERAL2 | STRING_LITERAL_LONG1 | STRING_LITERAL_LONG2
[51]   IRIref   ::=   Q_IRI_REF | QName
[52]   QName   ::=   QNAME | QNAME_NS | QNAME_EXTENSION
[53]   BlankNode   ::=   BLANK_NODE_LABEL | ANON
[54]   Q_IRI_REF   ::=   '<' ([^<>'{}|^`]-[#00-#20])* '>' | Q_IRIref_EXTENSION
[55]   QNAME_NS   ::=   NCNAME_PREFIX? ':'
[56]   QNAME   ::=   NCNAME_PREFIX? ':' NCNAME?
[57]   BLANK_NODE_LABEL   ::=   '_:' NCNAME
[58]   VAR1   ::=   '?' VARNAME
[59]   VAR2   ::=   '$' VARNAME
[60]   LANGTAG   ::=   '@' [a-zA-Z]+ ('-' [a-zA-Z0-9]+)*
[61]   INTEGER   ::=   [0-9]+
[62]   DECIMAL   ::=   [0-9]+ '.' [0-9]* | '.' [0-9]+
[63]   FLOATING_POINT   ::=   [0-9]+ '.' [0-9]* EXPONENT? | '.' ([0-9])+ EXPONENT? | ([0-9])+ EXPONENT
[64]   EXPONENT   ::=   [eE] [+-]? [0-9]+
[65]   ECHAR   ::=   '\' [tbnrf\"']
[66]   STRING_LITERAL1   ::=   "'" ( ([^#x27#x5C#xA#xD]) | ECHAR )* "'"
[67]   STRING_LITERAL2   ::=   '"' ( ([^#x22#x5C#xA#xD]) | ECHAR )* '"'
[68]   STRING_LITERAL_LONG1   ::=   "'''" ( [^'\] | ECHAR | ("'" [^']) | ("''" [^']) )* "'''"
[69]   STRING_LITERAL_LONG2   ::=   '"""' ( [^"\] | ECHAR | ('"' [^"]) | ('""' [^"]) )* '"""'
[70]   NIL   ::=   '(' WS* ')'
[71]   WS   ::=   #x20 | #x9 | #xD | #xA
[72]   ANON   ::=   '[' WS* ']'
[73]   NCCHAR1p   ::=     [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]
| [#x10000-#xEFFFF]
[74]   NCCHAR1   ::=   NCCHAR1p | '_'
[75]   VARNAME   ::=   ( NCCHAR1 | [0-9] ) ( NCCHAR1 | [0-9] | #x00B7 | [#x0300-#x036F] | [#x203F-#x2040] )*
[76]   NCCHAR   ::=   NCCHAR1 | '-' | [0-9] | #x00B7 | [#x0300-#x036F] | [#x203F-#x2040]
[77]   NCNAME_PREFIX   ::=   NCCHAR1p ((NCCHAR|'.')* NCCHAR)?
[78]   NCNAME   ::=   NCCHAR1 ((NCCHAR|'.')* NCCHAR)?