diff --git a/Cargo.toml b/Cargo.toml index 91238cc..5360fcd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "fol_parser" +name = "foliage" version = "0.1.0" authors = ["Patrick Lühne "] edition = "2018" diff --git a/benches/test.rs b/benches/test.rs index d271b77..a793b58 100644 --- a/benches/test.rs +++ b/benches/test.rs @@ -13,7 +13,7 @@ forall XV2 (q(XV2) <-> (exists XU2 (exists X5 (X5 = XU2 and p(X5)) and exists X6 b.iter(|| { - let (i, _) = fol_parser::formulas(formulas).unwrap(); + let (i, _) = foliage::formulas(formulas).unwrap(); assert_eq!(i, ""); }); } diff --git a/examples/test.rs b/examples/test.rs index 3e56868..297265d 100644 --- a/examples/test.rs +++ b/examples/test.rs @@ -3,7 +3,7 @@ fn main() -> Result<(), Box> let formulas = "forall XV1 (p(XV1) <-> (exists XU1 (exists X1, X2 (X1 = XU1 and exists N1, N2, N3 (N1 = 0 and N2 = n and N1 <= N3 and N3 <= N2 and X2 = N3) and X1 = X2) and exists X3, X4 (exists N4, N5 (X3 = (N4 * N5) and N4 = XU1 and N5 = XU1) and X4 = n and X3 <= X4) and XV1 = XU1))) forall XV2 (q(XV2) <-> (exists XU2 (exists X5 (X5 = XU2 and p(X5)) and exists X6 (exists N6, N7 (X6 = (N6 + N7) and N6 = XU2 and N7 = 1) and not p(X6)) and XV2 = XU2)))"; - let (i, formulas) = fol_parser::formulas(formulas).unwrap(); + let (i, formulas) = foliage::formulas(formulas).unwrap(); assert_eq!(i, ""); for formula in formulas diff --git a/src/lib.rs b/src/lib.rs index f960aa7..caf7e0d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,8 +1,7 @@ use nom:: { IResult, - bytes::complete::{take_while, take_while1, take_while_m_n, is_not}, - character::is_alphanumeric, + bytes::complete::{take_while, take_while_m_n, is_not}, character::complete::{digit1, multispace0}, sequence::{preceded, delimited, pair}, combinator::{map, map_res},