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

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   auto t = uc.NewTransformer();
   auto txt = "a b c d e";

   t.Text(txt);
   t.FromTo("a", "aaa");
   t.FromTo("c", "xyz");

   cout << "Input: " << t << endl;
   cout << "Transformed: " << t.Transform() << endl;

   cout << "Reset" << endl;
   t.Reset();

   cout << "Input: " << t << "(empty)" << endl;
   t.Text("a b c d e");
   cout << "New input: " << t.Text() << endl;
   cout << "Transformed: " << t.Transform().Text() << " (no transform)" << endl;
   cout << "New rules" << endl;

   t.FromTo("b", "ABC");
   t.FromTo("d", "DDD");
   cout << "Transformed: " << t.Transform().Text() << endl;

}