How to calculate boolean expression in Spirit
Here goes a quick and dirty demo based on my old Boolean Parser answer. This is a visitor that evaluates the AST you pass it: struct eval : boost::static_visitor<bool> { eval() {} // bool operator()(const var& v) const { if (v==”T” || v==”t” || v==”true” || v==”True”) return true; else if (v==”F” || v==”f” || … Read more