From 028910b77cd19b7b7db9ed5d8de6b321f4fb2406 Mon Sep 17 00:00:00 2001 From: Tpt Date: Tue, 26 Jun 2018 17:22:13 +0200 Subject: [PATCH] Variables are not allowed in NegatedPropertySet --- src/sparql/algebra.rs | 2 +- src/sparql/sparql_grammar.rustpeg | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/sparql/algebra.rs b/src/sparql/algebra.rs index fdd3ff27..719c60a8 100644 --- a/src/sparql/algebra.rs +++ b/src/sparql/algebra.rs @@ -14,7 +14,7 @@ pub enum PropertyPath { ZeroOrMorePath(Box), OneOrMorePath(Box), ZeroOrOnePath(Box), - NegatedPropertySet(Vec), + NegatedPropertySet(Vec), } impl fmt::Display for PropertyPath { diff --git a/src/sparql/sparql_grammar.rustpeg b/src/sparql/sparql_grammar.rustpeg index f528e6b7..6d0c0cd6 100644 --- a/src/sparql/sparql_grammar.rustpeg +++ b/src/sparql/sparql_grammar.rustpeg @@ -563,12 +563,14 @@ PathNegatedPropertySet -> PropertyPath = Either::Right(b) => PropertyPath::InversePath(Box::new(PropertyPath::NegatedPropertySet(vec![b]))), } } -PathNegatedPropertySet_item -> Either = p:PathOneInPropertySet _ { p } +PathNegatedPropertySet_item -> Either = p:PathOneInPropertySet _ { p } //[96] -PathOneInPropertySet -> Either = - '^' _ v:Verb { Either::Right(v) } / - v:Verb { Either::Left(v) } +PathOneInPropertySet -> Either = + '^' _ 'a' { Either::Right(rdf::TYPE.clone()) } / + '^' _ v:iri { Either::Right(v) } / + 'a' { Either::Left(rdf::TYPE.clone()) } / + v:iri { Either::Left(v) } //[98] TriplesNode -> FocusedTriplePattern = Collection / BlankNodePropertyList