turtleDoc ::= statement* statement ::= directive | triples '.' directive ::= prefixID | base | sparqlPrefix | sparqlBase prefixID ::= '@prefix' PNAME_NS IRIREF '.' base ::= '@base' IRIREF '.' sparqlPrefix ::= "PREFIX" PNAME_NS IRIREF sparqlBase ::= "BASE" IRIREF triples ::= subject predicateObjectList | blankNodePropertyList predicateObjectList? predicateObjectList ::= verb objectList (';' (verb objectList)? )* objectList ::= object ( ',' object )* verb ::= predicate | 'a' subject ::= iri | BlankNode | collection predicate ::= iri object ::= iri | BlankNode | collection | blankNodePropertyList | literal literal ::= RDFLiteral | NumericLiteral | BooleanLiteral blankNodePropertyList ::= '[' predicateObjectList ']' collection ::= '(' object* ')' NumericLiteral ::= INTEGER | DECIMAL | DOUBLE RDFLiteral ::= String ( LANGTAG | ( '^^' iri ) )? BooleanLiteral ::= 'true' | 'false' String ::= STRING_LITERAL_QUOTE | STRING_LITERAL_SINGLE_QUOTE | STRING_LITERAL_LONG_SINGLE_QUOTE | STRING_LITERAL_LONG_QUOTE iri ::= IRIREF | PrefixedName PrefixedName ::= PNAME_LN | PNAME_NS BlankNode ::= BLANK_NODE_LABEL | ANON @terminals IRIREF ::= '<' ([^#x00-#x20<>"{}|^`\] | UCHAR)* '>' PNAME_NS ::= PN_PREFIX? ':' PNAME_LN ::= PNAME_NS PN_LOCAL BLANK_NODE_LABEL ::= '_:' ( PN_CHARS_U | [0-9] ) ((PN_CHARS|'.')* PN_CHARS)? 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 | ([0-9])+ EXPONENT ) EXPONENT ::= [eE] [+-]? [0-9]+ STRING_LITERAL_QUOTE ::= '"' ( [^#x22#x5C#xA#xD] | ECHAR | UCHAR )* '"' /* #x22=" #x5C=\ #xA=new line #xD=carriage return */ STRING_LITERAL_SINGLE_QUOTE ::= "'" ( [^#x27#x5C#xA#xD] | ECHAR | UCHAR )* "'" /* #x27=' #x5C=\ #xA=new line #xD=carriage return */ STRING_LITERAL_LONG_SINGLE_QUOTE ::= "'''" ( ( "'" | "''" )? ( [^'\] | ECHAR | UCHAR ) )* "'''" STRING_LITERAL_LONG_QUOTE ::= '"""' ( ( '"' | '""' )? ( [^"\] | ECHAR | UCHAR ) )* '"""' UCHAR ::= ( '\u' HEX HEX HEX HEX ) | ( '\U' HEX HEX HEX HEX HEX HEX HEX HEX ) ECHAR ::= ('\' [tbnrf\"']) NIL ::= '(' WS* ')' WS ::= #x20 | #x9 | #xD | #xA /* #x20=space #x9=character tabulation #xD=carriage return #xA=new line */ ANON ::= '[' WS* ']' 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] | [#x10000-#xEFFFF]) 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 ::= '\' ( '_' | '~' | '.' | '-' | '!' | '$' | '&' | "'" | '(' | ')' | '*' | '+' | ',' | ';' | '=' | '/' | '?' | '#' | '@' | '%' )