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

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   uCalc::Transformer t;
   t.Text("Log: INFO, Data: 123, Log: WARN");

   // Define two rules with different starting anchors
   t.Pattern("Log: {@Alpha}");
   t.Pattern("Data: {@Number}");
   t.Find();

   cout << "--- Match Analysis ---" << endl;
   for(auto match : t.Matches()) {
      cout << "Match '" << match.Text() << "' was found by rule '" << match.Rule().Name() << "'" << endl;
   }
}