Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      Dim main_t As New uCalc.Transformer()
      main_t.Description = "Main Transformer"
      
      '// Create an outer rule in the main transformer
      Dim outerRule = main_t.Pattern("OUTER({body})")
      
      '// Get a local transformer for the outer rule
      Dim local_t = outerRule.LocalTransformer
      local_t.Description = "Local Transformer"
      
      '// Create an inner rule inside the local transformer
      Dim 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}")
   End Sub
End Module