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

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   uCalc::Transformer t;
   string text = "word game";
   t.FromTo("{token:1}", "[{@Self}]");

   cout << "--- Before Remove ---" << endl;
   // By default, 'word' is a single alphanumeric token.
   cout << t.Transform(text) << endl;

   // Remove the alphanumeric token definition.
   auto alphaToken = t.Tokens().ByName("_token_alphanumeric");
   t.Tokens().Remove(alphaToken);

   // The transformer must be reset with the original text for the change to apply.
   t.Text(text);

   cout << "" << endl;
   cout << "--- After Remove ---" << endl;
   // Now, 'word' is no longer a single token. The fallback '.' token
   // matches each character individually.
   cout << t.Transform() << endl;
}