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

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   uCalc::Transformer t;
   auto rule = t.FromTo("ERROR", "[ERR]");
   rule.GlobalMaximum(2);

   // This input has 3 matches, which exceeds the maximum of 2.
   string input1 = "ERROR 1, ERROR 2, ERROR 3";
   t.Transform(input1);
   cout << "Input 1 Match Count: " << t.Matches().Count() << endl; // Expect 0

   // This input has 2 matches, which is within the limit.
   string input2 = "ERROR 1, ERROR 2";
   t.Transform(input2);
   cout << "Input 2 Match Count: " << t.Matches().Count() << endl; // Expect 2
   cout << t << endl;
}