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

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   auto CommentTransform = uc.NewTransformer();
   auto CommentTokens = CommentTransform.Tokens();
   CommentTokens.Add(".");
   CommentTokens.Add("[a-z]+");

   auto txt = "'This is it' /* 'This is it' This is it */ This is it";

   auto t = uc.NewTransformer();
   t.FromTo("is", "<is>");
   cout << t.Transform(txt).Text() << endl;

   // Now the context will switch between /* and */
   // In that context there's no quoted text token,
   t.Tokens().ContextSwitch(CommentTokens, "/\\*", "\\*/");
   t.FromTo("is", "<is>");
   cout << t.Transform(txt).Text() << endl;

}