#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; uCalc::Transformer t; // This rule replaces the ALPHANUMERIC token 'get_data', not just the text. t.FromTo("get_data", "fetch_records"); auto code = R"( // Note: 'get_data' is the old function name. results = get_data(source); print("The 'get_data' function was called."); )"; // The default tokenizer recognizes the comment and string literal as separate tokens, // so the rule to replace the function name doesn't affect them. cout << t.Transform(code) << endl; }