#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   uCalc::Transformer t;

   // 1. Parent rule finds content inside parentheses.
   auto parentRule = t.FromTo("({body})", "({body})");

   // 2. Get the local transformer for the parent.
   auto local_t = parentRule.LocalTransformer();

   // 3. Child rule runs only inside the parentheses.
   local_t.FromTo("this", "THIS");

   auto text = "do not find this, but (find this) and not this";
   cout << t.Transform(text) << endl;
}