#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; uCalc::Transformer main_t; main_t.Description("Main Transformer"); // Create an outer rule in the main transformer auto outerRule = main_t.Pattern("OUTER({body})"); // Get a local transformer for the outer rule auto local_t = outerRule.LocalTransformer(); local_t.Description("Local Transformer"); // Create an inner rule inside the local transformer auto innerRule = local_t.FromTo("INNER", "inner_match"); // Verify the parent of the outer rule is the main transformer cout << "Outer rule's parent: " << outerRule.ParentTransformer().Description() << endl; // Verify the parent of the inner rule is the local transformer cout << "Inner rule's parent: " << innerRule.ParentTransformer().Description() << endl; }