Remove unused code

This commit is contained in:
Patrick Lühne 2020-05-11 03:37:57 +02:00
parent 7a6fab59ef
commit cede63b7e4
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF

View File

@ -125,65 +125,5 @@ pub(crate) fn universal_closure(scoped_formula: crate::ScopedFormula) -> foliage
} }
} }
/*pub fn parse_predicate_declaration(input: &str)
-> Result<std::rc::Rc<foliage::PredicateDeclaration>, crate::Error>
{
let mut parts = input.split("/");
let name = parts.next().ok_or(crate::Error::new_parse_predicate_declaration())?;
use std::str::FromStr;
let arity = match parts.next()
{
Some(arity)
=> usize::from_str(arity).map_err(|_| crate::Error::new_parse_predicate_declaration())?,
None => 0,
};
if parts.next().is_some()
{
return Err(crate::Error::new_parse_predicate_declaration());
}
Ok(std::rc::Rc::new(foliage::PredicateDeclaration
{
name: name.to_string(),
arity,
}))
}*/
pub type InputConstantDeclarationDomains pub type InputConstantDeclarationDomains
= std::collections::BTreeMap<std::rc::Rc<foliage::FunctionDeclaration>, Domain>; = std::collections::BTreeMap<std::rc::Rc<foliage::FunctionDeclaration>, Domain>;
/*pub fn parse_constant_declaration(input: &str)
-> Result<(std::rc::Rc<foliage::FunctionDeclaration>, crate::Domain), crate::Error>
{
let mut parts = input.split(":");
let name = parts.next().ok_or(crate::Error::new_parse_constant_declaration())?.trim();
let domain = match parts.next()
{
None => crate::Domain::Program,
Some(value) => match value.trim()
{
"program" => crate::Domain::Program,
"integer" => crate::Domain::Integer,
_ => return Err(crate::Error::new_parse_constant_declaration()),
},
};
if parts.next().is_some()
{
return Err(crate::Error::new_parse_constant_declaration());
}
let constant_declaration = std::rc::Rc::new(foliage::FunctionDeclaration
{
name: name.to_string(),
arity: 0,
});
Ok((constant_declaration, domain))
}*/