using uCalcSoftware; var uc = new uCalc(); var main_t = new uCalc.Transformer(); main_t.Description = "Main Transformer"; // Create an outer rule in the main transformer var outerRule = main_t.Pattern("OUTER({body})"); // Get a local transformer for the outer rule var local_t = outerRule.LocalTransformer; local_t.Description = "Local Transformer"; // Create an inner rule inside the local transformer var innerRule = local_t.FromTo("INNER", "inner_match"); // Verify the parent of the outer rule is the main transformer Console.WriteLine($"Outer rule's parent: {outerRule.ParentTransformer.Description}"); // Verify the parent of the inner rule is the local transformer Console.WriteLine($"Inner rule's parent: {innerRule.ParentTransformer.Description}");