Variables are not allowed in NegatedPropertySet

pull/10/head
Tpt 6 years ago
parent f3ab335ad3
commit 028910b77c
  1. 2
      src/sparql/algebra.rs
  2. 10
      src/sparql/sparql_grammar.rustpeg

@ -14,7 +14,7 @@ pub enum PropertyPath {
ZeroOrMorePath(Box<PropertyPath>), ZeroOrMorePath(Box<PropertyPath>),
OneOrMorePath(Box<PropertyPath>), OneOrMorePath(Box<PropertyPath>),
ZeroOrOnePath(Box<PropertyPath>), ZeroOrOnePath(Box<PropertyPath>),
NegatedPropertySet(Vec<NamedNodeOrVariable>), NegatedPropertySet(Vec<NamedNode>),
} }
impl fmt::Display for PropertyPath { impl fmt::Display for PropertyPath {

@ -563,12 +563,14 @@ PathNegatedPropertySet -> PropertyPath =
Either::Right(b) => PropertyPath::InversePath(Box::new(PropertyPath::NegatedPropertySet(vec![b]))), Either::Right(b) => PropertyPath::InversePath(Box::new(PropertyPath::NegatedPropertySet(vec![b]))),
} }
} }
PathNegatedPropertySet_item -> Either<NamedNodeOrVariable,NamedNodeOrVariable> = p:PathOneInPropertySet _ { p } PathNegatedPropertySet_item -> Either<NamedNode,NamedNode> = p:PathOneInPropertySet _ { p }
//[96] //[96]
PathOneInPropertySet -> Either<NamedNodeOrVariable,NamedNodeOrVariable> = PathOneInPropertySet -> Either<NamedNode,NamedNode> =
'^' _ v:Verb { Either::Right(v) } / '^' _ 'a' { Either::Right(rdf::TYPE.clone()) } /
v:Verb { Either::Left(v) } '^' _ v:iri { Either::Right(v) } /
'a' { Either::Left(rdf::TYPE.clone()) } /
v:iri { Either::Left(v) }
//[98] //[98]
TriplesNode -> FocusedTriplePattern<TermOrVariable> = Collection / BlankNodePropertyList TriplesNode -> FocusedTriplePattern<TermOrVariable> = Collection / BlankNodePropertyList

Loading…
Cancel
Save