Fix precedence between predicates and comparisons

This commit is contained in:
Patrick Lühne 2019-11-02 04:06:06 +01:00
parent de4ab29da5
commit 30ba3e22c1
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF

View File

@ -483,9 +483,9 @@ fn formula_precedence_0(i: &str) -> IResult<&str, crate::Formula>
{
alt
((
comparison,
predicate,
boolean,
comparison,
formula_parenthesized
))(i)
}
@ -845,6 +845,13 @@ mod tests
Box::new(crate::Term::Integer(9)),
),
))));
assert_eq!(crate::formula("n = 5"), Ok(("",
crate::Formula::Equal
(
crate::Term::Symbolic("n".to_string()),
crate::Term::Integer(5),
))));
}
#[test]