Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      Dim t = uc.NewTransformer()
      t.FromTo("is", "<IS>")
      
      Console.WriteLine("--- With Default Tokens ---")
      '// By default, 'is' is a whole word (token)
      Console.WriteLine(t.Transform("This is a test"))
      
      '// Clear all default token definitions
      t.Tokens.Clear()
      
      '// Add a new, simple token that matches any single character
      t.Tokens.Add(".")
      
      Console.WriteLine("")
      Console.WriteLine("--- After Clearing and Adding '.' Token ---")
      '// Now, 'i' and 's' are matched as separate characters
      t.FromTo("is", "<IS>") '// The rule must be redefined
      Console.WriteLine(t.Transform("This is a test"))
   End Sub
End Module