* Parses a formula from a string. A formula can be:
* <p> - a bound formula: `∀ ?x. f`, `∃ ?x. f`, `∃! ?x. f`. A binder binds the entire formula until the end of the scope (a closing parenthesis or the end of string).
* <p> - two formulas, connected by `↔` or `⇒`. Iff / implies bind less tight than and / or.
* <p> - a conjunction or disjunction of arbitrary number of formulas. `∧` binds tighter than `∨`.
* <p> - negated formula.
* <p> - equality of two formulas: `f1 = f2`.
* <p> - a constant `p(a)` or schematic `?p(a)` predicate application to arbitrary number of term arguments.
* <p> - boolean constant: `⊤` or `⊥`.
*
* @param s string representation of the formula
* @return parsed formula on success, throws an exception when unexpected input or end of input.