Skip to content

Commit

Permalink
Implement additional class restriction expression parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
althonos committed Feb 25, 2024
1 parent 41a390a commit e66b6df
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions src/from_pair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,10 @@ fn from_restriction_pair<A: ForIRI>(
Ok(ClassExpression::ObjectAllValuesFrom { ope, bce })
}
Rule::ObjectHasValueRestriction => {
unimplemented!()
let mut pairs = inner.into_inner();
let ope = FromPair::from_pair(pairs.next().unwrap(), ctx)?;
let i = FromPair::from_pair(pairs.next().unwrap(), ctx)?;
Ok(ClassExpression::ObjectHasValue { ope, i })
}
Rule::ObjectHasSelfRestriction => {
let mut pairs = inner.into_inner();
Expand Down Expand Up @@ -1132,7 +1135,21 @@ impl<A: ForIRI> FromPair<A> for DataPropertyFrame<A> {
}
)
}
Rule::DataPropertyCharacteristicsClause => unimplemented!(),
Rule::DataPropertyCharacteristicsClause => {
annotated_axiom!(
pair,
inner,
ctx,
frame,
axiom = {
let dp = frame.entity.clone();
match descend(pair).as_rule() {
Rule::FunctionalCharacteristic => FunctionalDataProperty(dp).into(),
rule => unexpected_rule!(ObjectPropertyFrame, rule),
}
}
)
}
Rule::DataPropertySubPropertyOfClause => {
annotated_axiom!(
pair,
Expand Down

0 comments on commit e66b6df

Please sign in to comment.