Do not use ubindr.clj-tparse.core
This commit is contained in:
parent
c115cc4a2e
commit
a78d62c461
28 changed files with 3 additions and 426 deletions
|
@ -20,6 +20,7 @@
|
||||||
[com.cognitect/transit-clj "1.0.333"]
|
[com.cognitect/transit-clj "1.0.333"]
|
||||||
[lambdaisland/uri "1.13.95"]
|
[lambdaisland/uri "1.13.95"]
|
||||||
[clj-turtle "0.1.3"]
|
[clj-turtle "0.1.3"]
|
||||||
|
[org.clojars.quoll/raphael "0.1.6"]
|
||||||
[instaparse "1.4.12"]]
|
[instaparse "1.4.12"]]
|
||||||
:main ^:skip-aot org.domaindrivenarchitecture.activity-pub-poc.core
|
:main ^:skip-aot org.domaindrivenarchitecture.activity-pub-poc.core
|
||||||
:profiles {:test {:test-paths ["src/test/cljc"]
|
:profiles {:test {:test-paths ["src/test/cljc"]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(ns org.domaindrivenarchitecture.activity-pub-poc.core
|
(ns org.domaindrivenarchitecture.activity-pub-poc.core
|
||||||
(:require [lambdaisland.souk.activitypub :as ap]
|
(:require [lambdaisland.souk.activitypub :as ap]
|
||||||
[lambdaisland.souk.json-ld :as ld]
|
[lambdaisland.souk.json-ld :as ld]
|
||||||
[ubindr.clj-tparse.core :as parse]
|
[quoll.raphael.core :refer [parse]]
|
||||||
[clojure.spec.alpha :as s]
|
[clojure.spec.alpha :as s]
|
||||||
[clojure.inspector :as ins]
|
[clojure.inspector :as ins]
|
||||||
[hato.client :as hato]
|
[hato.client :as hato]
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
(def rdf-schema-ttl (str resource-path "rdf_schema_1.1.ttl"))
|
(def rdf-schema-ttl (str resource-path "rdf_schema_1.1.ttl"))
|
||||||
(def example-ttl (str resource-path "example.ttl"))
|
(def example-ttl (str resource-path "example.ttl"))
|
||||||
|
|
||||||
(parse/parse-turtle activitystreams-ttl)
|
(parse (slurp activitystreams-ttl))
|
||||||
;(parse/parse-turtle example-ttl)
|
;(parse/parse-turtle example-ttl)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit d99fc8ade8f4390a357f2403c0bcb93b5e8e05d3
|
|
|
@ -1,56 +0,0 @@
|
||||||
turtleDoc ::= statement*
|
|
||||||
statement ::= directive | triples '.'
|
|
||||||
directive ::= prefixID | base | sparqlPrefix | sparqlBase
|
|
||||||
prefixID ::= '@prefix' PNAME_NS IRIREF '.'
|
|
||||||
base ::= '@base' IRIREF '.'
|
|
||||||
sparqlBase ::= 'BASE' IRIREF
|
|
||||||
sparqlPrefix ::= 'PREFIX' PNAME_NS 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
|
|
||||||
IRIREF ::= '<' (#'[^\u0000-\u0020<>\"{}|^`\\]' | 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 ::= '"' (#'[^\u0022\u005C\u000A\u000D]' | ECHAR | UCHAR)* '"'
|
|
||||||
STRING_LITERAL_SINGLE_QUOTE ::= "\'" (#'[^\u0027\u005C\u000A\u000D]' | ECHAR | UCHAR)* "\'"
|
|
||||||
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 ::= '\\u005C' #'[tbnrf"\'\\]'
|
|
||||||
WS ::= #'[\s]'+ | #'#.*'
|
|
||||||
ANON ::= '[' WS* ']'
|
|
||||||
PN_CHARS_BASE ::= #'[A-Z]' | #'[a-z]' | #'[\u00C0-\u00D6]' |
|
|
||||||
#'[\u00D8-\u00F6]' | #'[\u00F8-\u02FF]' |
|
|
||||||
#'[\u0370-\u037D]' | #'[\u037F-\u1FFF]' |
|
|
||||||
#'[\u200C-\u200D]' | #'[\u2070-\u218F]' |
|
|
||||||
#'[\u2C00-\u2FEF]' | #'[\u3001-\uD7FF]' |
|
|
||||||
#'[\uF900-\uFDCF]' | #'[\uFDF0-\uFFFD]' |
|
|
||||||
#'[\x{10000}-\x{EFFFF}]'
|
|
||||||
PN_CHARS_U ::= PN_CHARS_BASE | '_'
|
|
||||||
PN_CHARS ::= PN_CHARS_U | '-' | #'[0-9]' | '\\u00B7' | #'[\u0300-\u036F]' | #'[\u203F-\u2040]'
|
|
||||||
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 ::= '\\u005C' ('_' | '~' | '.' | '-' | '!' | '$' | '&' | '\\u0027' | '(' | ')' | '*' | '+' | ',' | ';' | '=' | '/' | '?' | '#' | '@' | '%')
|
|
|
@ -1 +0,0 @@
|
||||||
ECHAR ::= '\\u005C' #'[tbnrf"\'\\]'
|
|
|
@ -1,15 +0,0 @@
|
||||||
@base <http://example.org/> .
|
|
||||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
||||||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
||||||
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
|
|
||||||
@prefix rel: <http://www.perceive.net/schemas/relationship/> .
|
|
||||||
|
|
||||||
<#green-goblin>
|
|
||||||
rel:enemyOf <#spiderman> ;
|
|
||||||
a foaf:Person ; # in the context of the Marvel universe
|
|
||||||
foaf:name "Green Goblin" .
|
|
||||||
|
|
||||||
<#spiderman>
|
|
||||||
rel:enemyOf <#green-goblin> ;
|
|
||||||
a foaf:Person ;
|
|
||||||
foaf:name "Spiderman", "Человек-паук"@ru .
|
|
|
@ -1,22 +0,0 @@
|
||||||
# A triple with all absolute IRIs
|
|
||||||
<http://one.example/subject1> <http://one.example/predicate1> <http://one.example/object1> .
|
|
||||||
|
|
||||||
@base <http://one.example/> .
|
|
||||||
<subject2> <predicate2> <object2> . # relative IRIs, e.g. http://one.example/subject2
|
|
||||||
|
|
||||||
BASE <http://one.example/>
|
|
||||||
<subject2> <predicate2> <object2> . # relative IRIs, e.g. http://one.example/subject2
|
|
||||||
|
|
||||||
@prefix p: <http://two.example/> .
|
|
||||||
p:subject3 p:predicate3 p:object3 . # prefixed name, e.g. http://two.example/subject3
|
|
||||||
|
|
||||||
PREFIX p: <http://two.example/>
|
|
||||||
p:subject3 p:predicate3 p:object3 . # prefixed name, e.g. http://two.example/subject3
|
|
||||||
|
|
||||||
@prefix p: <path/> . # prefix p: now stands for http://one.example/path/
|
|
||||||
p:subject4 p:predicate4 p:object4 . # prefixed name, e.g. http://one.example/path/subject4
|
|
||||||
|
|
||||||
@prefix : <http://another.example/> . # empty prefix
|
|
||||||
:subject5 :predicate5 :object5 . # prefixed name, e.g. http://another.example/subject5
|
|
||||||
|
|
||||||
:subject6 a :subject7 . # same as :subject6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> :subject7 .
|
|
|
@ -1,10 +0,0 @@
|
||||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
||||||
@prefix dc: <http://purl.org/dc/elements/1.1/> .
|
|
||||||
@prefix ex: <http://example.org/stuff/1.0/> .
|
|
||||||
|
|
||||||
<http://www.w3.org/TR/rdf-syntax-grammar>
|
|
||||||
dc:title "RDF/XML Syntax Specification (Revised)" ;
|
|
||||||
ex:editor [
|
|
||||||
ex:fullname "Dave Beckett";
|
|
||||||
ex:homePage <http://purl.org/net/dajobe/>
|
|
||||||
] .
|
|
|
@ -1,7 +0,0 @@
|
||||||
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
|
|
||||||
|
|
||||||
[ foaf:name "Alice" ] foaf:knows [
|
|
||||||
foaf:name "Bob" ;
|
|
||||||
foaf:knows [
|
|
||||||
foaf:name "Eve" ] ;
|
|
||||||
foaf:mbox <bob@example.com> ] .
|
|
|
@ -1,6 +0,0 @@
|
||||||
_:a <http://xmlns.com/foaf/0.1/name> "Alice" .
|
|
||||||
_:a <http://xmlns.com/foaf/0.1/knows> _:b .
|
|
||||||
_:b <http://xmlns.com/foaf/0.1/name> "Bob" .
|
|
||||||
_:b <http://xmlns.com/foaf/0.1/knows> _:c .
|
|
||||||
_:c <http://xmlns.com/foaf/0.1/name> "Eve" .
|
|
||||||
_:b <http://xmlns.com/foaf/0.1/mbox> <bob@example.com> .
|
|
|
@ -1,9 +0,0 @@
|
||||||
@prefix : <http://example.org/stuff/1.0/> .
|
|
||||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
||||||
:a :b
|
|
||||||
[ rdf:first "apple";
|
|
||||||
rdf:rest [ rdf:first "banana";
|
|
||||||
rdf:rest rdf:nil ]
|
|
||||||
] .
|
|
||||||
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
@prefix : <http://example.org/stuff/1.0/> .
|
|
||||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
||||||
:a :b
|
|
||||||
[ rdf:first "apple";
|
|
||||||
rdf:rest [ rdf:first "banana";
|
|
||||||
rdf:rest rdf:nil ]
|
|
||||||
] .
|
|
||||||
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
@prefix : <http://example.org/stuff/1.0/> .
|
|
||||||
|
|
||||||
:a :b "The first line\nThe second line\n more" .
|
|
||||||
|
|
||||||
:a :b """The first line
|
|
||||||
The second line
|
|
||||||
more""" .
|
|
||||||
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
@prefix : <http://example.org/stuff/1.0/> .
|
|
||||||
|
|
||||||
:a :b "The first line\nThe second line\n more" .
|
|
||||||
|
|
||||||
:a :b """The first line
|
|
||||||
The second line
|
|
||||||
more""" .
|
|
||||||
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
@prefix : <http://example.org/stuff/1.0/> .
|
|
||||||
(1 2.0 3E1) :p "w" .
|
|
|
@ -1,2 +0,0 @@
|
||||||
PREFIX : <http://example.org/stuff/1.0/>
|
|
||||||
(1 [:p :q] ( 2 ) ) :p2 :q2 .
|
|
|
@ -1,13 +0,0 @@
|
||||||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
||||||
@prefix show: <http://example.org/vocab/show/> .
|
|
||||||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
||||||
|
|
||||||
show:218 rdfs:label "That Seventies Show"^^xsd:string . # literal with XML Schema string datatype
|
|
||||||
show:218 rdfs:label "That Seventies Show"^^<http://www.w3.org/2001/XMLSchema#string> . # same as above
|
|
||||||
show:218 rdfs:label "That Seventies Show" . # same again
|
|
||||||
show:218 show:localName "That Seventies Show"@en . # literal with a language tag
|
|
||||||
show:218 show:localName 'Cette Série des Années Soixante-dix'@fr . # literal delimited by single quote
|
|
||||||
show:218 show:localName "Cette Série des Années Septante"@fr-be-be . # literal with a region subtag
|
|
||||||
show:218 show:blurb '''This is a multi-line # literal with embedded new lines and quotes
|
|
||||||
literal with many quotes (""""")
|
|
||||||
and up to two sequential apostrophes ('').''' .
|
|
|
@ -1,5 +0,0 @@
|
||||||
@prefix : <http://example.org/elements> .
|
|
||||||
<http://en.wikipedia.org/wiki/Helium>
|
|
||||||
:atomicNumber 2 ; # xsd:integer
|
|
||||||
:atomicMass 4.002602 ; # xsd:decimal
|
|
||||||
:specificGravity 1.663E-4 . # xsd:double
|
|
|
@ -1,3 +0,0 @@
|
||||||
@prefix : <http://example.org/stats> .
|
|
||||||
<http://somecountry.example/census2007>
|
|
||||||
:isLandlocked false . # xsd:boolean
|
|
|
@ -1,5 +0,0 @@
|
||||||
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
|
|
||||||
|
|
||||||
_:alice foaf:knows _:bob .
|
|
||||||
_:bob foaf:knows _:alice .
|
|
||||||
[] foaf:knows [ foaf:name "Bob" ] .
|
|
|
@ -1,56 +0,0 @@
|
||||||
turtleDoc ::= statement*
|
|
||||||
statement ::= directive | triples '.'
|
|
||||||
directive ::= prefixID | base | sparqlPrefix | sparqlBase
|
|
||||||
prefixID ::= '@prefix' PNAME_NS IRIREF '.'
|
|
||||||
base ::= '@base' IRIREF '.'
|
|
||||||
sparqlBase ::= "BASE" IRIREF
|
|
||||||
sparqlPrefix ::= "PREFIX" PNAME_NS 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
|
|
||||||
IRIREF ::= '<' (#"[^\u0000-\u0020<>\"{}|^`\\]" | 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 ::= '"' (#"[^\u0022\u005C\u000A\u000D]" | ECHAR | UCHAR)* '"'
|
|
||||||
STRING_LITERAL_SINGLE_QUOTE ::= "'" (#"[^\u0027\u005C\u000A\u000D]" | ECHAR | UCHAR)* "'"
|
|
||||||
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\"\'\\]"
|
|
||||||
WS ::= \u0020 | \u0009 | \u000D | \u000A
|
|
||||||
ANON ::= "[" WS* "]"
|
|
||||||
PN_CHARS_BASE ::= #"[A-Z]" | #"[a-z]" | #"[\u00C0-\u00D6]" |
|
|
||||||
#"[\u00D8-\u00F6]" | #"[\u00F8-\u02FF]" |
|
|
||||||
#"[\u0370-\u037D]" | #"[\u037F-\u1FFF]" |
|
|
||||||
#"[\u200C-\u200D]" | #"[\u2070-\u218F]" |
|
|
||||||
#"[\u2C00-\u2FEF]" | #"[\u3001-\uD7FF]" |
|
|
||||||
#"[\uF900-\uFDCF]" | #"[\uFDF0-\uFFFD]" |
|
|
||||||
#"[\x{10000}-\x{EFFFF}]"
|
|
||||||
PN_CHARS_U ::= PN_CHARS_BASE | "_"
|
|
||||||
PN_CHARS ::= PN_CHARS_U | "-" | #"[0-9]" | \u00B7 | #"[\u0300-\u036F]" | #"[\u203F-\u2040]"
|
|
||||||
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 ::= "\\" ("_" | "~" | "." | "-" | "!" | "$" | "&" | \u0027 | "(" | ")" | "*" | "+" | "," | ";" | "=" | "/" | "?" | "#" | "@" | "%")
|
|
|
@ -1,56 +0,0 @@
|
||||||
turtleDoc ::= statement*
|
|
||||||
statement ::= directive | triples '.'
|
|
||||||
directive ::= prefixID | base | sparqlPrefix | sparqlBase
|
|
||||||
prefixID ::= '@prefix' PNAME_NS IRIREF '.'
|
|
||||||
base ::= '@base' IRIREF '.'
|
|
||||||
sparqlBase ::= 'BASE' IRIREF
|
|
||||||
sparqlPrefix ::= 'PREFIX' PNAME_NS 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
|
|
||||||
IRIREF ::= '<' (#'[^\u0000-\u0020<>\"{}|^`\\]' | 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 ::= \"'\" (#'[^\u0022\u005C\u000A\u000D]' | ECHAR | UCHAR)* \"'\"
|
|
||||||
STRING_LITERAL_SINGLE_QUOTE ::= \"'\" (#'[^\u0027\u005C\u000A\u000D]' | ECHAR | UCHAR)* \"'\"
|
|
||||||
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\"\'\\]'
|
|
||||||
WS ::= #'[\u0020]'+ | #'[\u0009]'+ | #'[\u000D]'+ | #'[\u000A]'+
|
|
||||||
ANON ::= '[' WS* ']'
|
|
||||||
PN_CHARS_BASE ::= #'[A-Z]' | #'[a-z]' | #'[\u00C0-\u00D6]' |
|
|
||||||
#'[\u00D8-\u00F6]' | #'[\u00F8-\u02FF]' |
|
|
||||||
#'[\u0370-\u037D]' | #'[\u037F-\u1FFF]' |
|
|
||||||
#'[\u200C-\u200D]' | #'[\u2070-\u218F]' |
|
|
||||||
#'[\u2C00-\u2FEF]' | #'[\u3001-\uD7FF]' |
|
|
||||||
#'[\uF900-\uFDCF]' | #'[\uFDF0-\uFFFD]' |
|
|
||||||
#'[\x{10000}-\x{EFFFF}]'
|
|
||||||
PN_CHARS_U ::= PN_CHARS_BASE | '_'
|
|
||||||
PN_CHARS ::= PN_CHARS_U | '-' | #'[0-9]' | #'[\u00B7]' | #'[\u0300-\u036F]' | #'[\u203F-\u2040]'
|
|
||||||
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 ::= '\\' ('_' | '~' | '.' | '-' | '!' | '$' | '&' | #'[\u0027]' | '(' | ')' | '*' | '+' | ',' | ';' | '=' | '/' | '?' | '#' | '@' | '%')
|
|
|
@ -1,68 +0,0 @@
|
||||||
turtleDoc ::= statement*
|
|
||||||
<statement> ::= directive | WSE* triples WS* <'.'> WSE*
|
|
||||||
<directive> ::= prefix | base
|
|
||||||
prefix ::= WS* prefixID WSE* | WS* sparqlPrefix WSE*
|
|
||||||
base ::= WS* regBase WSE* | WS* sparqlBase WSE*
|
|
||||||
<prefixID> ::= <'@prefix'> WS+ PNAME_NS WS+ iri WS* <'.'>
|
|
||||||
<regBase> ::= <'@base'> WS+ iri WS+ <'.'>
|
|
||||||
<sparqlBase> ::= <#'[BbAaSsEe]+'> WS+ iri
|
|
||||||
<sparqlPrefix> ::= <#'[PpRrEeFfIiXx]+'> WS+ PNAME_NS WS+ iri
|
|
||||||
triples ::= subject WSE+ predicateObjectList | blankNodePropertyList WSE+ predicateObjectList?
|
|
||||||
predicateObjectList ::= predicate WSE+ objectList WSE* (<';'> WSE+ (predicate WS+ objectList)?)*
|
|
||||||
objectList ::= object WSE* (<','> WSE* object)*
|
|
||||||
predicate ::= verb | a
|
|
||||||
a ::= 'a'
|
|
||||||
subject ::= iri | BlankNode | collection
|
|
||||||
<verb> ::= iri
|
|
||||||
object ::= iri | BlankNode | collection | blankNodePropertyList | literal
|
|
||||||
literal ::= RDFLiteral | NumericLiteral | BooleanLiteral
|
|
||||||
blankNodePropertyList ::= <'['> WSE* predicateObjectList WSE* <']'>
|
|
||||||
collection ::= <'('> object-wse* <')'>
|
|
||||||
<object-wse> ::= object | WSE*
|
|
||||||
<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
|
|
||||||
<EOL> ::= <#'[\n\r]+'>
|
|
||||||
<IRIREF> ::= FULLIRI | ref
|
|
||||||
ref ::= <'<'> (#'[^\u0000-\u0020<>\"{}:|^`\\]+' | UCHAR)* <'>'>
|
|
||||||
<FULLIRI> ::= <'<'> (#'[^\u0000-\u0020<>\"{}|^`\\]*' | 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> ::= <'"'> line-double <'"'>
|
|
||||||
<line-single> ::= (#'[^\u0022\u005C\u000A\u000D\']*' | ECHAR | UCHAR)*
|
|
||||||
<line-double> ::= (#'[^\u0022\u005C\u000A\u000D\"]*' | ECHAR | UCHAR)*
|
|
||||||
<STRING_LITERAL_SINGLE_QUOTE> ::= <"\'"> line-single <"\'">
|
|
||||||
<STRING_LITERAL_LONG_SINGLE_QUOTE> ::= <"\'\'\'"> multi-line-single <"\'\'\'">
|
|
||||||
<multi-line-double> ::= (('"' | '""')? (#'[^\"\\]*' | ECHAR | UCHAR))*
|
|
||||||
<multi-line-single> ::= (("\'" | "\'\'")? (#'[^\'\\]*' | ECHAR | UCHAR))*
|
|
||||||
<STRING_LITERAL_LONG_QUOTE> ::= <'"""'> multi-line-double <'"""'>
|
|
||||||
<UCHAR> ::= '\\u' HEX HEX HEX HEX | '\\U' HEX HEX HEX HEX HEX HEX HEX HEX
|
|
||||||
<ECHAR> ::= '\\' #'[tbnrf"\'\\]'
|
|
||||||
<WSE> ::= WS? EOL?
|
|
||||||
<WS> ::= <#'[ \t]*'> | <#'#.*'>
|
|
||||||
<ANON> ::= '[' WSE* ']'
|
|
||||||
<PN_CHARS_BASE> ::= #'[a-zA-Z]+' | #'[\u00C0-\u00D6]+' |
|
|
||||||
#'[\u00D8-\u00F6]+' | #'[\u00F8-\u02FF]+' |
|
|
||||||
#'[\u0370-\u037D]+' | #'[\u037F-\u1FFF]+' |
|
|
||||||
#'[\u200C-\u200D]+' | #'[\u2070-\u218F]+' |
|
|
||||||
#'[\u2C00-\u2FEF]+' | #'[\u3001-\uD7FF]+' |
|
|
||||||
#'[\uF900-\uFDCF]+' | #'[\uFDF0-\uFFFD]+' |
|
|
||||||
#'[\x{10000}-\x{EFFFF}]+'
|
|
||||||
<PN_CHARS_U> ::= PN_CHARS_BASE | '_'
|
|
||||||
<PN_CHARS> ::= PN_CHARS_U | '-' | #'[0-9]' | '\\u00B7' | #'[\u0300-\u036F]' | #'[\u203F-\u2040]'
|
|
||||||
<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> ::= '\\u005C' ('_' | '~' | '.' | '-' | '!' | '$' | '&' | '\\u0027' | '(' | ')' | '*' | '+' | ',' | ';' | '=' | '/' | '?' | '#' | '@' | '%')
|
|
|
@ -1 +0,0 @@
|
||||||
STRING_LITERAL_LONG_QUOTE ::= '"""' (('"' | '""')? (#'[^\"\\]' | ECHAR | UCHAR))* '"""'
|
|
|
@ -1 +0,0 @@
|
||||||
STRING_LITERAL_LONG_SINGLE_QUOTE ::= "\'\'\'" (("\'" | "\'\'")? (#'[^\'\\]' | ECHAR | UCHAR))* "\'\'\'"
|
|
|
@ -1 +0,0 @@
|
||||||
STRING_LITERAL_QUOTE ::= '"' (#'[^\u0022\u005C\u000A\u000D]' | ECHAR | UCHAR)* '"'
|
|
|
@ -1 +0,0 @@
|
||||||
STRING_LITERAL_SINGLE_QUOTE ::= "\'" (#'[^\u0027\u005C\u000A\u000D]' | ECHAR | UCHAR)* "\'"
|
|
|
@ -1,56 +0,0 @@
|
||||||
turtleDoc ::= statement*
|
|
||||||
statement ::= directive | triples '.'
|
|
||||||
directive ::= prefixID | base | sparqlPrefix | sparqlBase
|
|
||||||
prefixID ::= '@prefix' PNAME_NS IRIREF '.'
|
|
||||||
base ::= '@base' IRIREF '.'
|
|
||||||
sparqlBase ::= 'BASE' IRIREF
|
|
||||||
sparqlPrefix ::= 'PREFIX' PNAME_NS 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
|
|
||||||
IRIREF ::= '<' (#'[^\u0000-\u0020<>\"{}|^`\\]' | 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 ::= '"' (#'[^\u0022\u005C\u000A\u000D]' | ECHAR | UCHAR)* '"'
|
|
||||||
STRING_LITERAL_SINGLE_QUOTE ::= "\'" (#'[^\u0027\u005C\u000A\u000D]' | ECHAR | UCHAR)* "\'"
|
|
||||||
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 ::= '\\u005C' #'[tbnrf"\'\\]'
|
|
||||||
WS ::= #'[\s]'+ | #'#.*'
|
|
||||||
ANON ::= '[' WS* ']'
|
|
||||||
PN_CHARS_BASE ::= #'[A-Z]' | #'[a-z]' | #'[\u00C0-\u00D6]' |
|
|
||||||
#'[\u00D8-\u00F6]' | #'[\u00F8-\u02FF]' |
|
|
||||||
#'[\u0370-\u037D]' | #'[\u037F-\u1FFF]' |
|
|
||||||
#'[\u200C-\u200D]' | #'[\u2070-\u218F]' |
|
|
||||||
#'[\u2C00-\u2FEF]' | #'[\u3001-\uD7FF]' |
|
|
||||||
#'[\uF900-\uFDCF]' | #'[\uFDF0-\uFFFD]' |
|
|
||||||
#'[\x{10000}-\x{EFFFF}]'
|
|
||||||
PN_CHARS_U ::= PN_CHARS_BASE | '_'
|
|
||||||
PN_CHARS ::= PN_CHARS_U | '-' | #'[0-9]' | '\\u00B7' | #'[\u0300-\u036F]' | #'[\u203F-\u2040]'
|
|
||||||
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 ::= '\\u005C' ('_' | '~' | '.' | '-' | '!' | '$' | '&' | '\\u0027' | '(' | ')' | '*' | '+' | ',' | ';' | '=' | '/' | '?' | '#' | '@' | '%')
|
|
Loading…
Reference in a new issue