#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; auto t = uc.NewTransformer(); // Define the data uc.DefineVariable("user_name = 'Alice'"); // Define the placeholder rule // '{' is a special character and must be escaped t.FromTo("'{' '{' {expr} '}' '}'", "{@@Eval: expr}"); // Process the template cout << t.Transform("Hello, {{ user_name }}!") << endl; }