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

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;

   // Here we define < and > as a bracket pair.
   // Such pairs can be part of a pattern match
   // and a match can be found within a bracket pair
   // but a match will not cross boundaries with one
   // part of the match out and another part inside

   auto t = uc.NewTransformer();
   auto txt = "a < b c > c, < a > b c, < a b c >";

   t.Tokens().Add("<", TokenType::Generic, ">");
   t.FromTo("a {etc} c", "((a {etc} c))");

   cout << txt << endl;
   cout << t.Transform(txt) << endl;
}