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

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   auto t = uc.NewTransformer();
   t.Text("An apple and a car.");

   // Define two separate rules
   t.FromTo("apple", "[FRUIT]");
   t.FromTo("car", "[VEHICLE]");

   t.Find();

   auto matches = t.Matches();
   cout << "Found " << matches.Count() << " matches:" << endl;
   for(auto match : matches) {
      auto rule = match.Rule();
      cout << "- Matched '" << match.Text() << "' using pattern: '" << rule.Pattern() << "'" << endl;
   }
}