Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      Using t As New uCalc.Transformer()
         Dim text = "An apple, an apple pie, and an apple cider."
         
         '// Rule 1 (Lowest precedence for this anchor)
         t.FromTo("an apple", "[FRUIT]")
         
         '// Rule 2 (Higher precedence)
         t.FromTo("an apple pie", "[DESSERT]")
         
         '// The transformer will match "an apple pie" first because it was defined last.
         '// For the remaining "an apple" occurrences, it will fall back to the first rule.
         Console.WriteLine(t.Transform(text))
      End Using
   End Sub
End Module