#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; #define tf(IsTrue) ((IsTrue) ? "True" : "False") int main() { uCalc uc; auto plus_op = uc.ItemOf("+", uCalc::Properties(ItemIs::Infix)); auto mul_op = uc.ItemOf("*", uCalc::Properties( ItemIs::Infix)); cout << "Precedence of '+': " << plus_op.Precedence() << endl; cout << "Precedence of '*': " << mul_op.Precedence() << endl; cout << "Does '*' bind tighter than '+'? " << tf(mul_op.Precedence() > plus_op.Precedence()) << endl; }