#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; auto t = uc.NewTransformer(); auto ruleA = t.FromTo("a", "A"); // Case 1: Limit is 2, but 3 'a's are present. The rule is invalidated. t.Transform("a b a c a"); ruleA.Maximum(2); cout << "--- Maximum = 2 (Rule Fails) ---" << endl; cout << "Result: "; cout << t.Transform("a b a c a") << endl; // Case 2: Limit is 3. The rule passes and matches are kept. ruleA.Maximum(3); cout << "" << endl; cout << "--- Maximum = 3 (Rule Succeeds) ---" << endl; cout << "Result: "; cout << t.Transform("a b a c a") << endl; }